Skip to content

Espresso 2a: derivation pipeline, kona#449

Draft
QuentinI wants to merge 1 commit into
celo-org:celo-rebase-17from
EspressoSystems:ag/kona-derivation-pipeline-upstream
Draft

Espresso 2a: derivation pipeline, kona#449
QuentinI wants to merge 1 commit into
celo-org:celo-rebase-17from
EspressoSystems:ag/kona-derivation-pipeline-upstream

Conversation

@QuentinI
Copy link
Copy Markdown

@QuentinI QuentinI commented May 28, 2026

Companion PR to #445: adds derivation pipeline scanning for batch authentication events, gated by Espresso hardfork.

…henticator

Companion to celo-org#445 (which lands the equivalent op-node
changes against celo-rebase-17).

Introduces an L1-origin-timestamp hardfork (espresso_time) gating all
post-fork derivation semantics. Pre-fork, derivation behaves exactly as
upstream Optimism: batches are accepted based on the L1 transaction
sender matching the SystemConfig batcher address. Post-fork, batches
are authenticated via BatchInfoAuthenticated(bytes32) events emitted by
the BatchAuthenticator contract, and sender-based authorization is
rejected.

The pipeline scans L1 receipts over a configurable lookback window
(DEFAULT_BATCH_AUTH_LOOKBACK_WINDOW = 100 blocks) to build the set of
authenticated batch commitment hashes for each L1 block being derived.
Results are cached in two reorg-safe (block-hash-keyed) LRU caches: one
for receipt-derived event sets, one for header parent-hash resolution.
For consecutive L1 blocks the lookback windows overlap, so only one new
block's receipts need to be fetched on each call.

New RollupConfig fields:
  - batch_authenticator_address: Option<Address>
  - batch_auth_lookback_window:  Option<u64>

New HardForkConfig field:
  - espresso_time: Option<u64>

New RollupConfig methods:
  - is_batch_auth_enabled
  - batch_auth_lookback_window (with DEFAULT_BATCH_AUTH_LOOKBACK_WINDOW fallback)
  - is_espresso_active (gated on L1 origin timestamp at the data-source layer)

Calldata and blob data sources gain a BatchAuthConfig and an
'espresso_active' branch that requires an event-based authentication
match; pre-fork their behaviour is unchanged.

Unit tests cover the event scanner, calldata/blob hash semantics,
post-fork authentication across calldata, blob, and altda data sources,
and pre-fork passthrough.

Co-authored-by: OpenCode <noreply@opencode.ai>
@QuentinI QuentinI changed the title feat(rust/kona/derive): event-based batch authentication via BatchAuthenticator Espresso 2a: derivation pipeline, kona May 28, 2026
@piersy
Copy link
Copy Markdown

piersy commented May 28, 2026

Hi @QuentinI these changes should be made in https://github.com/celo-org/celo-kona. Our approach to modifications for the rust stuff is to wrap elements from the upstream repos. For instance inside celo-kona we have the celo-reth implementation that depends on components from op-reth and reth but we don't actually modify those components at source, we wrap them or duplicate them (if we have to) in celo-kona.

@palango palango requested review from karlb and seolaoh June 2, 2026 09:23
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