Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ anyhow = "1"
url = "2.5.7"
lru = "0.16.3"
rand = "0.9.2"
serde_yaml = "0.9"
shellexpand = "3.1"
strum = "0.27.2"
backon = "1.6.0"
Expand Down
1 change: 0 additions & 1 deletion crates/builder/op-rbuilder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ tokio-tungstenite.workspace = true
rand.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
shellexpand.workspace = true
serde_yaml.workspace = true
moka.workspace = true
http.workspace = true
sha3.workspace = true
Expand Down
30 changes: 6 additions & 24 deletions crates/builder/op-rbuilder/src/flashblocks/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use alloy_consensus::{
BlockBody, EMPTY_OMMER_ROOT_HASH, Header, constants::EMPTY_WITHDRAWALS, proofs,
};
use alloy_eips::{Encodable2718, eip7685::EMPTY_REQUESTS_HASH, merge::BEACON_NONCE};
use alloy_primitives::{Address, B256, U256, map::foldhash::HashMap};
use alloy_primitives::{B256, U256};
use base_flashtypes::{
ExecutionPayloadBaseV1, ExecutionPayloadFlashblockDeltaV1, FlashblocksPayloadV1,
};
Expand All @@ -18,12 +18,12 @@ use reth_basic_payload_builder::BuildOutcome;
use reth_chain_state::ExecutedBlock;
use reth_chainspec::EthChainSpec;
use reth_evm::{ConfigureEvm, execute::BlockBuilder};
use reth_node_api::{Block, NodePrimitives, PayloadBuilderError};
use reth_node_api::{Block, PayloadBuilderError};
use reth_optimism_consensus::{calculate_receipt_root_no_memo_optimism, isthmus};
use reth_optimism_evm::{OpEvmConfig, OpNextBlockEnvAttributes};
use reth_optimism_forks::OpHardforks;
use reth_optimism_node::{OpBuiltPayload, OpPayloadBuilderAttributes};
use reth_optimism_primitives::{OpPrimitives, OpReceipt, OpTransactionSigned};
use reth_optimism_primitives::OpTransactionSigned;
use reth_payload_primitives::PayloadBuilderAttributes;
use reth_payload_util::BestPayloadTransactions;
use reth_primitives_traits::RecoveredBlock;
Expand Down Expand Up @@ -720,8 +720,6 @@ where

#[derive(Debug, Serialize, Deserialize)]
struct FlashblocksMetadata {
receipts: HashMap<B256, <OpPrimitives as NodePrimitives>::Receipt>,
new_account_balances: HashMap<Address, U256>,
block_number: u64,
}

Expand Down Expand Up @@ -888,27 +886,11 @@ where
let new_transactions = info.executed_transactions[info.extra.last_flashblock_index..].to_vec();

let new_transactions_encoded =
new_transactions.clone().into_iter().map(|tx| tx.encoded_2718().into()).collect::<Vec<_>>();
new_transactions.into_iter().map(|tx| tx.encoded_2718().into()).collect::<Vec<_>>();

let new_receipts = info.receipts[info.extra.last_flashblock_index..].to_vec();
info.extra.last_flashblock_index = info.executed_transactions.len();
let receipts_with_hash = new_transactions
.iter()
.zip(new_receipts.iter())
.map(|(tx, receipt)| (tx.tx_hash(), receipt.clone()))
.collect::<HashMap<B256, OpReceipt>>();
let new_account_balances = state
.bundle_state
.state
.iter()
.filter_map(|(address, account)| account.info.as_ref().map(|info| (*address, info.balance)))
.collect::<HashMap<Address, U256>>();

let metadata: FlashblocksMetadata = FlashblocksMetadata {
receipts: receipts_with_hash,
new_account_balances,
block_number: ctx.parent().number + 1,
};
let metadata: FlashblocksMetadata =
FlashblocksMetadata { block_number: ctx.parent().number + 1 };

let (_, blob_gas_used) = ctx.blob_fields(info);

Expand Down
Loading