Espresso derivation pipeline#206
Draft
QuentinI wants to merge 3 commits into
Draft
Conversation
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>
1fcb396 to
8fffde6
Compare
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>
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.
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 tocrates/kona/derive/src/blobs.rsand config added tocrates/kona/genesis/src/rollup.rsNeeds a hokulea change to allow EigenDA data source to use the non-standard L1 data source introduce here