Skip to content

Commit

Permalink
update repo to use new "copy types" from underlying polymorphic types
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Oct 17, 2023
1 parent 673f9b2 commit ad26180
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 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 = "bfb6af698311226d55ec7c7ba6eabbc1abc072a0" }
beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "bfb6af698311226d55ec7c7ba6eabbc1abc072a0" }
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "766aca6c5d10ee8dac015fbe705667f60097149d" }
beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "766aca6c5d10ee8dac015fbe705667f60097149d" }

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-boost-rs/src/relay_mux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PROPOSAL_TOLERANCE_DELAY: Slot = 1;
const FETCH_BEST_BID_TIME_OUT_SECS: u64 = 1;

fn bid_key_from(signed_block: &SignedBlindedBeaconBlock, public_key: &BlsPublicKey) -> BidRequest {
let slot = *signed_block.message().slot();
let slot = signed_block.message().slot();
let parent_hash =
signed_block.message().body().execution_payload_header().parent_hash().clone();

Expand Down
2 changes: 1 addition & 1 deletion mev-boost-rs/tests/identity_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl BlindedBlockProvider for IdentityBuilder {
&self,
signed_block: &mut SignedBlindedBeaconBlock,
) -> Result<ExecutionPayload, Error> {
let slot = *signed_block.message().slot();
let slot = signed_block.message().slot();
let state = self.bids.lock().unwrap();
Ok(state.get(&slot).cloned().unwrap())
}
Expand Down
8 changes: 4 additions & 4 deletions mev-relay-rs/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn validate_execution_payload(

// TODO allow for "adjustment cap" per the protocol rules
// towards the proposer's preference
if execution_payload.gas_limit() != &preferences.gas_limit {
if execution_payload.gas_limit() != preferences.gas_limit {
return Err(Error::InvalidGasLimit)
}

Expand Down Expand Up @@ -81,7 +81,7 @@ fn validate_signed_block(
// verify proposer_index is correct
// verify parent_root matches

let slot = *block.slot();
let slot = block.slot();
let signing_root =
compute_consensus_signing_root(&mut block, slot, genesis_validators_root, context)?;
let signature = signed_block.signature();
Expand Down Expand Up @@ -204,11 +204,11 @@ impl BlindedBlockProvider for Relay {
signed_block: &mut SignedBlindedBeaconBlock,
) -> Result<ExecutionPayload, Error> {
let block = signed_block.message();
let slot = *block.slot();
let slot = block.slot();
let body = block.body();
let payload_header = body.execution_payload_header();
let parent_hash = payload_header.parent_hash().clone();
let proposer_index = *block.proposer_index();
let proposer_index = block.proposer_index();
let public_key =
self.validator_registry.get_public_key(proposer_index).map_err(Error::from)?;
let bid_request = BidRequest { slot, parent_hash, public_key };
Expand Down
2 changes: 1 addition & 1 deletion mev-rs/src/blinded_block_provider/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async fn handle_open_bid<B: BlindedBlockProvider>(
) -> Result<Json<VersionedValue<ExecutionPayload>>, Error> {
let payload = builder.open_bid(&mut block).await?;
let block_hash = payload.block_hash();
let slot = *block.message().slot();
let slot = block.message().slot();
tracing::info!("returning provided payload in slot {slot} with block_hash {block_hash}");
let version = payload.version();
let response = VersionedValue { version, data: payload, meta: Default::default() };
Expand Down

0 comments on commit ad26180

Please sign in to comment.