Espresso: drop dead calldata-source authentication + guard espresso_time >= ecotone_time#466
Merged
Merged
Conversation
8e698ef to
be91044
Compare
The calldata data source is only reached pre-ecotone: OpenData routes to the blob source whenever ecotone is active (ref.Time >= ecotone_time). Every Celo chain sets ecotone_time = 0, and Espresso (espresso_time) activates strictly later, so the Espresso event-based batch-authentication branch that #457 folded into DataFromEVMTransactions could never fire on a real chain. Restore the calldata data source to its pre-Espresso form. calldata_source.go is byte-identical to before #457; #457 had split isValidBatchTx into a type/To-only check plus isAuthorizedBatchSender to serve the blob source's event-based path, which rippled a needless change into the calldata source. Reinstate the original 5-arg isValidBatchTx (composed from isBatchTxToInbox + isAuthorizedBatchSender) and point the blob source at isBatchTxToInbox. calldata_source_test.go is also restored except for one line: DataSourceConfig gained fields (rollupCfg, batchAuthCaches), so its literal must use named fields instead of positional. The blob source keeps Espresso event-based authentication and also handles plain calldata-carrying batcher txs post-ecotone, so no behaviour is lost. Delete the now-dead Espresso calldata test and move its shared mockAuthEvents helper into the blob data source test, its only user. Mirrors the celo-kona removal (drop CeloCalldataSource, use upstream CalldataSource).
Dropping the Espresso-aware calldata source made "espresso_time >= ecotone_time" a silent correctness invariant: Espresso event-based authentication now lives only on the post-ecotone blob path, so a block in the [espresso_time, ecotone_time) window would route to the pre-ecotone calldata source and silently fall back to sender-based authorization. Guard the invariant in Config.Check(): error with ErrEspressoBeforeEcotone when espresso_time is set but ecotone_time is unset or scheduled later than espresso_time. Every real Celo chain sets ecotone_time = 0, so this only fires on a misconfiguration -- but now it fails fast instead of corrupting derivation. Mirrors the celo-kona validate_espresso guard (EspressoBeforeEcotone).
be91044 to
1e5dde9
Compare
lukeiannucci
approved these changes
Jul 2, 2026
lukeiannucci
left a comment
Collaborator
There was a problem hiding this comment.
This all seems good to me! May also be nice for Paul to take a pass
- add mixed-block and multi-commitment subtests to TestDataAndHashesFromTxsEventAuth, restoring per-tx commitment matching coverage lost with espresso_calldata_source_test.go - drop stale comment reference to the deleted TestDataFromEVMTransactionsForkBoundary - reuse u64ptr instead of a local ptr closure in TestConfig_Check_EspressoBeforeEcotone
palango
approved these changes
Jul 3, 2026
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.
Summary
Follow-up to #457. Removes the Espresso-specific batch-authentication code that #457 folded into the calldata data source, and adds a genesis-config guard that keeps the removal safe.
This is the Go-side counterpart to the celo-kona changes:
refactor(derive): drop dead Espresso calldata source, use upstream CalldataSource(celo-kona332d6d2)feat(genesis): reject espresso_time scheduled before ecotone_time(celo-konab02f68b)Why the calldata Espresso path is dead
DataSourceFactory.OpenDataroutes to the blob source whenever ecotone is active (ref.Time >= ecotone_time) and to the calldata source only pre-ecotone. Every Celo chain setsecotone_time = 0, and Espresso (espresso_time) activates strictly later, so:IsEspresso(ref.Time)true ⟹ ecotone active ⟹ blob source selected.[espresso_time, ecotone_time)where the calldata source could see an Espresso-active block is empty.So the
if IsEspresso { CollectAuthenticatedBatches }branch insideDataFromEVMTransactionscould never fire on a real chain. The blob source already handles calldata txs post-ecotone and retains full Espresso event-based authentication, so no behaviour is lost.Changes
1. Drop the dead Espresso calldata path (
refactor)DataFromEVMTransactions/CalldataSourcerevert to the upstream sender-based path:isValidBatchTx+isAuthorizedBatchSender, no lookback-window event scan,fetcherback toL1TransactionFetcher.espresso_calldata_source_test.go(tested an unreachable path); relocate its sharedmockAuthEventshelper toespresso_batch_authenticator_test.go.2. Guard
espresso_time >= ecotone_time(feat)espresso_time >= ecotone_timea silent correctness invariant.Config.Check()now returnsErrEspressoBeforeEcotonewhenespresso_timeis set butecotone_timeis unset or later — failing fast instead of silently bypassing event-based authorization for blocks in[espresso_time, ecotone_time).ecotone_time = 0, so this only ever fires on a misconfiguration.Testing
go build ./op-node/...,go vet,gofmtclean.go test ./op-node/rollup/... ./op-node/rollup/derive/...pass, including the newTestConfig_Check_EspressoBeforeEcotoneand the existing blob/altDA/batch-authenticator suites (which exercise the relocatedmockAuthEvents).