Skip to content

Espresso derivation pipeline#206

Draft
QuentinI wants to merge 3 commits into
celo-org:mainfrom
EspressoSystems:espresso-batch-auth-kona
Draft

Espresso derivation pipeline#206
QuentinI wants to merge 3 commits into
celo-org:mainfrom
EspressoSystems:espresso-batch-auth-kona

Conversation

@QuentinI

@QuentinI QuentinI commented Jun 4, 2026

Copy link
Copy Markdown

Rust counterpart of celo-org/optimism#445
Most edits are direct copies of kona types for visibility reasons, actually new code is crates/kona/derive/src/batch_auth.rs, authentication path added to crates/kona/derive/src/blobs.rs and config added to crates/kona/genesis/src/rollup.rs
Needs a hokulea change to allow EigenDA data source to use the non-standard L1 data source introduce here

@QuentinI QuentinI changed the title Add Espresso event-based batch authentication Espresso derivation pipeline Jun 4, 2026
Add the `celo-derive` crate implementing the Rust (kona) companion to the
op-node Espresso batch-authentication changes (celo-org/optimism#445),
relocated from the vendored-kona PR celo-org/optimism#449 to follow
celo-kona's wrap/duplicate-don't-patch model.

Post-fork, batches are authorized by scanning L1 receipts for
`BatchInfoAuthenticated` events from the configured `BatchAuthenticator`
contract within a lookback window, instead of by transaction sender.
Pre-fork (or when the fork is not yet active) derivation is byte-identical
to upstream OP Stack.

- `CeloEthereumDataSource` / `CeloCalldataSource` / `CeloBlobSource`:
  duplicates of kona's data sources with the auth branch folded in
  (kona's `CalldataSource`/`BlobSource`/`BlobData` internals are
  `pub(crate)` and cannot be wrapped).
- `BatchAuthConfig` bundles the authenticator address, fork time and
  lookback window so the "fork scheduled but no authenticator" state is
  unrepresentable; `CeloRollupConfig::batch_auth_params` validates it and
  hard-errors on misconfiguration (otherwise derivation would silently
  stall at the fork boundary).
- `CeloRollupConfig` gains the Espresso settings (parsed from the same
  rollup.json) and `CeloBootInfo` carries them through boot.
- Point the hokulea git dep at celo-org/hokulea fccc98c (celo-org/hokulea#2),
  which generalizes `EigenDADataSource` over `DataAvailabilityProvider` so
  the eigenda path can wrap `CeloEthereumDataSource`.

Co-authored-by: OpenCode <noreply@opencode.ai>
QuentinI and others added 2 commits June 8, 2026 20:58
Make the batch-auth lookback window a hardcoded consensus constant rather
than a per-chain configurable value, mirroring op-node PR #445. A
per-node-configurable lookback would let nodes derive different chains (a
consensus split risk).

- Rename DEFAULT_BATCH_AUTH_LOOKBACK_WINDOW to BATCH_AUTH_LOOKBACK_WINDOW
- Remove the batch_auth_lookback_window config field, its serde parsing,
  the getter, and the new() initializer
- Change batch_auth_params() to return a 2-tuple (drop lookback element)
- Drop lookback_window from BatchAuthConfig; reference the const directly
- BatchAuthCache::new() takes no argument, sizing via the const

Co-authored-by: OpenCode <noreply@opencode.ai>
…nding

Update the BatchInfoAuthenticated event to the new shape
BatchInfoAuthenticated(bytes32 commitment, address indexed caller), reading
the commitment from the unindexed data word and the caller from Topics[1].

Enforce caller-binding post-fork: a batch is authorized iff its commitment is
authenticated AND the batch tx's recovered L1 sender equals the caller that
emitted the auth event, preventing batch-replay across batchers. On duplicate
authentication within the lookback window, the newest event's caller wins.

Change the authenticated-set tracking from BTreeSet<B256> to
BTreeMap<B256, Address> throughout batch_auth, calldata, and blobs.

Co-authored-by: OpenCode <noreply@opencode.ai>
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