Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDepositOnlyBlock ¶
func BuildDepositOnlyBlock( logger log.Logger, cfg *rollup.Config, l2Cfg *params.ChainConfig, optimisticBlock *types.Block, l1Head common.Hash, agreedL2OutputRoot eth.Bytes32, l1Oracle l1.Oracle, l2Oracle l2.Oracle, ) (common.Hash, eth.Bytes32, error)
BuildDepositOnlyBlock builds a deposits-only block replacement for the specified optimistic block and returns the block hash and output root for the new block. The specified l2OutputRoot must be the output root of the optimistic block's parent.
Types ¶
type DerivationOptions ¶
type DerivationOptions struct { // StoreBlockData controls whether block data, including intermediate trie nodes from transactions and receipts // of the derived block should be stored in the l2.KeyValueStore. StoreBlockData bool }
type DerivationResult ¶
func RunDerivation ¶
func RunDerivation( logger log.Logger, cfg *rollup.Config, l2Cfg *params.ChainConfig, l1Head common.Hash, l2OutputRoot common.Hash, l2ClaimBlockNum uint64, l1Oracle l1.Oracle, l2Oracle l2.Oracle, db l2.KeyValueStore, options DerivationOptions, ) (DerivationResult, error)
RunDerivation executes the L2 state transition, given a minimal interface to retrieve data. Returns the L2BlockRef of the safe head reached and the output root at l2ClaimBlockNum or the final safe head when l1Head is reached if l2ClaimBlockNum is not reached. Derivation may stop prior to l1Head if the l2ClaimBlockNum has already been reached though this is not guaranteed.
Click to show internal directories.
Click to hide internal directories.