Skip to content

Commit

Permalink
submit blobs to CL when verifying block before relay release
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed May 2, 2024
1 parent ec05134 commit deba4b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 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 @@ -14,8 +14,8 @@ default-members = ["bin/mev"]
version = "0.3.0"

[workspace.dependencies]
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "0919f02435e1b64e27c53931cac8e08edaad5f8b" }
beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "0919f02435e1b64e27c53931cac8e08edaad5f8b" }
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "5cf67a5944ef4e18742178374eb4d37b50a5b292" }
beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "5cf67a5944ef4e18742178374eb4d37b50a5b292" }

reth = { git = "https://github.com/paradigmxyz/reth", rev = "8e65cb3" }
reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "8e65cb3" }
Expand Down
9 changes: 7 additions & 2 deletions mev-relay-rs/src/relay.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::auction_context::AuctionContext;
use async_trait::async_trait;
use beacon_api_client::{BroadcastValidation, PayloadAttributesEvent};
use beacon_api_client::{BroadcastValidation, PayloadAttributesEvent, SubmitSignedBeaconBlock};
use ethereum_consensus::{
clock::get_current_unix_time_in_nanos,
crypto::SecretKey,
Expand Down Expand Up @@ -528,10 +528,15 @@ impl BlindedBlockProvider for Relay {
let version = signed_block.version();
let block_root =
signed_block.message().hash_tree_root().map_err(ConsensusError::from)?;
let request = SubmitSignedBeaconBlock {
signed_block: &signed_block,
kzg_proofs: auction_context.blobs_bundle().map(|bundle| bundle.proofs.as_ref()),
blobs: auction_context.blobs_bundle().map(|bundle| bundle.blobs.as_ref()),
};
if let Err(err) = self
.beacon_node
.post_signed_beacon_block_v2(
&signed_block,
request,
version,
Some(BroadcastValidation::ConsensusAndEquivocation),
)
Expand Down

0 comments on commit deba4b6

Please sign in to comment.