Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: complete optimism mainnet forkid tests #8114

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
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
4 changes: 4 additions & 0 deletions crates/ethereum-forks/src/hardfork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ pub enum Hardfork {
/// <https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md#canyon>.
#[cfg(feature = "optimism")]
Canyon,
/// Delta:
/// https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md#delta
#[cfg(feature = "optimism")]
Delta,
Comment on lines +65 to +68
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this still needs to be removed

// ArbOS11,
/// Cancun.
Cancun,
Expand Down
49 changes: 48 additions & 1 deletion crates/primitives/src/chain/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,54 @@ Post-merge hard forks (timestamp based):
Head { number: 0, ..Default::default() },
ForkId { hash: ForkHash([0xca, 0xf5, 0x17, 0xed]), next: 3950000 },
),
// TODO: complete these, see https://github.com/paradigmxyz/reth/issues/8012
// Berlin
(
Head { number: 3950000, ..Default::default() },
ForkId { hash: ForkHash([0x52, 0x6a, 0x21, 0x71]), next: 105235063 },
),
// London
(
Head { number: 105235063, ..Default::default() },
ForkId { hash: ForkHash([0xe3, 0x39, 0x8d, 0x7c]), next: 1704992401 },
),
// Arrow Glacier
(
Head { number: 105235063, ..Default::default() },
ForkId { hash: ForkHash([0xe3, 0x39, 0x8d, 0x7c]), next: 1704992401 },
),
// Grey Glacier
(
Head { number: 105235063, ..Default::default() },
ForkId { hash: ForkHash([0xe3, 0x39, 0x8d, 0x7c]), next: 1704992401 },
),
// Paris
(
Head { number: 105235063, ..Default::default() },
ForkId { hash: ForkHash([0xe3, 0x39, 0x8d, 0x7c]), next: 1704992401 },
),
// Bedrock
(
Head { number: 105235063, ..Default::default() },
ForkId { hash: ForkHash([0xe3, 0x39, 0x8d, 0x7c]), next: 1704992401 },
),
// Shanghai
(
Head { number: 105235063, timestamp: 1704992401, ..Default::default() },
ForkId { hash: ForkHash([0xbd, 0xd4, 0xfd, 0xb2]), next: 1710374401 },
),
Comment on lines +2326 to +2360
Copy link
Member

@Rjected Rjected May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's just use op-specific hardforks, I am realizing these are not super useful

// OP activation timestamps
// https://specs.optimism.io/protocol/superchain-upgrades.html#activation-timestamps
// Canyon
(
Head { number: 105235063, timestamp: 1704992401, ..Default::default() },
ForkId { hash: ForkHash([0xbd, 0xd4, 0xfd, 0xb2]), next: 1710374401 },
),
// Cancun
(
Head { number: 105235063, timestamp: 1710374401, ..Default::default() },
ForkId { hash: ForkHash([0x19, 0xda, 0x4c, 0x52]), next: 0 },
),
// Ecotone
(
Head { number: 105235063, timestamp: 1710374401, ..Default::default() },
ForkId { hash: ForkHash([0x19, 0xda, 0x4c, 0x52]), next: 0 },
Expand Down
Loading