Skip to content

Commit

Permalink
Add Fjord timestamp conditions to OP+Base Mainnet+Sepolia (#8645)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianBland authored Jun 6, 2024
1 parent 49c8c96 commit 827e081
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions crates/primitives/src/chain/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ pub static OP_MAINNET: Lazy<Arc<ChainSpec>> = Lazy::new(|| {
(Hardfork::Canyon, ForkCondition::Timestamp(1704992401)),
(Hardfork::Cancun, ForkCondition::Timestamp(1710374401)),
(Hardfork::Ecotone, ForkCondition::Timestamp(1710374401)),
(Hardfork::Fjord, ForkCondition::Timestamp(1720627201)),
]),
base_fee_params: BaseFeeParamsKind::Variable(
vec![
Expand Down Expand Up @@ -342,6 +343,7 @@ pub static OP_SEPOLIA: Lazy<Arc<ChainSpec>> = Lazy::new(|| {
(Hardfork::Canyon, ForkCondition::Timestamp(1699981200)),
(Hardfork::Cancun, ForkCondition::Timestamp(1708534800)),
(Hardfork::Ecotone, ForkCondition::Timestamp(1708534800)),
(Hardfork::Fjord, ForkCondition::Timestamp(1716998400)),
]),
base_fee_params: BaseFeeParamsKind::Variable(
vec![
Expand Down Expand Up @@ -391,6 +393,7 @@ pub static BASE_SEPOLIA: Lazy<Arc<ChainSpec>> = Lazy::new(|| {
(Hardfork::Canyon, ForkCondition::Timestamp(1699981200)),
(Hardfork::Cancun, ForkCondition::Timestamp(1708534800)),
(Hardfork::Ecotone, ForkCondition::Timestamp(1708534800)),
(Hardfork::Fjord, ForkCondition::Timestamp(1716998400)),
]),
base_fee_params: BaseFeeParamsKind::Variable(
vec![
Expand Down Expand Up @@ -440,6 +443,7 @@ pub static BASE_MAINNET: Lazy<Arc<ChainSpec>> = Lazy::new(|| {
(Hardfork::Canyon, ForkCondition::Timestamp(1704992401)),
(Hardfork::Cancun, ForkCondition::Timestamp(1710374401)),
(Hardfork::Ecotone, ForkCondition::Timestamp(1710374401)),
(Hardfork::Fjord, ForkCondition::Timestamp(1720627201)),
]),
base_fee_params: BaseFeeParamsKind::Variable(
vec![
Expand Down Expand Up @@ -2366,7 +2370,15 @@ Post-merge hard forks (timestamp based):
),
(
Head { number: 0, timestamp: 1710374401, ..Default::default() },
ForkId { hash: ForkHash([0x51, 0xcc, 0x98, 0xb3]), next: 0 },
ForkId { hash: ForkHash([0x51, 0xcc, 0x98, 0xb3]), next: 1720627201 },
),
(
Head { number: 0, timestamp: 1720627200, ..Default::default() },
ForkId { hash: ForkHash([0x51, 0xcc, 0x98, 0xb3]), next: 1720627201 },
),
(
Head { number: 0, timestamp: 1720627201, ..Default::default() },
ForkId { hash: ForkHash([0xe4, 0x01, 0x0e, 0xb9]), next: 0 },
),
],
);
Expand Down Expand Up @@ -2396,7 +2408,15 @@ Post-merge hard forks (timestamp based):
),
(
Head { number: 0, timestamp: 1708534800, ..Default::default() },
ForkId { hash: ForkHash([0xcc, 0x17, 0xc7, 0xeb]), next: 0 },
ForkId { hash: ForkHash([0xcc, 0x17, 0xc7, 0xeb]), next: 1716998400 },
),
(
Head { number: 0, timestamp: 1716998399, ..Default::default() },
ForkId { hash: ForkHash([0xcc, 0x17, 0xc7, 0xeb]), next: 1716998400 },
),
(
Head { number: 0, timestamp: 1716998400, ..Default::default() },
ForkId { hash: ForkHash([0x54, 0x0a, 0x8c, 0x5d]), next: 0 },
),
],
);
Expand All @@ -2415,7 +2435,7 @@ Post-merge hard forks (timestamp based):
// TODO: complete these, see https://github.com/paradigmxyz/reth/issues/8012
(
Head { number: 105235063, timestamp: 1710374401, ..Default::default() },
ForkId { hash: ForkHash([0x19, 0xda, 0x4c, 0x52]), next: 0 },
ForkId { hash: ForkHash([0x19, 0xda, 0x4c, 0x52]), next: 1720627201 },
),
],
);
Expand Down Expand Up @@ -2445,7 +2465,15 @@ Post-merge hard forks (timestamp based):
),
(
Head { number: 0, timestamp: 1708534800, ..Default::default() },
ForkId { hash: ForkHash([0xbe, 0x96, 0x9b, 0x17]), next: 0 },
ForkId { hash: ForkHash([0xbe, 0x96, 0x9b, 0x17]), next: 1716998400 },
),
(
Head { number: 0, timestamp: 1716998399, ..Default::default() },
ForkId { hash: ForkHash([0xbe, 0x96, 0x9b, 0x17]), next: 1716998400 },
),
(
Head { number: 0, timestamp: 1716998400, ..Default::default() },
ForkId { hash: ForkHash([0x4e, 0x45, 0x7a, 0x49]), next: 0 },
),
],
);
Expand Down Expand Up @@ -3303,7 +3331,7 @@ Post-merge hard forks (timestamp based):
#[test]
fn latest_base_mainnet_fork_id() {
assert_eq!(
ForkId { hash: ForkHash([0x51, 0xcc, 0x98, 0xb3]), next: 0 },
ForkId { hash: ForkHash([0xe4, 0x01, 0x0e, 0xb9]), next: 0 },
BASE_MAINNET.latest_fork_id()
)
}
Expand Down

0 comments on commit 827e081

Please sign in to comment.