Skip to content

fix(op-reth): detect reth storage layout in InitializationJob#20396

Open
dhyaniarun1993 wants to merge 3 commits intoethereum-optimism:developfrom
ChainSafe:fix/proofs-init-v1-storage-panic
Open

fix(op-reth): detect reth storage layout in InitializationJob#20396
dhyaniarun1993 wants to merge 3 commits intoethereum-optimism:developfrom
ChainSafe:fix/proofs-init-v1-storage-panic

Conversation

@dhyaniarun1993
Copy link
Copy Markdown
Contributor

@dhyaniarun1993 dhyaniarun1993 commented Apr 28, 2026

Description

Running op-reth proofs init on a production OP Mainnet node (synced before reth introduced v2 packed storage) panics with:

index out of bounds: the len is 1 but the index is 32
The panic is in PackedStoredNibbles::from_compact, which always reads buf[32] as the nibble count. On v1-storage nodes, AccountsTrie keys are variable-length (1 nibble per byte, 1–64 bytes). A 1-nibble path is 1 byte — indexing buf[32] panics.

Tests

Tested v1 in op mainnet
v2 is being tested in e2e

Additional context

NA

Metadata

@dhyaniarun1993 dhyaniarun1993 requested a review from a team as a code owner April 28, 2026 17:19
@dhyaniarun1993 dhyaniarun1993 force-pushed the fix/proofs-init-v1-storage-panic branch from 2e5c927 to 53ac22a Compare April 29, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

op-reth: proofs init panics on nodes synced with reth v1 storage format

1 participant