txlistdecompressor

package
v0.0.0-...-ae07365 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxListDecompressor

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

TxListDecompressor is responsible for validating and decompressing the transactions list in a TaikoL1.proposeBlock transaction.

func NewTxListDecompressor

func NewTxListDecompressor(
	blockMaxGasLimit uint64,
	maxBytesPerTxList uint64,
	chainID *big.Int,
) *TxListDecompressor

NewTxListDecompressor creates a new TxListDecompressor instance based on giving configurations.

func (*TxListDecompressor) TryDecompress

func (v *TxListDecompressor) TryDecompress(
	chainID *big.Int,
	blockID *big.Int,
	txListBytes []byte,
	blobUsed bool,
) []byte

TryDecompress validates and decompresses whether the transactions list in the TaikoL1.proposeBlock transaction's input data is valid, the rules are: - If the transaction list is empty, it's valid. - If the transaction list is not empty:

  1. If the transaction list is using calldata, the compressed bytes of the transaction list must be less than or equal to maxBytesPerTxList.
  2. The transaction list bytes must be able to be RLP decoded into a list of transactions.

Jump to

Keyboard shortcuts

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