Add commit-reveal wrapper for loadL2Executions (MEV protection via CommittedExecutionLoader)#4
Open
e3o8o wants to merge 1 commit into
Open
Conversation
Add CommittedExecutionLoader — a commit-reveal scheme adapted from ENS name registration to prevent builder front-running of execution table submissions. Flow: 1. User computes commitment = hash(executions, proof, secret) 2. User submits opaque commitment on-chain 3. After MIN_COMMITMENT_AGE (1 block), user reveals and loads The contract enforces timing constraints (min 1 block, max 256 blocks) and forwards verified reveals to Rollups.loadL2Executions(). Note: In the current architecture the block builder typically constructs execution tables (since it requires knowing pending L1 state). This makes commit-reveal a stepping-stone for a future decentralized prover market where independent parties submit proven execution tables. Includes 15 tests covering: - Deterministic commitment generation - Commit/reveal lifecycle (success, too early, too late, wrong secret) - Replay protection (commitment consumed after reveal) - Builder front-running resistance - Multi-user independent commitments - Full flow: commit → reveal → cross-rollup execute
c6535ff to
a7497b2
Compare
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.
CommittedExecutionLoader is a commit-reveal scheme adapted from ENS name registration to prevent builder front-running of execution table submissions.
Flow:
The contract includes 15 tests that cover deterministic commitment generation, the C/R lifecycle, replay protection and the full flow commit → reveal → cross-rollup execute.
The contract enforces timing constraints (min 1 block, max 256 blocks) and forwards verified reveals to Rollups.loadL2Executions().
This implementation acknowledges that in the current architecture the block builder typically constructs execution tables (since it requires knowing pending L1 state). Thus, making commit-reveal a stepping-stone for a future decentralized prover market where independent parties submit proven execution tables. I expounded on the idea in https://ethresear.ch/t/synchronous-composability-between-rollups-via-realtime-proving/23998/22?u=e3o8o