limiters

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MaxTransactionSize = 64 * 1024

MaxTransactionSizeLimiter - configured to be close to what the ethereum clients have configured as the maximum size a transaction can have. Note that this isn't a protocol limit, but a miner imposed limit and it might be hard to find someone to include a transaction if it goes above it todo - figure out the best number, optimism uses 132KB

Variables

View Source
var ErrFailedToEncode = errors.New("failed to encode data")
View Source
var ErrInsufficientSpace = errors.New("insufficient space in BatchSizeLimiter")

Functions

This section is empty.

Types

type BatchSizeLimiter

type BatchSizeLimiter interface {
	AcceptTransaction(tx *types.Transaction) error
}

func NewBatchSizeLimiter

func NewBatchSizeLimiter(size uint64) BatchSizeLimiter

NewBatchSizeLimiter - Size is the total space available per batch for calldata in a rollup.

func NewUnlimitedSizePool

func NewUnlimitedSizePool() BatchSizeLimiter

type RollupLimiter

type RollupLimiter interface {
	AcceptBatch(encodable interface{}) (bool, error)
}

func NewRollupLimiter

func NewRollupLimiter(size uint64) RollupLimiter

Jump to

Keyboard shortcuts

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