Modifications to Original L2OutputOracle
The original L2OutputOracle
contract can be found here.
The changes introduced in the OPSuccinctL2OutputOracle
contract are:
- The
submissionInterval
parameter is now the minimum interval in L2 blocks at which checkpoints must be submitted. An aggregation proof can be posted after this interval has passed. - The addition of the
aggregationVkey
,rangeVkeyCommitment
,verifier
,startingOutputRoot
, androllupConfigHash
parameters.startingOutputRoot
is used for initalizing the contract from an empty state, becauseop-succinct
requires a starting output root from which to prove the next state root. The other parameters are used for verifying the proofs posted to the contract. - The addition of
historicBlockHashes
to store the L1 block hashes which theop-succinct
proofs are anchored to. Whenever a proof is posted, the merkle proof verification will use these L1 block hashes to verify the state of the L2 which is posted as blobs or calldata to the L1. - The new
checkpointBlockHash
function which checkpoints the L1 block hash at a given L1 block number using theblockhash
function. - The
proposeL2Output
function now takes an additional_proof
parameter, which is the proof that is posted to the contract, and removes the unnecessary_l1BlockHash
parameter (which is redundant given thehistoricBlockHashes
mapping). This function also verifies the proof using theISP1VerifierGateway
contract. - Use an
initializerVersion
constant to track the "upgrade", rather than just the semantic version of theOPSuccinctL2OutputOracle
contract.