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
10 changes: 7 additions & 3 deletions Cargo.lock

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

149 changes: 0 additions & 149 deletions crates/evm/src/block/curie.rs

This file was deleted.

20 changes: 0 additions & 20 deletions crates/evm/src/block/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
//! - [`MorphBlockExecutor`]: The main block executor
//! - [`MorphBlockExecutorFactory`]: Factory for creating block executors
//! - [`MorphReceiptBuilder`]: Receipt construction for transactions
//! - Hardfork application logic (Curie, etc.)

pub(crate) mod curie;
mod factory;
mod receipt;

Expand All @@ -26,7 +24,6 @@ use alloy_evm::{
},
};
use alloy_primitives::{Address, U256};
use curie::apply_curie_hard_fork;
use morph_chainspec::{MorphChainSpec, MorphHardfork, MorphHardforks};
use morph_primitives::{MorphReceipt, MorphTxEnvelope};
use morph_revm::{L1_GAS_PRICE_ORACLE_ADDRESS, MorphHaltReason, TokenFeeInfo, evm::MorphContext};
Expand Down Expand Up @@ -224,13 +221,9 @@ where
/// 2. **L1 Gas Oracle Cache**: Loads the L1 Gas Price Oracle contract into the
/// account cache to optimize L1 fee calculations for all transactions
///
/// 3. **Curie Hardfork**: At the exact Curie activation block, applies the
/// hardfork state changes (updates to L1 Gas Price Oracle contract)
///
/// # Errors
/// Returns error if:
/// - L1 Gas Price Oracle account cannot be loaded
/// - Curie hardfork application fails at transition block
fn apply_pre_execution_changes(&mut self) -> Result<(), BlockExecutionError> {
// 1. Set state clear flag if the block is after the Spurious Dragon hardfork
let block_number: u64 = self.evm.block().number.to();
Expand All @@ -253,19 +246,6 @@ where
.morph_hardfork_at(block_number, self.evm.block().timestamp.to::<u64>());
self.hardfork = hardfork;

// 3. Apply Curie hardfork at the transition block
// Only executes once at the exact block where Curie activates
if self
.spec
.morph_fork_activation(MorphHardfork::Curie)
.transitions_at_block(block_number)
&& let Err(err) = apply_curie_hard_fork(self.evm.db_mut())
{
return Err(BlockExecutionError::msg(format!(
"error occurred at Curie fork: {err:?}"
)));
}

Ok(())
}

Expand Down
48 changes: 0 additions & 48 deletions crates/revm/src/l1block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,42 +85,10 @@ pub const GPO_BLOB_SCALAR_SLOT: U256 = U256::from_limbs([8, 0, 0, 0]);
/// Added in the Curie hardfork. Set to 1 (true) after Curie activation.
pub const GPO_IS_CURIE_SLOT: U256 = U256::from_limbs([9, 0, 0, 0]);

// =============================================================================
// L1 Gas Price Oracle Initial Values (for Curie hardfork)
// =============================================================================

/// The initial blob base fee used by the oracle contract at Curie activation.
pub const INITIAL_L1_BLOB_BASE_FEE: U256 = U256::from_limbs([1, 0, 0, 0]);

/// The initial commit scalar used by the oracle contract at Curie activation.
/// Reference: `rcfg.InitialCommitScalar` in go-ethereum (230759955285)
pub const INITIAL_COMMIT_SCALAR: U256 = U256::from_limbs([230759955285, 0, 0, 0]);

/// The initial blob scalar used by the oracle contract at Curie activation.
/// Reference: `rcfg.InitialBlobScalar` in go-ethereum (417565260)
pub const INITIAL_BLOB_SCALAR: U256 = U256::from_limbs([417565260, 0, 0, 0]);

/// Curie hardfork flag value (1 = true).
pub const IS_CURIE: U256 = U256::from_limbs([1, 0, 0, 0]);

/// Maximum L1 data fee cap for circuit compatibility.
/// Matches go-ethereum's `CalculateL1DataFee` cap in `rollup/fees/rollup_fee.go`.
const L1_FEE_CAP: U256 = U256::from_limbs([u64::MAX, 0, 0, 0]);

/// Storage updates for L1 gas price oracle Curie hardfork initialization.
///
/// These storage slots are initialized when the Curie hardfork activates:
/// - l1BlobBaseFee = 1
/// - commitScalar = InitialCommitScalar
/// - blobScalar = InitialBlobScalar
/// - isCurie = 1 (true)
pub const CURIE_L1_GAS_PRICE_ORACLE_STORAGE: [(U256, U256); 4] = [
(GPO_L1_BLOB_BASE_FEE_SLOT, INITIAL_L1_BLOB_BASE_FEE),
(GPO_COMMIT_SCALAR_SLOT, INITIAL_COMMIT_SCALAR),
(GPO_BLOB_SCALAR_SLOT, INITIAL_BLOB_SCALAR),
(GPO_IS_CURIE_SLOT, IS_CURIE),
];

// =============================================================================
// L1 Block Info
// =============================================================================
Expand Down Expand Up @@ -423,22 +391,6 @@ mod tests {
assert_eq!(cost, U256::ZERO);
}

#[test]
fn test_curie_oracle_storage_constants() {
assert_eq!(CURIE_L1_GAS_PRICE_ORACLE_STORAGE.len(), 4);
// Verify the 4 slots are the expected ones
assert_eq!(
CURIE_L1_GAS_PRICE_ORACLE_STORAGE[0].0,
GPO_L1_BLOB_BASE_FEE_SLOT
);
assert_eq!(
CURIE_L1_GAS_PRICE_ORACLE_STORAGE[1].0,
GPO_COMMIT_SCALAR_SLOT
);
assert_eq!(CURIE_L1_GAS_PRICE_ORACLE_STORAGE[2].0, GPO_BLOB_SCALAR_SLOT);
assert_eq!(CURIE_L1_GAS_PRICE_ORACLE_STORAGE[3].0, GPO_IS_CURIE_SLOT);
}

#[test]
fn test_gpo_storage_slot_ordering() {
// Slots should be sequential per the contract layout
Expand Down
6 changes: 0 additions & 6 deletions crates/revm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ pub use block::MorphBlockEnv;
pub use error::{MorphHaltReason, MorphInvalidTransaction};
pub use evm::MorphEvm;
pub use l1block::{
CURIE_L1_GAS_PRICE_ORACLE_STORAGE,
GPO_BLOB_SCALAR_SLOT,
GPO_COMMIT_SCALAR_SLOT,
GPO_IS_CURIE_SLOT,
Expand All @@ -69,11 +68,6 @@ pub use l1block::{
GPO_OWNER_SLOT,
GPO_SCALAR_SLOT,
GPO_WHITELIST_SLOT,
INITIAL_BLOB_SCALAR,
INITIAL_COMMIT_SCALAR,
// Curie initial values
INITIAL_L1_BLOB_BASE_FEE,
IS_CURIE,
L1_GAS_PRICE_ORACLE_ADDRESS,
L1BlockInfo,
};
Expand Down
3 changes: 3 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ ignore = [
"RUSTSEC-2026-0098",
# https://rustsec.org/advisories/RUSTSEC-2026-0099 rustls-webpki wildcard name constraints
"RUSTSEC-2026-0099",
# https://rustsec.org/advisories/RUSTSEC-2026-0105 core2 unmaintained, all versions yanked
# transitive dep of (likely) reth fork; no upstream replacement, can't `cargo update`
"RUSTSEC-2026-0105",
]

# This section is considered when running `cargo deny check bans`.
Expand Down
Loading