-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Optimism Derivation Proof Composition #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look at it one last time when all the sub-PRs are merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create the issues we discussed, but other than that, let's finally merge this beast!
OP Composition
This PR introduces the proof composition program for optimism block derivation. The goal of this composition is to stitch together sequential optimism block derivation proofs into a single composed proofs about the contiguous chain of optimism blocks.
Input
The input given to the composition predicate consists of:
Operations
The composer can be asked to perform any one of four possible operations, described below.
Join
The join operation is where the stitching logic happens. Joining can only succeed if:
The first condition is checked during the join operation, while the second condition is already validated during the pre-requisite “lift” operation using the
eth_chain_root
.Lift
Lifting converts a block derivation proof into an equivalent proof, only after verifying that the last ethereum block read during derivation belongs to the continuous chain committed to under
eth_chain_root
. This is done using a merkle inclusion proof.Preparation
This operation takes as input a chain of ethereum blocks and inserts them into a Merkle-tree, resulting in a composition statement about an
eth_chain_root
value. This operation can also be performed incrementally when given a Merkle mountain range (and corresponding proof) as input if the ethereum chain is too large for one session.Finish
Finalization takes as input a composition “preparation” proof about the merkle root
eth_chain_root
, asserting its commitment to a continuous chain of ethereum blocks, and a composition “aggregation” proof about the derivation of a series of op-blocks from the ethereum blocks undereth_chain_root
.