diff --git a/Cargo.lock b/Cargo.lock index 00d03a59..525a5abb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -610,7 +610,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "beacon-api-client" version = "0.1.0" -source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=e810cecbb113de66aeedae6dcde2a69cd284f88d#e810cecbb113de66aeedae6dcde2a69cd284f88d" +source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=bfb6af698311226d55ec7c7ba6eabbc1abc072a0#bfb6af698311226d55ec7c7ba6eabbc1abc072a0" dependencies = [ "clap", "ethereum-consensus", @@ -2271,7 +2271,7 @@ dependencies = [ [[package]] name = "ethereum-consensus" version = "0.1.1" -source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=e810cecbb113de66aeedae6dcde2a69cd284f88d#e810cecbb113de66aeedae6dcde2a69cd284f88d" +source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=bfb6af698311226d55ec7c7ba6eabbc1abc072a0#bfb6af698311226d55ec7c7ba6eabbc1abc072a0" dependencies = [ "async-stream", "blst", diff --git a/Cargo.toml b/Cargo.toml index bbd610d8..a7924fef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,8 +7,8 @@ default-members = ["bin/mev"] version = "0.3.0" [workspace.dependencies] -ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "e810cecbb113de66aeedae6dcde2a69cd284f88d" } -beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "e810cecbb113de66aeedae6dcde2a69cd284f88d" } +ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "bfb6af698311226d55ec7c7ba6eabbc1abc072a0" } +beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "bfb6af698311226d55ec7c7ba6eabbc1abc072a0" } reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } diff --git a/mev-rs/src/signing.rs b/mev-rs/src/signing.rs index ff50e0eb..f83c85e0 100644 --- a/mev-rs/src/signing.rs +++ b/mev-rs/src/signing.rs @@ -6,7 +6,7 @@ use ethereum_consensus::{ signing::sign_with_domain, ssz::prelude::Merkleized, state_transition::Context, - Error, Fork, + Error, }; pub use ethereum_consensus::{ crypto::SecretKey, @@ -19,12 +19,8 @@ pub fn compute_consensus_signing_root( genesis_validators_root: &Root, context: &Context, ) -> Result { - let fork_version = match context.fork_for(slot) { - Fork::Bellatrix => context.bellatrix_fork_version, - Fork::Capella => context.capella_fork_version, - Fork::Deneb => context.deneb_fork_version, - _ => unimplemented!("fork not supported"), - }; + let fork = context.fork_for(slot); + let fork_version = context.fork_version_for(fork); let domain = compute_domain( DomainType::BeaconProposer, Some(fork_version),