Skip to content
Open
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
15 changes: 15 additions & 0 deletions crates/gravity-primitives/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ use std::sync::OnceLock;
/// gravity-audit#712.
pub const PIPE_BLOCK_GAS_LIMIT: u64 = 1_000_000_000;

/// Emergency EIP-7702 lockdown (gravity-audit#838). When `true`, `filter_invalid_txs`
/// additionally drops every type-4 (`SetCode`) tx (L1) and every tx from/to a currently-delegated
/// account (L2/L3), neutralising the 7702 nonce-bump executor-halt class until the durable
/// executor-skip fix ships.
///
/// This is a **compile-time constant on purpose**: like `PIPE_BLOCK_GAS_LIMIT` it is
/// consensus-critical (it changes which txs execute), so every node MUST agree on it. Baking it
/// into the binary makes that guarantee structural — a mixed value would fork the chain, and a
/// hardcoded const cannot be misconfigured per-node the way a CLI/env flag could.
///
/// Currently `true` — this build ships the lockdown ACTIVE. To REVERT, once the durable
/// executor-skip fix (gravity-reth #388 + grevm #110) is deployed and 7702 can be re-enabled,
/// set this back to `false` and rebuild (a coordinated upgrade, same as any binary version).
pub const EIP7702_LOCKDOWN: bool = true;

/// Configuration options for the Gravity Reth.
#[derive(Debug, Clone)]
pub struct Config {
Expand Down
4 changes: 3 additions & 1 deletion crates/gravity-primitives/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Common types in gravity-reth.

mod config;
pub use config::{get_gravity_config, init_gravity_config, Config, PIPE_BLOCK_GAS_LIMIT};
pub use config::{
get_gravity_config, init_gravity_config, Config, EIP7702_LOCKDOWN, PIPE_BLOCK_GAS_LIMIT,
};
1 change: 1 addition & 0 deletions crates/pipe-exec-layer-ext-v2/execute/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,7 @@ impl<Storage: GravityStorage> Core<Storage> {
&self.chain_spec,
block_timestamp,
block_number,
gravity_primitives::EIP7702_LOCKDOWN,
);
if invalid_idxs.is_empty() {
let mut txs_info = Vec::with_capacity(txs.len());
Expand Down
Loading
Loading