Skip to content

op-node: validate Espresso params against canonical per-chain file - #477

Open
philippecamacho wants to merge 1 commit into
celo-rebase-18from
espresso/canonical-espresso-params
Open

op-node: validate Espresso params against canonical per-chain file#477
philippecamacho wants to merge 1 commit into
celo-rebase-18from
espresso/canonical-espresso-params

Conversation

@philippecamacho

@philippecamacho philippecamacho commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Addresses Least Authority audit Suggestion 5 (informational): espresso_time and batch_authenticator_address existed 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

  • Add op-node/rollup/celo_espresso_params.json — the canonical Espresso parameters keyed by L2 chain ID (Celo Mainnet 42220, Sepolia 11142220, Chaos 11162320).
  • Embed it into op-node and validate in Config.Check(): a rollup config whose espresso_time / batch_authenticator_address diverge from the canonical entry for its chain is rejected at startup (ErrCeloEspressoParamsMismatch). Chains without a canonical entry (devnets, non-Celo chains) are unaffected.
  • Unit tests pin the parsed canonical content and cover match/mismatch cases per chain.

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

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>
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.

1 participant