txlistdecompressor

package
v0.3.1-0...-684a909 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT, MIT Imports: 5 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(
	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.

func (*TxListDecompressor) TryDecompressHekla

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

TryDecompressHekla is the same as TryDecompress, but it's used for Hekla network with an incorrect legacy bytes size check. ref: https://github.com/taikoxyz/taiko-client/pull/783

Jump to

Keyboard shortcuts

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