From 7f8b48ca51442416d4cb9fdb0641294ff434aaaf Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Fri, 19 Jul 2024 14:23:41 +0200 Subject: [PATCH] fix(sidecar): sent local blob also to the mempool --- bolt-sidecar/src/builder/payload_builder.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bolt-sidecar/src/builder/payload_builder.rs b/bolt-sidecar/src/builder/payload_builder.rs index c5f9e4279..714f8ef83 100644 --- a/bolt-sidecar/src/builder/payload_builder.rs +++ b/bolt-sidecar/src/builder/payload_builder.rs @@ -191,6 +191,21 @@ impl FallbackPayloadBuilder { withdrawals: Some(Withdrawals::new(withdrawals)), }; + // If there are some blob transactions, send them to the mempool + let blob_txs = transactions.iter().filter(|tx| tx.as_eip4844().is_some()); + for tx in blob_txs { + tracing::debug!(?tx.hash, "Sending blob tx to mempool"); + let mut bytes: Vec = Vec::new(); + tx.encode_enveloped(&mut bytes); + if let Err(e) = self + .execution_rpc_client + .send_raw_transaction(bytes.into()) + .await + { + tracing::error!(error = ?e, ?tx.hash, "Failed to send blob tx to mempool"); + } + } + let mut hints = Hints::default(); let max_iterations = 20; let mut i = 0;