Closed Brechtpd closed 3 weeks ago
All the data we need is in the function inputs, but let's put the required data for the node also in events for now.
There are currently some 3rd party partners (e.g.: ENS) which require cross-state-roots on-chain for example. Or also some data which accounting for the chain height, etc.
The contract needs to store a single value: keccak(l1_blockhash, root). l1_blockhash is the L1 block up until we have proven everything. root is an opaque hash for some data that the prover will need internally that may also need to be exposed onchain)
Where is data related to L2 stored/validated or the link between a block under proving and a block proposed (already)? Like, why l1_blockhash is needed but l2 does not appear in your description above, something does not really add up in my head 😄. or the current_root and new_root refers to L2 world state root ?
This issue is stale because it has been open for 21 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.
Describe the feature
Core rollup smart contracts, without any fancy features for now.
Overview:
Onchain costs (completely independent of blocks now):
BasedOperator/TaikoL1 changes
proposeBlock
should not store or modify any state, we don't track anything onchain. We pretty much only put data onchain. All the data we need is in the function inputs, but let's put the required data for the node also in events for nowproveBlock
/verifyBlocks
and related functionality. We do not prove or verify blocks anymore here._isProposerPermitted
for now, but in theory can also be removed.BasedOperator
andTaikoL1
because they will be so small and simpleChainProver contract
proveBlock
in that this contract will have to verify multiple proofs by calling the verifier contractskeccak(l1_blockhash, root)
.l1_blockhash
is the L1 block up until we have proven everything.root
is an opaque hash for some data that the prover will need internally that may also need to be exposed onchain)keccak(keccak(current_l1_blockhash, current_root), keccak(new_l1_blockhash, new_root))
keccak(current_l1_blockhash, current_root)
is the value stored in the contractnew_l1_blockhash
needs to be validated, needs to be one of the blockhashes available in the EVM through blockhash(new_l1_block_number) so we know it's a valid one.keccak(new_l1_blockhash, new_root)
is stored in the smart contract, overwriting the old value.Additional context
No response