op-node: validate Espresso params against canonical per-chain file - #477
Open
philippecamacho wants to merge 1 commit into
Open
op-node: validate Espresso params against canonical per-chain file#477philippecamacho wants to merge 1 commit into
philippecamacho wants to merge 1 commit into
Conversation
Least Authority audit, Suggestion 5: espresso_time and batch_authenticator_address existed independently in the op-node runtime config (rollup.json) and as constants baked into the celo-kona proof program. If the two diverged, op-node and the fault-proof program would derive divergent outputs from the same inputs. Introduce op-node/rollup/celo_espresso_params.json as the canonical source of truth, keyed by L2 chain ID (Celo Mainnet, Sepolia, Chaos). The file is embedded into op-node and Config.Check() now rejects any rollup config whose Espresso parameters diverge from the canonical entry for its chain. Chains without a canonical entry (devnets, non-Celo chains) are unaffected. celo-kona mirrors the file byte-for-byte and asserts its baked constants match it, so scheduling Espresso on a chain requires updating both repositories deliberately and in lockstep. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses Least Authority audit Suggestion 5 (informational):
espresso_timeandbatch_authenticator_addressexisted independently in two places — read at runtime by op-node from rollup.json, and baked into the celo-kona proof program (crates/kona/proof/src/boot.rs). If they diverged, the two derivation pipelines would produce divergent outputs.Changes
op-node/rollup/celo_espresso_params.json— the canonical Espresso parameters keyed by L2 chain ID (Celo Mainnet 42220, Sepolia 11142220, Chaos 11162320).Config.Check(): a rollup config whoseespresso_time/batch_authenticator_addressdiverge from the canonical entry for its chain is rejected at startup (ErrCeloEspressoParamsMismatch). Chains without a canonical entry (devnets, non-Celo chains) are unaffected.The companion PR celo-org/celo-kona#261 mirrors the file byte-for-byte next to the proof program's baked constants and asserts they match, so scheduling Espresso on a chain requires a deliberate lockstep update of both repositories.
Testing
go test ./op-node/rollup/...passes.🤖 Generated with Claude Code