ante

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobKeeper

type BlobKeeper interface {
	GasPerBlobByte(ctx sdk.Context) uint32
	GovMaxSquareSize(ctx sdk.Context) uint64
}

type MaxTotalBlobSizeDecorator

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

MaxTotalBlobSizeDecorator helps to prevent a PFB from being included in a block but not fitting in a data square.

func NewMaxBlobSizeDecorator

func NewMaxBlobSizeDecorator(k BlobKeeper) MaxTotalBlobSizeDecorator

func (MaxTotalBlobSizeDecorator) AnteHandle

func (d MaxTotalBlobSizeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

AnteHandle implements the Cosmos SDK AnteHandler function signature. It returns an error if tx contains a MsgPayForBlobs where the total blob size is greater than the max total blob size.

type MinGasPFBDecorator

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

MinGasPFBDecorator helps to prevent a PFB from being included in a block but running out of gas in DeliverTx (effectively getting DA for free) This decorator should be run after any decorator that consumes gas.

func NewMinGasPFBDecorator

func NewMinGasPFBDecorator(k BlobKeeper) MinGasPFBDecorator

func (MinGasPFBDecorator) AnteHandle

func (d MinGasPFBDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

AnteHandle implements the AnteHandler interface. It checks to see if the transaction contains a MsgPayForBlobs and if so, checks that the transaction has allocated enough gas.

Jump to

Keyboard shortcuts

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