Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 8d0c069

Browse files
committed
feat: don't send receipts in flashblocks websocket
NOTE: This is a breaking change to the flashblocks websocket API. Removes receipts from the flashblocks websocket stream. These were only used for deposit transactions' nonces and aren't worth the large overhead.
1 parent 23f42c8 commit 8d0c069

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

  • crates/op-rbuilder/src/builders/flashblocks

crates/op-rbuilder/src/builders/flashblocks/payload.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use reth_optimism_consensus::{calculate_receipt_root_no_memo_optimism, isthmus};
2929
use reth_optimism_evm::{OpEvmConfig, OpNextBlockEnvAttributes};
3030
use reth_optimism_forks::OpHardforks;
3131
use reth_optimism_node::{OpBuiltPayload, OpPayloadBuilderAttributes};
32-
use reth_optimism_primitives::{OpPrimitives, OpReceipt, OpTransactionSigned};
32+
use reth_optimism_primitives::{OpPrimitives, OpTransactionSigned};
3333
use reth_payload_util::BestPayloadTransactions;
3434
use reth_primitives_traits::RecoveredBlock;
3535
use reth_provider::{
@@ -942,7 +942,7 @@ where
942942

943943
#[derive(Debug, Serialize, Deserialize)]
944944
struct FlashblocksMetadata {
945-
receipts: HashMap<B256, <OpPrimitives as NodePrimitives>::Receipt>,
945+
receipts: Option<HashMap<B256, <OpPrimitives as NodePrimitives>::Receipt>>,
946946
new_account_balances: HashMap<Address, U256>,
947947
block_number: u64,
948948
}
@@ -1134,13 +1134,7 @@ where
11341134
.map(|tx| tx.encoded_2718().into())
11351135
.collect::<Vec<_>>();
11361136

1137-
let new_receipts = info.receipts[info.extra.last_flashblock_index..].to_vec();
11381137
info.extra.last_flashblock_index = info.executed_transactions.len();
1139-
let receipts_with_hash = new_transactions
1140-
.iter()
1141-
.zip(new_receipts.iter())
1142-
.map(|(tx, receipt)| (tx.tx_hash(), receipt.clone()))
1143-
.collect::<HashMap<B256, OpReceipt>>();
11441138
let new_account_balances = state
11451139
.bundle_state
11461140
.state
@@ -1149,7 +1143,7 @@ where
11491143
.collect::<HashMap<Address, U256>>();
11501144

11511145
let metadata: FlashblocksMetadata = FlashblocksMetadata {
1152-
receipts: receipts_with_hash,
1146+
receipts: None,
11531147
new_account_balances,
11541148
block_number: ctx.parent().number + 1,
11551149
};

0 commit comments

Comments
 (0)