Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseApp ¶
type BaseApp interface { // CommitMultiStore is utilized to retrieve the latest committed state. CommitMultiStore() storetypes.CommitMultiStore // Logger is utilized to log errors. Logger() log.Logger // LastBlockHeight is utilized to retrieve the latest block height. LastBlockHeight() int64 // GetConsensusParams is utilized to retrieve the consensus params. GetConsensusParams(ctx sdk.Context) *cmtproto.ConsensusParams }
BaseApp is an interface that allows us to call baseapp's CheckTx method as well as retrieve the latest committed state.
type CheckTx ¶
type CheckTx func(req cometabci.RequestCheckTx) cometabci.ResponseCheckTx
CheckTx is baseapp's CheckTx method that checks the validity of a transaction.
type MEVCheckTxHandler ¶
type MEVCheckTxHandler struct {
// contains filtered or unexported fields
}
MEVCheckTxHandler is a wrapper around baseapp's CheckTx method that allows us to verify bid transactions against the latest committed state. All other transactions are executed normally using base app's CheckTx. This defines all of the dependencies that are required to verify a bid transaction.
func NewMEVCheckTxHandler ¶
func NewMEVCheckTxHandler( baseApp BaseApp, txDecoder sdk.TxDecoder, mevLane MEVLaneI, anteHandler sdk.AnteHandler, checkTxHandler CheckTx, chainID string, ) *MEVCheckTxHandler
NewMEVCheckTxHandler constructs a new CheckTxHandler instance. This method fails if the given LanedMempool does not have a lane adhering to the MevLaneI interface
func (*MEVCheckTxHandler) CheckTx ¶
func (handler *MEVCheckTxHandler) CheckTx() CheckTx
CheckTx is a wrapper around baseapp's CheckTx method that allows us to verify bid transactions against the latest committed state. All other transactions are executed normally. We must verify each bid tx and all of its bundled transactions before we can insert it into the mempool against the latest commit state because otherwise the auction can be griefed. No state changes are applied to the state during this process.
func (*MEVCheckTxHandler) GetContextForBidTx ¶
func (handler *MEVCheckTxHandler) GetContextForBidTx(req cometabci.RequestCheckTx) sdk.Context
GetContextForBidTx is returns the latest committed state and sets the context given the checkTx request.
type MEVLaneI ¶
MEVLaneI defines the interface for the mev auction lane. This interface is utilized by both the x/auction module and the checkTx handler.
type MempoolParityCheckTx ¶
type MempoolParityCheckTx struct {
// contains filtered or unexported fields
}
MempoolParityCheckTx is a CheckTx function that evicts txs that are not in the app-side mempool on ReCheckTx. This handler is used to enforce parity in the app-side / comet mempools.
func NewMempoolParityCheckTx ¶
func NewMempoolParityCheckTx( logger log.Logger, mempl block.Mempool, txDecoder sdk.TxDecoder, checkTxHandler CheckTx, baseApp BaseApp, ) MempoolParityCheckTx
NewMempoolParityCheckTx returns a new MempoolParityCheckTx handler.
func (MempoolParityCheckTx) CheckTx ¶
func (m MempoolParityCheckTx) CheckTx() CheckTx
CheckTx returns a CheckTx handler that wraps a given CheckTx handler and evicts txs that are not in the app-side mempool on ReCheckTx.
func (MempoolParityCheckTx) GetContextForTx ¶ added in v1.4.8
func (m MempoolParityCheckTx) GetContextForTx(req cmtabci.RequestCheckTx) sdk.Context
GetContextForTx is returns the latest committed state and sets the context given the checkTx request.