diff --git a/crates/ethereum-forks/src/forkid.rs b/crates/ethereum-forks/src/forkid.rs index ee4edb8bdf..0f2ff839b4 100644 --- a/crates/ethereum-forks/src/forkid.rs +++ b/crates/ethereum-forks/src/forkid.rs @@ -229,6 +229,10 @@ impl ForkFilter { forks.remove(&ForkFilterKey::Time(0)); forks.remove(&ForkFilterKey::Block(0)); + // Skip Fermat hardfork for opbnb + forks.remove(&ForkFilterKey::Time(1698991506)); + forks.remove(&ForkFilterKey::Time(1701151200)); + let forks = forks .into_iter() // filter out forks that are pre-genesis by timestamp diff --git a/crates/primitives/src/chain/spec.rs b/crates/primitives/src/chain/spec.rs index b68a63b816..301cafe9c4 100644 --- a/crates/primitives/src/chain/spec.rs +++ b/crates/primitives/src/chain/spec.rs @@ -526,6 +526,10 @@ pub static OPBNB_TESTNET: Lazy> = Lazy::new(|| { (Hardfork::Regolith, ForkCondition::Timestamp(0)), (Hardfork::PreContractForkBlock, ForkCondition::Block(5805494)), (Hardfork::Fermat, ForkCondition::Timestamp(1698991506)), + (Hardfork::Shanghai, ForkCondition::Timestamp(1715753400)), + (Hardfork::Canyon, ForkCondition::Timestamp(1715753400)), + (Hardfork::Cancun, ForkCondition::Timestamp(1715754600)), + (Hardfork::Ecotone, ForkCondition::Timestamp(1715754600)), ]), base_fee_params: BaseFeeParamsKind::Variable( vec![(Hardfork::London, BaseFeeParams::ethereum())].into(), @@ -963,6 +967,11 @@ impl ChainSpec { }) { let cond = ForkCondition::Timestamp(timestamp); if cond.active_at_head(head) { + // Skip Fermat hardfork for opbnb + if timestamp == 1698991506 || timestamp == 1701151200 { + continue; + } + if timestamp != current_applied { forkhash += timestamp; current_applied = timestamp;