Skip to content

chain id#68

Open
lukeiannucci wants to merge 4 commits into
mainfrom
li/verify-chain-id
Open

chain id#68
lukeiannucci wants to merge 4 commits into
mainfrom
li/verify-chain-id

Conversation

@lukeiannucci

Copy link
Copy Markdown
Contributor

Closes #<ISSUE_NUMBER>

This PR:

This PR does not:

Key places to review:

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a ChainId field to the EspressoState struct and updates NewEspressoStore to accept a namespace parameter (representing the chain ID) to initialize this field. Additionally, both the Nitro and OP verifiers are updated to validate that the chain ID retrieved from the L2 client matches the ChainId stored in the state file. The review feedback highlights a critical backward compatibility issue where loading legacy state files (which lack chain_id) will result in a ChainId of 0, causing the verifier's check to fail and crash the proxy. To address this, the reviewer suggests a migration path in NewEspressoStore, along with a corresponding unit test and minor typo corrections in log messages.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread store/espresso_store.go
Comment thread store/espresso_store_test.go
Comment thread verifier/nitro/nitro_verifier.go
Comment thread verifier/op/op_verifier.go
lukeiannucci and others added 3 commits June 29, 2026 10:29
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@jjeangal jjeangal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm.

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.

2 participants