Skip to content

Commit 6a92aa5

Browse files
committed
feat: payload size limit configurable
1 parent e721a7a commit 6a92aa5

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

crates/chain-orchestrator/src/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@ pub(crate) struct BlockBuildingMetric {
128128
pub(crate) gas_per_block: Histogram,
129129
/// The gas throughput in gas/second.
130130
pub(crate) gas_per_second: Histogram,
131-
/// The cumulative gas used across all committed blocks (similar to geth's miner/commit_gas).
131+
/// The cumulative gas used across all committed blocks (similar to geth's `miner/commit_gas`).
132132
pub(crate) commit_gas: Counter,
133133
}

crates/node/src/add_ons/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! The [`ScrollRollupNodeAddOns`] implementation for the Scroll rollup node.
22
33
use super::args::ScrollRollupNodeConfig;
4-
use crate::constants;
54

65
use reth_evm::{ConfigureEngineEvm, EvmFactory, EvmFactoryFor};
76
use reth_network::NetworkProtocols;
@@ -80,7 +79,7 @@ where
8079
.with_min_suggested_priority_fee(
8180
config.gas_price_oracle_args.default_suggested_priority_fee,
8281
)
83-
.with_payload_size_limit(constants::DEFAULT_PAYLOAD_SIZE_LIMIT)
82+
.with_payload_size_limit(config.sequencer_args.payload_size_limit)
8483
.with_sequencer(config.network_args.sequencer_url.clone()),
8584
ScrollEngineValidatorBuilder::default(),
8685
BasicEngineApiBuilder::default(),

crates/node/src/args.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,9 @@ pub struct SequencerArgs {
735735
/// The payload building duration for the sequencer (milliseconds)
736736
#[arg(long = "sequencer.payload-building-duration", id = "sequencer_payload_building_duration", value_name = "SEQUENCER_PAYLOAD_BUILDING_DURATION", default_value_t = constants::DEFAULT_PAYLOAD_BUILDING_DURATION)]
737737
pub payload_building_duration: u64,
738+
/// The payload size limit for the sequencer (bytes)
739+
#[arg(long = "sequencer.payload-size-limit", id = "sequencer_payload_size_limit", value_name = "SEQUENCER_PAYLOAD_SIZE_LIMIT", default_value_t = constants::DEFAULT_PAYLOAD_SIZE_LIMIT)]
740+
pub payload_size_limit: u64,
738741
/// The fee recipient for the sequencer.
739742
#[arg(long = "sequencer.fee-recipient", id = "sequencer_fee_recipient", value_name = "SEQUENCER_FEE_RECIPIENT", default_value_t = SCROLL_FEE_VAULT_ADDRESS)]
740743
pub fee_recipient: Address,

crates/node/src/test_utils/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub use network_helpers::{
7878
use crate::{
7979
BlobProviderArgs, ChainOrchestratorArgs, ConsensusArgs, EngineDriverArgs, L1ProviderArgs,
8080
PprofArgs, RollupNodeDatabaseArgs, RollupNodeNetworkArgs, RpcArgs, ScrollRollupNode,
81-
ScrollRollupNodeConfig, SequencerArgs,
81+
ScrollRollupNodeConfig, SequencerArgs, constants,
8282
};
8383
use alloy_primitives::Bytes;
8484
use reth_chainspec::EthChainSpec;
@@ -274,6 +274,7 @@ pub fn default_sequencer_test_scroll_rollup_node_config() -> ScrollRollupNodeCon
274274
l1_message_inclusion_mode: L1MessageInclusionMode::BlockDepth(0),
275275
allow_empty_blocks: true,
276276
max_l1_messages: None,
277+
payload_size_limit: constants::DEFAULT_PAYLOAD_SIZE_LIMIT,
277278
},
278279
blob_provider_args: BlobProviderArgs { mock: true, ..Default::default() },
279280
signer_args: Default::default(),

0 commit comments

Comments
 (0)