Skip to content

Commit

Permalink
update latest ethereum-consensus
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Oct 19, 2023
1 parent 4f2c285 commit addcd2a
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ default-members = ["bin/mev"]
version = "0.3.0"

[workspace.dependencies]
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "766aca6c5d10ee8dac015fbe705667f60097149d" }
beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "766aca6c5d10ee8dac015fbe705667f60097149d" }
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "c84f44ee7ec04613adf5f2be845df35e05de1efc" }
beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "c84f44ee7ec04613adf5f2be845df35e05de1efc" }

reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" }
Expand Down
2 changes: 1 addition & 1 deletion mev-rs/src/blinded_block_provider/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Client {
bid_request: &BidRequest,
) -> Result<SignedBuilderBid, Error> {
let target = format!(
"/eth/v1/builder/header/{}/{}/{}",
"/eth/v1/builder/header/{}/{:?}/{:?}",
bid_request.slot, bid_request.parent_hash, bid_request.public_key
);
let response = self.api.http_get(&target).await?;
Expand Down
3 changes: 2 additions & 1 deletion mev-rs/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ mod tests {
let public_key = sk.public_key();

let mut url = Url::parse(URL).unwrap();
url.set_username(&public_key.to_string()).unwrap();
let public_key_str = format!("{public_key:?}");
url.set_username(&public_key_str).unwrap();

let endpoint = RelayEndpoint::try_from(url.clone()).unwrap();
assert_eq!(endpoint.url, url);
Expand Down
2 changes: 1 addition & 1 deletion mev-rs/src/serde.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub(crate) use ethereum_consensus::serde::as_string;
pub(crate) use ethereum_consensus::serde::as_str;
2 changes: 1 addition & 1 deletion mev-rs/src/types/bid_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use ethereum_consensus::primitives::{BlsPublicKey, Hash32, Slot};
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct BidRequest {
#[serde(with = "crate::serde::as_string")]
#[serde(with = "crate::serde::as_str")]
pub slot: Slot,
pub parent_hash: Hash32,
pub public_key: BlsPublicKey,
Expand Down
6 changes: 3 additions & 3 deletions mev-rs/src/types/block_submission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use ethereum_consensus::{
#[derive(Debug, Default, Clone, SimpleSerialize)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct BidTrace {
#[serde(with = "crate::serde::as_string")]
#[serde(with = "crate::serde::as_str")]
pub slot: Slot,
pub parent_hash: Hash32,
pub block_hash: Hash32,
Expand All @@ -16,9 +16,9 @@ pub struct BidTrace {
#[serde(rename = "proposer_pubkey")]
pub proposer_public_key: BlsPublicKey,
pub proposer_fee_recipient: ExecutionAddress,
#[serde(with = "crate::serde::as_string")]
#[serde(with = "crate::serde::as_str")]
pub gas_limit: u64,
#[serde(with = "crate::serde::as_string")]
#[serde(with = "crate::serde::as_str")]
pub gas_used: u64,
pub value: U256,
}
Expand Down
4 changes: 2 additions & 2 deletions mev-rs/src/types/proposer_schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use ethereum_consensus::primitives::{Slot, ValidatorIndex};
#[derive(Debug, Default, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct ProposerSchedule {
#[serde(with = "crate::serde::as_string")]
#[serde(with = "crate::serde::as_str")]
pub slot: Slot,
#[serde(with = "crate::serde::as_string")]
#[serde(with = "crate::serde::as_str")]
pub validator_index: ValidatorIndex,
pub entry: SignedValidatorRegistration,
}

0 comments on commit addcd2a

Please sign in to comment.