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

OP Deployer v0.0.11 generates incorrect L1 hash on Pectra networks #14683

Open
mslipper opened this issue Mar 6, 2025 · 0 comments
Open

OP Deployer v0.0.11 generates incorrect L1 hash on Pectra networks #14683

mslipper opened this issue Mar 6, 2025 · 0 comments
Assignees
Labels
A-op-deployer C-bug Category: bugs S-confirmed Status: A confirmed bug

Comments

@mslipper
Copy link
Collaborator

mslipper commented Mar 6, 2025

When deploying a chain to an L1 with Pectra activated, the L1 block hash emitted by op-deployer inspect rollup is incorrectly generated. For example, a chain starting at Sepolia block 7086425 has the hash 0xcd22aea81b468f56e781f099f2583575ec01819e87a01a18797bc8e460c7a2bb in the state file when the actual block hash is 0xe8b39adb6388ce828f4598aa95b32befe384da784539d9be53a2162a9e26afed

This is likely because we use Geth's ethclient library to fetch the start block header. ethclient returns a types.Header struct, which calculates the hash on-the-fly based on the consensus rules of the included Geth version. Instead, we need to perform a raw RPC call to eth_getHeaderByNumber and store the block number/hash directly in state. We can also use this as an opportunity to clean up the start by only storing the relevant fields in the state, i.e. hash and number.

This will need to be cherry-picked to the 0.0.x, 0.2.x, and develop lineages.

Reported by: Alchemy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-deployer C-bug Category: bugs S-confirmed Status: A confirmed bug
Projects
Status: Todo
Development

No branches or pull requests

2 participants