core

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthenticatedSender

func GetAuthenticatedSender(chainID int64, tx *types.Transaction) (*gethcommon.Address, error)

GetAuthenticatedSender - Get sender and tx nonce from transaction

func LogMethodDuration

func LogMethodDuration(logger gethlog.Logger, stopWatch *measure.Stopwatch, msg string, args ...any)

LogMethodDuration - call only with "defer"

func VerifySignature

func VerifySignature(chainID int64, tx *types.Transaction) error

VerifySignature - Checks that the L2Tx has a valid signature.

Types

type Batch

type Batch struct {
	Header *common.BatchHeader

	Transactions []*common.L2Tx
	// contains filtered or unexported fields
}

Batch Data structure only for the internal use of the enclave since transactions are in clear

func DeterministicEmptyBatch

func DeterministicEmptyBatch(
	parent *common.BatchHeader,
	block *types.Block,
	time uint64,
	sequencerNo *big.Int,
	baseFee *big.Int,
	coinbase gethcommon.Address,
) *Batch

func ToBatch

func ToBatch(extBatch *common.ExtBatch, transactionBlobCrypto crypto.DataEncryptionService, compression compression.DataCompressionService) (*Batch, error)

func (*Batch) Encode

func (b *Batch) Encode() ([]byte, error)

func (*Batch) Hash

func (b *Batch) Hash() common.L2BatchHash

Hash returns the keccak256 hash of b's header. The hash is computed on the first call and cached thereafter.

func (*Batch) IsGenesis

func (b *Batch) IsGenesis() bool

IsGenesis indicates whether the batch is the genesis batch. todo (#718) - Change this to a check against a hardcoded genesis hash.

func (*Batch) Number

func (b *Batch) Number() *big.Int

func (*Batch) NumberU64

func (b *Batch) NumberU64() uint64

func (*Batch) ResetHash

func (b *Batch) ResetHash()

func (*Batch) SeqNo

func (b *Batch) SeqNo() *big.Int

func (*Batch) Size

func (b *Batch) Size() (int, error)

func (*Batch) ToExtBatch

func (b *Batch) ToExtBatch(transactionBlobCrypto crypto.DataEncryptionService, compression compression.DataCompressionService) (*common.ExtBatch, error)

type Rollup

type Rollup struct {
	Header  *common.RollupHeader
	Batches []*Batch
	Blocks  map[common.L1BlockHash]*types.Block // these are the blocks required during compression. The key is the hash
	// contains filtered or unexported fields
}

Rollup - is an internal data structure useful during creation

func (*Rollup) Hash

func (r *Rollup) Hash() common.L2BatchHash

Hash returns the keccak256 hash of b's header. The hash is computed on the first call and cached thereafter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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