derivation

package
v0.0.0-...-4547e52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2023 License: GPL-3.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBatchBuilder

func NewBatchBuilder(maxBatchSize uint64) (*batchBuilder, error)

maxBatchSize is a soft cap on the size of the batch (# of bytes).

Types

type BatchAttributes

type BatchAttributes struct {
	// contains filtered or unexported fields
}

func (*BatchAttributes) Contexts

func (a *BatchAttributes) Contexts() []*big.Int

func (*BatchAttributes) FirstL2BlockNumber

func (a *BatchAttributes) FirstL2BlockNumber() *big.Int

func (*BatchAttributes) TxBatch

func (a *BatchAttributes) TxBatch() []byte

func (*BatchAttributes) TxBatchVersion

func (a *BatchAttributes) TxBatchVersion() *big.Int

func (*BatchAttributes) TxLengths

func (a *BatchAttributes) TxLengths() []*big.Int

type DecodeTxBatchError

type DecodeTxBatchError struct {
	// contains filtered or unexported fields
}

func (*DecodeTxBatchError) Error

func (e *DecodeTxBatchError) Error() string

type DerivationBlock

type DerivationBlock struct {
	DerivationContext
	// contains filtered or unexported fields
}

`DerivationBlock` represents a block from which the L2 chain can be derived.

func BlocksFromData

func BlocksFromData(calldata []any) ([]DerivationBlock, error)

Decodes the input of `SequencerInbox.appendTxBatch` call

func NewDerivationBlock

func NewDerivationBlock(blockNumber, timestamp uint64, txs [][]byte) DerivationBlock

func (*DerivationBlock) BlockNumber

func (b *DerivationBlock) BlockNumber() uint64

func (*DerivationBlock) Timestamp

func (b *DerivationBlock) Timestamp() uint64

func (*DerivationBlock) Txs

func (b *DerivationBlock) Txs() [][]byte

type DerivationContext

type DerivationContext struct {
	// contains filtered or unexported fields
}

DerivationContext is the relevent context of each block sequenced to L1 SeqeuncerInbox to ensure deterministic recomputation.

func (*DerivationContext) BlockNumber

func (c *DerivationContext) BlockNumber() uint64

func (*DerivationContext) NumTxs

func (c *DerivationContext) NumTxs() uint64

func (*DerivationContext) Timestamp

func (c *DerivationContext) Timestamp() uint64

type HeaderRef

type HeaderRef interface {
	GetHash() common.Hash
	GetParentHash() common.Hash
}

type InvalidBlockError

type InvalidBlockError struct{ Msg string }

func (InvalidBlockError) Error

func (e InvalidBlockError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL