fix(mempool parity): Enforce comet / app-side mempool parity in CheckTx + integ. tests [BLO-584] [BLO-635] (#306)

* account setup for network tests

* Add Test case for app-mempool / cmt mempool parity

* add fix

* move check-tx handlers to wrap each other

* linting

* migrate to chaintestutils

* linting

* additional test-case

* lint

* remove paralell tests

* remove MEVLaneI

* fix(check_tx): Check error of GetAuctionBid in ValidateBidTx [BLO-461] (#312)

* add err check in ValidateBidTx

* add test-case for ValidateBidTx

* remove -race flag for integ
This commit is contained in:
Nikhil Vasan
2023-12-18 18:29:06 -08:00
committed by GitHub
parent 4b6e481c3f
commit b5fe2a772c
16 changed files with 1196 additions and 406 deletions
+10 -4
View File
@@ -42,10 +42,10 @@ import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
"github.com/skip-mev/block-sdk/abci"
"github.com/skip-mev/block-sdk/abci/checktx"
"github.com/skip-mev/block-sdk/block"
"github.com/skip-mev/block-sdk/block/base"
service "github.com/skip-mev/block-sdk/block/service"
"github.com/skip-mev/block-sdk/lanes/mev"
auctionkeeper "github.com/skip-mev/block-sdk/x/auction/keeper"
blocksdkkeeper "github.com/skip-mev/block-sdk/x/blocksdk/keeper"
)
@@ -93,7 +93,7 @@ type TestApp struct {
FeeGrantKeeper feegrantkeeper.Keeper
// custom checkTx handler
checkTxHandler mev.CheckTx
checkTxHandler checktx.CheckTx
}
func init() {
@@ -276,12 +276,18 @@ func New(
// Step 7: Set the custom CheckTx handler on BaseApp. This is only required if you
// use the MEV lane.
checkTxHandler := mev.NewCheckTxHandler(
mevCheckTx := checktx.NewMEVCheckTxHandler(
app.App,
app.txConfig.TxDecoder(),
mevLane,
anteHandler,
app.App.CheckTx,
)
checkTxHandler := checktx.NewMempoolParityCheckTx(
app.Logger(), mempool,
app.txConfig.TxDecoder(), mevCheckTx.CheckTx(),
)
app.SetCheckTx(checkTxHandler.CheckTx())
// ---------------------------------------------------------------------------- //
@@ -325,7 +331,7 @@ func (app *TestApp) CheckTx(req *cometabci.RequestCheckTx) (*cometabci.ResponseC
}
// SetCheckTx sets the checkTxHandler for the app.
func (app *TestApp) SetCheckTx(handler mev.CheckTx) {
func (app *TestApp) SetCheckTx(handler checktx.CheckTx) {
app.checkTxHandler = handler
}