Skip to content

Commit c72709b

Browse files
authored
feat: add handling for eip-7623 in builder and pvg calc (#1126)
1 parent 479a561 commit c72709b

File tree

25 files changed

+588
-197
lines changed

25 files changed

+588
-197
lines changed

bin/rundler/chain_specs/base_sepolia.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ id = 84532
55

66
min_max_priority_fee_per_gas = 100000
77
block_gas_limit = 60000000
8+
calldata_floor_zero_byte_gas = 10
9+
calldata_floor_non_zero_byte_gas = 40

bin/rundler/chain_specs/ethereum_sepolia.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ id = 11155111
66
flashbots_relay_url = "https://relay-sepolia.flashbots.net"
77

88
min_max_priority_fee_per_gas = 100000000
9+
calldata_floor_zero_byte_gas = 10
10+
calldata_floor_non_zero_byte_gas = 40

bin/rundler/chain_specs/optimism_sepolia.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ base = "optimism"
22

33
name = "Optimism Sepolia"
44
id = 11155420
5+
calldata_floor_zero_byte_gas = 10
6+
calldata_floor_non_zero_byte_gas = 40

bin/rundler/src/cli/builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ impl BuilderArgs {
287287
da_gas_tracking_enabled,
288288
provider_client_timeout_seconds,
289289
max_expected_storage_slots: common.max_expected_storage_slots.unwrap_or(usize::MAX),
290+
verification_gas_limit_efficiency_reject_threshold: common
291+
.verification_gas_limit_efficiency_reject_threshold,
290292
chain_spec,
291293
})
292294
}

bin/rundler/src/cli/mod.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,22 @@ pub struct CommonArgs {
374374
)]
375375
pre_verification_gas_accept_percent: u32,
376376

377+
#[arg(
378+
long = "execution_gas_limit_efficiency_reject_threshold",
379+
name = "execution_gas_limit_efficiency_reject_threshold",
380+
env = "EXECUTION_GAS_LIMIT_EFFICIENCY_REJECT_THRESHOLD",
381+
default_value = "0.0"
382+
)]
383+
pub execution_gas_limit_efficiency_reject_threshold: f64,
384+
385+
#[arg(
386+
long = "verification_gas_limit_efficiency_reject_threshold",
387+
name = "verification_gas_limit_efficiency_reject_threshold",
388+
env = "VERIFICATION_GAS_LIMIT_EFFICIENCY_REJECT_THRESHOLD",
389+
default_value = "0.0"
390+
)]
391+
pub verification_gas_limit_efficiency_reject_threshold: f64,
392+
377393
#[arg(
378394
long = "mempool_config_path",
379395
name = "mempool_config_path",
@@ -527,6 +543,8 @@ impl TryFromWithSpec<&CommonArgs> for EstimationSettings {
527543
max_paymaster_post_op_gas: max_bundle_execution_gas,
528544
max_bundle_execution_gas,
529545
verification_estimation_gas_fee: value.verification_estimation_gas_fee,
546+
verification_gas_limit_efficiency_reject_threshold: value
547+
.verification_gas_limit_efficiency_reject_threshold,
530548
})
531549
}
532550
}
@@ -547,6 +565,8 @@ impl TryFromWithSpec<&CommonArgs> for PrecheckSettings {
547565
)?,
548566
base_fee_accept_percent: value.base_fee_accept_percent,
549567
pre_verification_gas_accept_percent: value.pre_verification_gas_accept_percent,
568+
verification_gas_limit_efficiency_reject_threshold: value
569+
.verification_gas_limit_efficiency_reject_threshold,
550570
})
551571
}
552572
}

bin/rundler/src/cli/pool.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,6 @@ pub struct PoolArgs {
169169
)]
170170
pub drop_min_num_blocks: u64,
171171

172-
#[arg(
173-
long = "pool.gas_limit_efficiency_reject_threshold",
174-
name = "pool.gas_limit_efficiency_reject_threshold",
175-
env = "POOL_GAS_LIMIT_EFFICIENCY_REJECT_THRESHOLD",
176-
default_value = "0.0"
177-
)]
178-
pub gas_limit_efficiency_reject_threshold: f32,
179-
180172
#[arg(
181173
long = "pool.max_time_in_pool_secs",
182174
name = "pool.max_time_in_pool_secs",
@@ -240,7 +232,10 @@ impl PoolArgs {
240232
reputation_tracking_enabled: self.reputation_tracking_enabled,
241233
drop_min_num_blocks: self.drop_min_num_blocks,
242234
da_gas_tracking_enabled,
243-
gas_limit_efficiency_reject_threshold: self.gas_limit_efficiency_reject_threshold,
235+
execution_gas_limit_efficiency_reject_threshold: common
236+
.execution_gas_limit_efficiency_reject_threshold,
237+
verification_gas_limit_efficiency_reject_threshold: common
238+
.verification_gas_limit_efficiency_reject_threshold,
244239
max_time_in_pool: self.max_time_in_pool_secs.map(Duration::from_secs),
245240
max_expected_storage_slots: common.max_expected_storage_slots.unwrap_or(usize::MAX),
246241
support_7702: self.support_7702,

0 commit comments

Comments
 (0)