core

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: AGPL-3.0 Imports: 12 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 GetTxSigner added in v0.22.0

func GetTxSigner(tx *common.L2Tx) (gethcommon.Address, error)

GetTxSigner returns the address that signed a 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) 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