From 6ba38a8f4d234a49cd6bd1127cb7c4bc0418c093 Mon Sep 17 00:00:00 2001 From: Nikhil Vasan Date: Tue, 2 Jan 2024 14:06:11 -0800 Subject: [PATCH 1/5] blockSDK integration temp update branch to latest osmo remove load-test modifications set lane block-space update block-sdk to latest release update go versions in gomod / work files update match handler docs nop process proposal nit --- app/ante.go | 25 ++++++++- app/ante_no_seq.go | 34 ++++++++++-- app/app.go | 85 +++++++++++++++++++++++++++++ app/keepers/keepers.go | 20 +++++++ app/keepers/modules.go | 2 + app/lanes.go | 118 +++++++++++++++++++++++++++++++++++++++++ app/modules.go | 9 ++++ go.mod | 37 ++++++------- go.sum | 73 +++++++++++++------------ x/epochs/go.sum | 8 +-- 10 files changed, 349 insertions(+), 62 deletions(-) create mode 100644 app/lanes.go diff --git a/app/ante.go b/app/ante.go index 3d6af3c56c8..d4d519b4251 100644 --- a/app/ante.go +++ b/app/ante.go @@ -8,7 +8,9 @@ import ( wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + "github.com/skip-mev/block-sdk/block" + "github.com/cosmos/cosmos-sdk/client" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" ante "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -21,8 +23,19 @@ import ( txfeeskeeper "github.com/osmosis-labs/osmosis/v24/x/txfees/keeper" txfeestypes "github.com/osmosis-labs/osmosis/v24/x/txfees/types" + auctionkeeper "github.com/skip-mev/block-sdk/x/auction/keeper" + + auctionante "github.com/skip-mev/block-sdk/x/auction/ante" ) +// BlockSDKAnteHandlerParams are the parameters necessary to configure the block-sdk antehandlers +type BlockSDKAnteHandlerParams struct { + freeLane block.Lane + mevLane auctionante.MEVLane + auctionKeeper auctionkeeper.Keeper + txConfig client.TxConfig +} + // Link to default ante handler used by cosmos sdk: // https://github.com/cosmos/cosmos-sdk/blob/v0.43.0/x/auth/ante/ante.go#L41 // N.B. There is a sister file called `ante_no_seq.go` that is used for e2e testing. @@ -39,6 +52,7 @@ func NewAnteHandler( sigGasConsumer ante.SignatureVerificationGasConsumer, signModeHandler signing.SignModeHandler, channelKeeper *ibckeeper.Keeper, + blockSDKParams BlockSDKAnteHandlerParams, ) sdk.AnteHandler { mempoolFeeOptions := txfeestypes.NewMempoolFeeOptions(appOpts) mempoolFeeDecorator := txfeeskeeper.NewMempoolFeeDecorator(*txFeesKeeper, mempoolFeeOptions) @@ -59,12 +73,21 @@ func NewAnteHandler( ante.TxTimeoutHeightDecorator{}, ante.NewValidateMemoDecorator(ak), ante.NewConsumeGasForTxSizeDecorator(ak), - deductFeeDecorator, + block.NewIgnoreDecorator( + deductFeeDecorator, + blockSDKParams.freeLane, + ), ante.NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewValidateSigCountDecorator(ak), ante.NewSigGasConsumeDecorator(ak, sigGasConsumer), ante.NewSigVerificationDecorator(ak, signModeHandler), ante.NewIncrementSequenceDecorator(ak), ibcante.NewRedundantRelayDecorator(channelKeeper), + // auction module antehandler + auctionante.NewAuctionDecorator( + blockSDKParams.auctionKeeper, + blockSDKParams.txConfig.TxEncoder(), + blockSDKParams.mevLane, + ), ) } diff --git a/app/ante_no_seq.go b/app/ante_no_seq.go index 08c912e307f..9c818d606cb 100644 --- a/app/ante_no_seq.go +++ b/app/ante_no_seq.go @@ -8,7 +8,9 @@ import ( wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + "github.com/skip-mev/block-sdk/block" + "github.com/cosmos/cosmos-sdk/client" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" ante "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -21,12 +23,26 @@ import ( txfeeskeeper "github.com/osmosis-labs/osmosis/v24/x/txfees/keeper" txfeestypes "github.com/osmosis-labs/osmosis/v24/x/txfees/types" + auctionkeeper "github.com/skip-mev/block-sdk/x/auction/keeper" + + auctionante "github.com/skip-mev/block-sdk/x/auction/ante" + + txfeeskeeper "github.com/osmosis-labs/osmosis/v22/x/txfees/keeper" + txfeestypes "github.com/osmosis-labs/osmosis/v22/x/txfees/types" ) +// BlockSDKAnteHandlerParams are the parameters necessary to configure the block-sdk antehandlers +type BlockSDKAnteHandlerParams struct { + freeLane block.Lane + mevLane auctionante.MEVLane + auctionKeeper auctionkeeper.Keeper + txConfig client.TxConfig +} + // Link to default ante handler used by cosmos sdk: // https://github.com/cosmos/cosmos-sdk/blob/v0.43.0/x/auth/ante/ante.go#L41 // N.B. There is a sister file called `ante_eq.go` that is used for production. -// Opposite to this, it also chains `IncrementSequenceDecorator` which is not needed for e2e testing but is critical for production. +// Opposite to this, it also chains `SigVerificationDecorator` which is not needed for e2e testing but is critical for production. // If you make a change here, make sure to make the same change in `ante.go`. func NewAnteHandler( appOpts servertypes.AppOptions, @@ -39,6 +55,7 @@ func NewAnteHandler( sigGasConsumer ante.SignatureVerificationGasConsumer, signModeHandler signing.SignModeHandler, channelKeeper *ibckeeper.Keeper, + blockSDKParams BlockSDKAnteHandlerParams, ) sdk.AnteHandler { mempoolFeeOptions := txfeestypes.NewMempoolFeeOptions(appOpts) mempoolFeeDecorator := txfeeskeeper.NewMempoolFeeDecorator(*txFeesKeeper, mempoolFeeOptions) @@ -59,12 +76,21 @@ func NewAnteHandler( ante.TxTimeoutHeightDecorator{}, ante.NewValidateMemoDecorator(ak), ante.NewConsumeGasForTxSizeDecorator(ak), - deductFeeDecorator, + block.NewIgnoreDecorator( + deductFeeDecorator, + blockSDKParams.freeLane, + ), ante.NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewValidateSigCountDecorator(ak), ante.NewSigGasConsumeDecorator(ak, sigGasConsumer), - ante.NewSigVerificationDecorator(ak, signModeHandler), - // ante.NewIncrementSequenceDecorator(ak), + // ante.NewSigVerificationDecorator(ak, signModeHandler) <-- removed this to prevent failures resulting from invalid tx orders in e2e + ante.NewIncrementSequenceDecorator(ak), ibcante.NewRedundantRelayDecorator(channelKeeper), + // auction module antehandler + auctionante.NewAuctionDecorator( + blockSDKParams.auctionKeeper, + blockSDKParams.txConfig.TxEncoder(), + blockSDKParams.mevLane, + ), ) } diff --git a/app/app.go b/app/app.go index 3bc465e9a8f..f27f2962630 100644 --- a/app/app.go +++ b/app/app.go @@ -10,6 +10,8 @@ import ( "time" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/skip-mev/block-sdk/block" + "github.com/skip-mev/block-sdk/block/base" "github.com/cosmos/cosmos-sdk/x/auth" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" @@ -116,6 +118,9 @@ import ( v9 "github.com/osmosis-labs/osmosis/v24/app/upgrades/v9" _ "github.com/osmosis-labs/osmosis/v24/client/docs/statik" "github.com/osmosis-labs/osmosis/v24/x/mint" + + blocksdkabci "github.com/skip-mev/block-sdk/abci" + "github.com/skip-mev/block-sdk/abci/checktx" ) const appName = "OsmosisApp" @@ -176,6 +181,8 @@ type OsmosisApp struct { sm *module.SimulationManager configurator module.Configurator homePath string + + checkTxHandler checktx.CheckTx } // init sets DefaultNodeHome to default osmosisd install location. @@ -392,6 +399,20 @@ func NewOsmosisApp( app.sm.RegisterStoreDecoders() + // initialize lanes + mempool + mevLane, freeLane, defaultLane := CreateLanes(app, txConfig) + + // create the mempool + lanedMempool, err := block.NewLanedMempool( + app.Logger(), + []block.Lane{mevLane, freeLane, defaultLane}, + ) + if err != nil { + panic(err) + } + // set the mempool + app.SetMempool(lanedMempool) + // initialize stores app.MountKVStores(app.GetKVStoreKey()) app.MountTransientStores(app.GetTransientStoreKey()) @@ -408,8 +429,59 @@ func NewOsmosisApp( ante.DefaultSigVerificationGasConsumer, encodingConfig.TxConfig.SignModeHandler(), app.IBCKeeper, + BlockSDKAnteHandlerParams{ + freeLane: freeLane, + mevLane: mevLane, + auctionKeeper: *app.AppKeepers.AuctionKeeper, + txConfig: txConfig, + }, + ) + + // update ante-handlers on lanes + opt := []base.LaneOption{ + base.WithAnteHandler(anteHandler), + } + mevLane.WithOptions(opt...) + defaultLane.WithOptions(opt...) + freeLane.WithOptions(opt...) + + // ABCI handlers + // prepare proposal + proposalHandler := blocksdkabci.NewProposalHandler( + app.Logger(), + txConfig.TxDecoder(), + txConfig.TxEncoder(), + lanedMempool, + ) + + // we use the block-sdk's PrepareProposal logic to build blocks + app.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) + + // we use a no-op ProcessProposal, this way, we accept all proposals in avoidance + // of liveness failures due to Prepare / Process inconsistency. In other words, + // this ProcessProposal always returns ACCEPT. + app.SetProcessProposal(baseapp.NoOpProcessProposal()) + + // check-tx + mevCheckTxHandler := checktx.NewMEVCheckTxHandler( + app, + txConfig.TxDecoder(), + mevLane, + anteHandler, + app.BaseApp.CheckTx, + app.ChainID(), + ) + + // wrap checkTxHandler with mempool parity handler + parityCheckTx := checktx.NewMempoolParityCheckTx( + app.Logger(), + lanedMempool, + txConfig.TxDecoder(), + mevCheckTxHandler.CheckTx(), ) + app.SetCheckTx(parityCheckTx.CheckTx()) + // initialize BaseApp app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) @@ -727,6 +799,19 @@ func InitOsmosisAppForTestnet(app *OsmosisApp, newValAddr bytes.HexBytes, newVal return app } +// CheckTx will check the transaction with the provided checkTxHandler. We override the default +// handler so that we can verify bid transactions before they are inserted into the mempool. +// With the BlockSDK CheckTx, we can verify the bid transaction and all of the bundled transactions +// before inserting the bid transaction into the mempool. +func (app *OsmosisApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { + return app.checkTxHandler(req) +} + +// SetCheckTx sets the checkTxHandler for the app. +func (app *OsmosisApp) SetCheckTx(handler checktx.CheckTx) { + app.checkTxHandler = handler +} + // MakeCodecs returns the application codec and a legacy Amino codec. func MakeCodecs() (codec.Codec, *codec.LegacyAmino) { config := MakeEncodingConfig() diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 58cd9149a25..a6cad790554 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -110,6 +110,9 @@ import ( epochskeeper "github.com/osmosis-labs/osmosis/x/epochs/keeper" epochstypes "github.com/osmosis-labs/osmosis/x/epochs/types" + auctionkeeper "github.com/skip-mev/block-sdk/x/auction/keeper" + auctiontypes "github.com/skip-mev/block-sdk/x/auction/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) @@ -178,6 +181,9 @@ type AppKeepers struct { HooksICS4Wrapper ibchooks.ICS4Middleware PacketForwardKeeper *packetforwardkeeper.Keeper + // BlockSDK + AuctionKeeper *auctionkeeper.Keeper + // keys to access the substores keys map[string]*storetypes.KVStoreKey tkeys map[string]*storetypes.TransientStoreKey @@ -505,6 +511,18 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.LockupKeeper, ) + // initialize the auction keeper + auctionKeeper := auctionkeeper.NewKeeper( + appCodec, + appKeepers.keys[auctiontypes.StoreKey], + appKeepers.AccountKeeper, + appKeepers.BankKeeper, + appKeepers.DistrKeeper, + appKeepers.StakingKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + appKeepers.AuctionKeeper = &auctionKeeper + appKeepers.ValidatorSetPreferenceKeeper = &validatorSetPreferenceKeeper appKeepers.SuperfluidKeeper = superfluidkeeper.NewKeeper( @@ -751,6 +769,7 @@ func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legac paramsKeeper.Subspace(cosmwasmpooltypes.ModuleName) paramsKeeper.Subspace(ibchookstypes.ModuleName) paramsKeeper.Subspace(txfeestypes.ModuleName) + paramsKeeper.Subspace(auctiontypes.ModuleName) return paramsKeeper } @@ -873,5 +892,6 @@ func KVStoreKeys() []string { icqtypes.StoreKey, packetforwardtypes.StoreKey, cosmwasmpooltypes.StoreKey, + auctiontypes.StoreKey, } } diff --git a/app/keepers/modules.go b/app/keepers/modules.go index 203a10f37ee..abf7d52f42e 100644 --- a/app/keepers/modules.go +++ b/app/keepers/modules.go @@ -61,6 +61,7 @@ import ( valsetprefmodule "github.com/osmosis-labs/osmosis/v24/x/valset-pref/valpref-module" "github.com/osmosis-labs/osmosis/x/epochs" ibc_hooks "github.com/osmosis-labs/osmosis/x/ibc-hooks" + "github.com/skip-mev/block-sdk/x/auction" ) // AppModuleBasics returns ModuleBasics for the module BasicManager. @@ -130,4 +131,5 @@ var AppModuleBasics = []module.AppModuleBasic{ packetforward.AppModuleBasic{}, cosmwasmpoolmodule.AppModuleBasic{}, tendermint.AppModuleBasic{}, + auction.AppModuleBasic{}, } diff --git a/app/lanes.go b/app/lanes.go new file mode 100644 index 00000000000..9ea2a89f9ce --- /dev/null +++ b/app/lanes.go @@ -0,0 +1,118 @@ +package app + +import ( + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client" + + signerextraction "github.com/skip-mev/block-sdk/adapters/signer_extraction_adapter" + "github.com/skip-mev/block-sdk/block/base" + defaultlane "github.com/skip-mev/block-sdk/lanes/base" + freelane "github.com/skip-mev/block-sdk/lanes/free" + mevlane "github.com/skip-mev/block-sdk/lanes/mev" + sdk "github.com/cosmos/cosmos-sdk/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +const ( + maxTxPerMEVLane = 500 // this is the maximum # of bids that will be held in the app-side in-memory mempool + maxTxPerFreeLane = 1000 // this is the maximum # of free-txs that will be held in the app-side in-memory mempool + maxTxPerDefaultLane = 3000 // all other txs +) + +var ( + freeLaneBlockspacePercentage = math.LegacyMustNewDecFromStr("0.05") + defaultLaneBlockspacePercentage = math.LegacyMustNewDecFromStr("0.85") + mevLaneBlockspacePercentage = math.LegacyMustNewDecFromStr("0.1") +) + +// CreateLanes walks through the process of creating the lanes for the block sdk. In this function +// we create three separate lanes - MEV, Free, and Default - and then return them. +func CreateLanes(app *OsmosisApp, txConfig client.TxConfig) (*mevlane.MEVLane, *base.BaseLane, *base.BaseLane) { + // 1. Create the signer extractor. This is used to extract the expected signers from + // a transaction. Each lane can have a different signer extractor if needed. + signerAdapter := signerextraction.NewDefaultAdapter() + + // 2. Create the configurations for each lane. These configurations determine how many + // transactions the lane can store, the maximum block space the lane can consume, and + // the signer extractor used to extract the expected signers from a transaction. + + // Create a mev configuration that accepts maxTxPerMEVLane transactions and consumes mevLaneBlockspacePercentage of the + // block space. + mevConfig := base.LaneConfig{ + Logger: app.Logger(), + TxEncoder: txConfig.TxEncoder(), + TxDecoder: txConfig.TxDecoder(), + MaxBlockSpace: mevLaneBlockspacePercentage, + SignerExtractor: signerAdapter, + MaxTxs: maxTxPerMEVLane, + } + + // Create a free configuration that accepts maxTxPerFreeLane transactions and consumes freeLaneBlockspacePercentage of the + // block space. + freeConfig := base.LaneConfig{ + Logger: app.Logger(), + TxEncoder: txConfig.TxEncoder(), + TxDecoder: txConfig.TxDecoder(), + MaxBlockSpace: freeLaneBlockspacePercentage, + SignerExtractor: signerAdapter, + MaxTxs: maxTxPerFreeLane, + } + + // Create a default configuration that accepts maxTxPerDefaultLane transactions and consumes defaultLaneBlockspacePercentage of the + // block space. + defaultConfig := base.LaneConfig{ + Logger: app.Logger(), + TxEncoder: txConfig.TxEncoder(), + TxDecoder: txConfig.TxDecoder(), + MaxBlockSpace: defaultLaneBlockspacePercentage, + SignerExtractor: signerAdapter, + MaxTxs: maxTxPerDefaultLane, + } + + // 3. Create the match handlers for each lane. These match handlers determine whether or not + // a transaction belongs in the lane. + + // Create the final match handler for the mev lane. + factory := mevlane.NewDefaultAuctionFactory(txConfig.TxDecoder(), signerAdapter) + mevMatchHandler := factory.MatchHandler() + + // Create the final match handler for the free lane. + freeMatchHandler := WithdrawStakingRewardsMatchHandler() + + // Create the final match handler for the default lane. I.e this will direct all txs that are + // not free nor mev to this lane + defaultMatchHandler := base.DefaultMatchHandler() + + // 4. Create the lanes. + mevLane := mevlane.NewMEVLane( + mevConfig, + factory, + mevMatchHandler, + ) + + freeLane := freelane.NewFreeLane( + freeConfig, + base.DefaultTxPriority(), + freeMatchHandler, + ) + + defaultLane := defaultlane.NewDefaultLane( + defaultConfig, + defaultMatchHandler, + ) + + return mevLane, freeLane, defaultLane +} + +// WithdrawStakingRewardsMatchHandler is a match handler that matches transactions that contain a withdraw staking rewards message +func WithdrawStakingRewardsMatchHandler() base.MatchHandler { + return func(ctx sdk.Context, tx sdk.Tx) bool { + for _, msg := range tx.GetMsgs() { + if _, ok := msg.(*distrtypes.MsgWithdrawDelegatorReward); ok { + return true + } + } + + return false + } +} diff --git a/app/modules.go b/app/modules.go index 38872d3cc18..ef985070fe8 100644 --- a/app/modules.go +++ b/app/modules.go @@ -64,6 +64,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/skip-mev/block-sdk/x/auction" + auctiontypes "github.com/skip-mev/block-sdk/x/auction/types" + "github.com/osmosis-labs/osmosis/osmoutils/partialord" appparams "github.com/osmosis-labs/osmosis/v24/app/params" _ "github.com/osmosis-labs/osmosis/v24/client/docs/statik" @@ -132,6 +135,7 @@ var moduleAccountPermissions = map[string][]string{ valsetpreftypes.ModuleName: {authtypes.Staking}, poolmanagertypes.ModuleName: nil, cosmwasmpooltypes.ModuleName: nil, + auctiontypes.ModuleName: nil, // initialize a module account } // appModules return modules to initialize module manager. @@ -197,6 +201,10 @@ func appModules( packetforward.NewAppModule(app.PacketForwardKeeper, app.GetSubspace(packetforwardtypes.ModuleName)), cwpoolmodule.NewAppModule(appCodec, *app.CosmwasmPoolKeeper), crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), + auction.NewAppModule( + appCodec, + *app.AuctionKeeper, + ), } } @@ -289,6 +297,7 @@ func OrderInitGenesis(allModuleNames []string) []string { icqtypes.ModuleName, packetforwardtypes.ModuleName, cosmwasmpooltypes.ModuleName, + auctiontypes.ModuleName, } } diff --git a/go.mod b/go.mod index 01885e07e32..095cc27c1bf 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/cosmos/ibc-go/v7 v7.3.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 - github.com/golangci/golangci-lint v1.55.2 + github.com/golangci/golangci-lint v1.55.3-0.20231203192459-84442f26446b github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/iancoleman/orderedmap v0.3.0 @@ -33,12 +33,14 @@ require ( github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 github.com/osmosis-labs/osmosis/osmomath v0.0.9-0.20240312193551-6c010fa93f60 github.com/osmosis-labs/osmosis/osmoutils v0.0.9-0.20240312193551-6c010fa93f60 + github.com/osmosis-labs/osmosis/v22 v22.0.5 github.com/osmosis-labs/osmosis/x/epochs v0.0.5-0.20240312193551-6c010fa93f60 github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.11-0.20240312193551-6c010fa93f60 github.com/osmosis-labs/sqs/sqsdomain v0.0.0-20240327132234-be32305a2a6e github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 github.com/redis/go-redis/v9 v9.5.1 + github.com/skip-mev/block-sdk v1.4.0 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -69,23 +71,24 @@ require ( cosmossdk.io/log v1.3.0 // indirect github.com/4meepo/tagalign v1.3.3 // indirect github.com/Abirdcfly/dupword v0.0.13 // indirect - github.com/Antonboom/testifylint v0.2.3 // indirect + github.com/Antonboom/testifylint v1.0.2 // indirect github.com/DataDog/zstd v1.4.5 // indirect github.com/Djarvur/go-err113 v0.1.0 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect - github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/alecthomas/go-check-sumtype v0.1.3 // indirect github.com/alexkohler/nakedret/v2 v2.0.2 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/bombsimon/wsl/v4 v4.2.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect github.com/butuzov/mirror v1.1.0 // indirect - github.com/catenacyber/perfsprint v0.2.0 // indirect + github.com/catenacyber/perfsprint v0.4.0 // indirect github.com/ccojocar/zxcvbn-go v1.0.1 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect @@ -111,10 +114,10 @@ require ( github.com/emicklei/dot v1.4.2 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/getsentry/sentry-go v0.23.0 // indirect - github.com/ghostiam/protogetter v0.2.3 // indirect + github.com/ghostiam/protogetter v0.3.3 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/locales v0.14.1 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect @@ -132,7 +135,6 @@ require ( github.com/kkHAIKE/contextcheck v1.1.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/leodido/go-urn v1.2.4 // indirect github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/macabu/inamedparam v0.1.2 // indirect github.com/manifoldco/promptui v0.9.0 // indirect @@ -155,16 +157,16 @@ require ( github.com/timonwong/loggercheck v0.9.4 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect - github.com/ykadowak/zerologlint v0.1.3 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect github.com/zimmski/go-mutesting v0.0.0-20210610104036-6d9217011a00 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go-simpler.org/sloglint v0.1.2 // indirect + go-simpler.org/musttag v0.8.0 // indirect + go-simpler.org/sloglint v0.3.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.tmz.dev/musttag v0.7.2 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect @@ -197,7 +199,6 @@ require ( github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v3 v3.4.0 // indirect github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect github.com/butuzov/ireturn v0.2.2 // indirect @@ -224,7 +225,7 @@ require ( github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/esimonov/ifshort v1.0.4 // indirect github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -261,7 +262,7 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect + github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.1 github.com/gostaticanalysis/analysisutil v0.7.1 // indirect @@ -282,7 +283,7 @@ require ( github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jessevdk/go-flags v1.5.0 // indirect - github.com/jgautheron/goconst v1.6.0 // indirect + github.com/jgautheron/goconst v1.7.0 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jmhodges/levigo v1.0.0 // indirect @@ -315,7 +316,7 @@ require ( github.com/moricho/tparallel v0.3.1 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nishanths/exhaustive v0.11.0 // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -324,7 +325,7 @@ require ( github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/polyfloyd/go-errorlint v1.4.5 // indirect + github.com/polyfloyd/go-errorlint v1.4.6 // indirect github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.48.0 // indirect @@ -356,12 +357,12 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tetafro/godot v1.4.15 // indirect + github.com/tetafro/godot v1.4.16 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect - github.com/ultraware/whitespace v0.0.5 // indirect + github.com/ultraware/whitespace v0.1.0 // indirect github.com/uudashr/gocognit v1.1.2 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect diff --git a/go.sum b/go.sum index 9d79fb22610..c28be186544 100644 --- a/go.sum +++ b/go.sum @@ -551,8 +551,8 @@ github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClD github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow= github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= -github.com/Antonboom/testifylint v0.2.3 h1:MFq9zyL+rIVpsvLX4vDPLojgN7qODzWsrnftNX2Qh60= -github.com/Antonboom/testifylint v0.2.3/go.mod h1:IYaXaOX9NbfAyO+Y04nfjGI8wDemC1rUyM/cYolz018= +github.com/Antonboom/testifylint v1.0.2 h1:WkSc4c6AcYAPrSqj/3MYrewhszk+mnwd07acH1NL9Vw= +github.com/Antonboom/testifylint v1.0.2/go.mod h1:tGEV9t6Th7DHXFVjd8oyLOBbIxXzs4CMEIAkbQ2RuC8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -578,8 +578,8 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -648,8 +648,8 @@ github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJ github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= -github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= -github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= +github.com/bombsimon/wsl/v4 v4.2.0 h1:dKK3o/Hk2aIt6t72CWg02ham2P5lnH9MBSW6cTU9xxU= +github.com/bombsimon/wsl/v4 v4.2.0/go.mod h1:1zaTbf/7ywOQtMdoUdTF2X1fbbBLiBUkajyuFAanT28= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= @@ -698,8 +698,8 @@ github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7 github.com/bytedance/sonic v1.10.0-rc h1:3S5HeWxjX08CUqNrXtEittExpJsEKBNzrV5UnrzHxVQ= github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/catenacyber/perfsprint v0.2.0 h1:azOocHLscPjqXVJ7Mf14Zjlkn4uNua0+Hcg1wTR6vUo= -github.com/catenacyber/perfsprint v0.2.0/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= +github.com/catenacyber/perfsprint v0.4.0 h1:ZwECTVWzrJ4oW94r2OEiNEO+RKWXSibEZBPd6HkrGl4= +github.com/catenacyber/perfsprint v0.4.0/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= github.com/ccojocar/zxcvbn-go v1.0.1 h1:+sxrANSCj6CdadkcMnvde/GWU1vZiiXRbqYSCalV4/4= github.com/ccojocar/zxcvbn-go v1.0.1/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -899,8 +899,8 @@ github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcH github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -927,8 +927,8 @@ github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcP github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghostiam/protogetter v0.2.3 h1:qdv2pzo3BpLqezwqfGDLZ+nHEYmc5bUpIdsMbBVwMjw= -github.com/ghostiam/protogetter v0.2.3/go.mod h1:KmNLOsy1v04hKbvZs8EfGI1fk39AgTdRDxWNYPfXVc4= +github.com/ghostiam/protogetter v0.3.3 h1:EvOuzB/SEifg/c4aMnwcj033Qc1lHO7Yz4QnBDbmbik= +github.com/ghostiam/protogetter v0.3.3/go.mod h1:A0JgIhs0fgVnotGinjQiKaFVG3waItLJNwPmcMzDnvk= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= @@ -1079,8 +1079,8 @@ github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6 github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= -github.com/golangci/golangci-lint v1.55.2 h1:yllEIsSJ7MtlDBwDJ9IMBkyEUz2fYE0b5B8IUgO1oP8= -github.com/golangci/golangci-lint v1.55.2/go.mod h1:H60CZ0fuqoTwlTvnbyjhpZPWp7KmsjwV2yupIMiMXbM= +github.com/golangci/golangci-lint v1.55.3-0.20231203192459-84442f26446b h1:z3r/dMJX7RUKV8RAVYnu4tghQImjPksZzkncictRlT4= +github.com/golangci/golangci-lint v1.55.3-0.20231203192459-84442f26446b/go.mod h1:h6krrUw6/rso2L5KPuSLK3WGKdhYbEW4I0zPt4ckp3Y= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= @@ -1174,8 +1174,8 @@ github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qK github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= +github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -1282,8 +1282,8 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jgautheron/goconst v1.6.0 h1:gbMLWKRMkzAc6kYsQL6/TxaoBUg3Jm9LSF/Ih1ADWGA= -github.com/jgautheron/goconst v1.6.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jgautheron/goconst v1.7.0 h1:cEqH+YBKLsECnRSd4F4TK5ri8t/aXtt/qoL0Ft252B0= +github.com/jgautheron/goconst v1.7.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= @@ -1467,8 +1467,8 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= -github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nunnatsa/ginkgolinter v0.14.1 h1:khx0CqR5U4ghsscjJ+lZVthp3zjIFytRXPTaQ/TMiyA= @@ -1527,6 +1527,8 @@ github.com/osmosis-labs/osmosis/osmomath v0.0.9-0.20240312193551-6c010fa93f60 h1 github.com/osmosis-labs/osmosis/osmomath v0.0.9-0.20240312193551-6c010fa93f60/go.mod h1:7QGFTgdTvlZLcYHUPuNuZJg1+G1mVrd0dWDpLiD4jOo= github.com/osmosis-labs/osmosis/osmoutils v0.0.9-0.20240312193551-6c010fa93f60 h1:4iq0tvpzm6U0J4z6Fm95AmIFiEADE06lrBXr7HUMkdg= github.com/osmosis-labs/osmosis/osmoutils v0.0.9-0.20240312193551-6c010fa93f60/go.mod h1:D2EoDxsaeILMe4YsCXE3CuhpQKoCosTCGaUaLYTgUY0= +github.com/osmosis-labs/osmosis/v22 v22.0.5 h1:HXTjhUXNZHm322NF6ayusifqAi/0PN8LYhOdC8mYmjk= +github.com/osmosis-labs/osmosis/v22 v22.0.5/go.mod h1:x4ja17vrHP6mEGvIVMGH1g5cDR0aUdicqEZ2V3EO+2o= github.com/osmosis-labs/osmosis/x/epochs v0.0.5-0.20240312193551-6c010fa93f60 h1:1QNyiEHhNFMYJ7qWoLAZ40yd4duSEYb7KvDnOUADp+Q= github.com/osmosis-labs/osmosis/x/epochs v0.0.5-0.20240312193551-6c010fa93f60/go.mod h1:cByTNsagl9hFxah0O5rHS7HQA30fJdHXgE/KW0Pzi5M= github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.11-0.20240312193551-6c010fa93f60 h1:/y1ag1iipJELeWpT8yKBQS0gZqFbLLcroRaMMYD6oCI= @@ -1573,8 +1575,8 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.4.5 h1:70YWmMy4FgRHehGNOUask3HtSFSOLKgmDn7ryNe7LqI= -github.com/polyfloyd/go-errorlint v1.4.5/go.mod h1:sIZEbFoDOCnTYYZoVkjc4hTnM459tuWA9H/EkdXwsKk= +github.com/polyfloyd/go-errorlint v1.4.6 h1:6E7ITe++G4eQ8+/ciIz9yONm+pDy+1LI/AZdZG0cP5Y= +github.com/polyfloyd/go-errorlint v1.4.6/go.mod h1:WGkLzUkLXGGr6BfD33l7yRidBa+T+8xB8TupCpId2ZE= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -1692,6 +1694,8 @@ github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= +github.com/skip-mev/block-sdk v1.4.0 h1:j2wEooUDA74ed+FjCDI3I/aPArdYxKLG5asb6C+so2M= +github.com/skip-mev/block-sdk v1.4.0/go.mod h1:Yv+gQqRh41bCbWC0Bpau8DBE7UwxxPfGmNVbtVrgWAo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1748,7 +1752,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -1766,8 +1769,8 @@ github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.15 h1:QzdIs+XB8q+U1WmQEWKHQbKmCw06QuQM7gLx/dky2RM= -github.com/tetafro/godot v1.4.15/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetafro/godot v1.4.16 h1:4ChfhveiNLk4NveAZ9Pu2AN8QZ2nkUGFuadM9lrr5D0= +github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= @@ -1799,8 +1802,8 @@ github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= -github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= -github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/ultraware/whitespace v0.1.0 h1:O1HKYoh0kIeqE8sFqZf1o0qbORXUCOQFrlaQyZsczZw= +github.com/ultraware/whitespace v0.1.0/go.mod h1:/se4r3beMFNmewJ4Xmz0nMQ941GJt+qmSHGP9emHYe0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= @@ -1820,8 +1823,8 @@ github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/ykadowak/zerologlint v0.1.3 h1:TLy1dTW3Nuc+YE3bYRPToG1Q9Ej78b5UUN6bjbGdxPE= -github.com/ykadowak/zerologlint v0.1.3/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1843,10 +1846,12 @@ github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfU github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= -go-simpler.org/assert v0.6.0 h1:QxSrXa4oRuo/1eHMXSBFHKvJIpWABayzKldqZyugG7E= -go-simpler.org/assert v0.6.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= -go-simpler.org/sloglint v0.1.2 h1:IjdhF8NPxyn0Ckn2+fuIof7ntSnVUAqBFcQRrnG9AiM= -go-simpler.org/sloglint v0.1.2/go.mod h1:2LL+QImPfTslD5muNPydAEYmpXIj6o/WYcqnJjLi4o4= +go-simpler.org/assert v0.7.0 h1:OzWWZqfNxt8cLS+MlUp6Tgk1HjPkmgdKBq9qvy8lZsA= +go-simpler.org/assert v0.7.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.8.0 h1:DR4UTgetNNhPRNo02rkK1hwDTRzAPotN+ZqYpdtEwWc= +go-simpler.org/musttag v0.8.0/go.mod h1:fiNdCkXt2S6je9Eblma3okjnlva9NT1Eg/WUt19rWu8= +go-simpler.org/sloglint v0.3.0 h1:E6TR0w4io+F1mkdvFaCRKEpf19S2+lnEYiDM2Z6bClk= +go-simpler.org/sloglint v0.3.0/go.mod h1:/RQr0TeTf89IyRjLJ9ogUbIp1Zs5zJJAj02pwQoDQdg= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= @@ -1877,8 +1882,6 @@ go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.tmz.dev/musttag v0.7.2 h1:1J6S9ipDbalBSODNT5jCep8dhZyMr4ttnjQagmGYR5s= -go.tmz.dev/musttag v0.7.2/go.mod h1:m6q5NiiSKMnQYokefa2xGoyoXnrswCbJ0AWYzf4Zs28= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/x/epochs/go.sum b/x/epochs/go.sum index d4ba78ed251..872d22d4c23 100644 --- a/x/epochs/go.sum +++ b/x/epochs/go.sum @@ -1219,10 +1219,10 @@ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/osmosis-labs/cometbft v0.37.4-v23-osmo-1.0.20240312182012-369f6c70481c h1:RpMTLOn+flnC85P2WkyeUlhtXo3KclJ/ZrTRurHGA3k= -github.com/osmosis-labs/cometbft v0.37.4-v23-osmo-1.0.20240312182012-369f6c70481c/go.mod h1:fE+yBeExsJHA35plOZ7FmC/JejO5UdEHNcwO3dj2wc8= -github.com/osmosis-labs/cosmos-sdk v0.47.5-v24-osmo-1 h1:4A1wE3r21NfvGXt8wXcHCgcUwIp4uFe7zmjvZfZgXdw= -github.com/osmosis-labs/cosmos-sdk v0.47.5-v24-osmo-1/go.mod h1:My+hyHX37Pe/6GKyo4veTXCHPu2vi5X3r18Y7E5AkPw= +github.com/osmosis-labs/cometbft v0.37.4-v24-osmo-2 h1:3k4I3zCxdNP+mjhR7AtKr1PPuGR58CcVTMZN0aV/iL4= +github.com/osmosis-labs/cometbft v0.37.4-v24-osmo-2/go.mod h1:fE+yBeExsJHA35plOZ7FmC/JejO5UdEHNcwO3dj2wc8= +github.com/osmosis-labs/cosmos-sdk v0.47.5-v24-osmo-3 h1:fFYH3xNpLIcwBR5ZNJEtUTn9+Uy0RZt6AHBqcUVC7FA= +github.com/osmosis-labs/cosmos-sdk v0.47.5-v24-osmo-3/go.mod h1:My+hyHX37Pe/6GKyo4veTXCHPu2vi5X3r18Y7E5AkPw= github.com/osmosis-labs/osmosis/osmomath v0.0.9-0.20240312193551-6c010fa93f60 h1:n4Zw/bWkooNPrAskOxTZcFWj/f4H5DIPuGUoGlQPiGE= github.com/osmosis-labs/osmosis/osmomath v0.0.9-0.20240312193551-6c010fa93f60/go.mod h1:7QGFTgdTvlZLcYHUPuNuZJg1+G1mVrd0dWDpLiD4jOo= github.com/osmosis-labs/osmosis/osmoutils v0.0.9-0.20240312193551-6c010fa93f60 h1:4iq0tvpzm6U0J4z6Fm95AmIFiEADE06lrBXr7HUMkdg= From dbf7bfab35d5de414a8ebed2919c380ef77f7f3a Mon Sep 17 00:00:00 2001 From: Nikhil Vasan Date: Tue, 2 Apr 2024 09:02:10 -0700 Subject: [PATCH 2/5] linting --- app/app.go | 6 +++--- app/lanes.go | 12 ++++++------ app/modules.go | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/app.go b/app/app.go index f27f2962630..80e260e44db 100644 --- a/app/app.go +++ b/app/app.go @@ -430,10 +430,10 @@ func NewOsmosisApp( encodingConfig.TxConfig.SignModeHandler(), app.IBCKeeper, BlockSDKAnteHandlerParams{ - freeLane: freeLane, - mevLane: mevLane, + freeLane: freeLane, + mevLane: mevLane, auctionKeeper: *app.AppKeepers.AuctionKeeper, - txConfig: txConfig, + txConfig: txConfig, }, ) diff --git a/app/lanes.go b/app/lanes.go index 9ea2a89f9ce..88eceb8bbf8 100644 --- a/app/lanes.go +++ b/app/lanes.go @@ -4,25 +4,25 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" + sdk "github.com/cosmos/cosmos-sdk/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" signerextraction "github.com/skip-mev/block-sdk/adapters/signer_extraction_adapter" "github.com/skip-mev/block-sdk/block/base" defaultlane "github.com/skip-mev/block-sdk/lanes/base" freelane "github.com/skip-mev/block-sdk/lanes/free" mevlane "github.com/skip-mev/block-sdk/lanes/mev" - sdk "github.com/cosmos/cosmos-sdk/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" ) const ( - maxTxPerMEVLane = 500 // this is the maximum # of bids that will be held in the app-side in-memory mempool - maxTxPerFreeLane = 1000 // this is the maximum # of free-txs that will be held in the app-side in-memory mempool + maxTxPerMEVLane = 500 // this is the maximum # of bids that will be held in the app-side in-memory mempool + maxTxPerFreeLane = 1000 // this is the maximum # of free-txs that will be held in the app-side in-memory mempool maxTxPerDefaultLane = 3000 // all other txs ) var ( - freeLaneBlockspacePercentage = math.LegacyMustNewDecFromStr("0.05") + freeLaneBlockspacePercentage = math.LegacyMustNewDecFromStr("0.05") defaultLaneBlockspacePercentage = math.LegacyMustNewDecFromStr("0.85") - mevLaneBlockspacePercentage = math.LegacyMustNewDecFromStr("0.1") + mevLaneBlockspacePercentage = math.LegacyMustNewDecFromStr("0.1") ) // CreateLanes walks through the process of creating the lanes for the block sdk. In this function diff --git a/app/modules.go b/app/modules.go index ef985070fe8..b658c0e9c57 100644 --- a/app/modules.go +++ b/app/modules.go @@ -135,7 +135,7 @@ var moduleAccountPermissions = map[string][]string{ valsetpreftypes.ModuleName: {authtypes.Staking}, poolmanagertypes.ModuleName: nil, cosmwasmpooltypes.ModuleName: nil, - auctiontypes.ModuleName: nil, // initialize a module account + auctiontypes.ModuleName: nil, // initialize a module account } // appModules return modules to initialize module manager. From 4a0b6eb33fc95ab68fa3daea6c0e52dba5f51259 Mon Sep 17 00:00:00 2001 From: Nikhil Vasan Date: Tue, 2 Apr 2024 13:12:23 -0700 Subject: [PATCH 3/5] testing match handler --- app/lanes.go | 2 +- app/lanes_test.go | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 app/lanes_test.go diff --git a/app/lanes.go b/app/lanes.go index 88eceb8bbf8..14477771f1e 100644 --- a/app/lanes.go +++ b/app/lanes.go @@ -108,7 +108,7 @@ func CreateLanes(app *OsmosisApp, txConfig client.TxConfig) (*mevlane.MEVLane, * func WithdrawStakingRewardsMatchHandler() base.MatchHandler { return func(ctx sdk.Context, tx sdk.Tx) bool { for _, msg := range tx.GetMsgs() { - if _, ok := msg.(*distrtypes.MsgWithdrawDelegatorReward); ok { + if _, ok := msg.(*distrtypes.MsgWithdrawDelegatorReward); ok && len(tx.GetMsgs()) == 1 { return true } } diff --git a/app/lanes_test.go b/app/lanes_test.go new file mode 100644 index 00000000000..4068fc8705c --- /dev/null +++ b/app/lanes_test.go @@ -0,0 +1,39 @@ +package app_test + +import ( + "testing" + + "github.com/osmosis-labs/osmosis/v24/app" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// TestWithdrawStakingRewardsMatchHandler +func TestWithdrawStakingRewardsMatchHandler(t *testing.T) { + txConfig := app.GetEncodingConfig().TxConfig + handler := app.WithdrawStakingRewardsMatchHandler() + t.Run("test non WithdrawStakingRewards tx", func(t *testing.T) { + msg := banktypes.MsgSend{} + fac := txConfig.NewTxBuilder() + + require.NoError(t, fac.SetMsgs([]sdk.Msg{&msg}...)) + require.False(t, handler(sdk.Context{}, fac.GetTx())) + }) + + t.Run("test WithdrawStakingRewards tx w/ other msgs", func(t *testing.T) { + msg := banktypes.MsgSend{} + fac := txConfig.NewTxBuilder() + + require.NoError(t, fac.SetMsgs([]sdk.Msg{&msg, &distrtypes.MsgWithdrawDelegatorReward{}}...)) + require.False(t, handler(sdk.Context{}, fac.GetTx())) + }) + + t.Run("test WithdrawStakingRewards tx w/ single msg", func(t *testing.T) { + fac := txConfig.NewTxBuilder() + + require.NoError(t, fac.SetMsgs([]sdk.Msg{&distrtypes.MsgWithdrawDelegatorReward{}}...)) + require.True(t, handler(sdk.Context{}, fac.GetTx())) + }) +} From 68216e787c8265cb53ec851ae0b3443186571114 Mon Sep 17 00:00:00 2001 From: PaddyMc <6751821+PaddyMc@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:43:17 +0000 Subject: [PATCH 4/5] [create-pull-request] automated change --- .vscode/launch.json | 2 +- Makefile | 2 +- app/app.go | 3 ++- app/upgrades/v25/constants.go | 19 +++++++++++++++++++ app/upgrades/v25/upgrades.go | 28 ++++++++++++++++++++++++++++ tests/e2e/containers/config.go | 4 ++-- 6 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 app/upgrades/v25/constants.go create mode 100644 app/upgrades/v25/upgrades.go diff --git a/.vscode/launch.json b/.vscode/launch.json index 895a7e49f3f..ffc73aa20ef 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -47,7 +47,7 @@ "OSMOSIS_E2E_SKIP_UPGRADE": "false", "OSMOSIS_E2E_SKIP_CLEANUP": "true", "OSMOSIS_E2E_SKIP_STATE_SYNC": "true", - "OSMOSIS_E2E_UPGRADE_VERSION": "v24", + "OSMOSIS_E2E_UPGRADE_VERSION": "v25", "OSMOSIS_E2E_DEBUG_LOG": "false", }, "preLaunchTask": "e2e-setup" diff --git a/Makefile b/Makefile index f45b9c0433f..24e4de0cafc 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ LEDGER_ENABLED ?= true SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') BUILDDIR ?= $(CURDIR)/build DOCKER := $(shell which docker) -E2E_UPGRADE_VERSION := "v24" +E2E_UPGRADE_VERSION := "v25" #SHELL := /bin/bash # Go version to be used in docker images diff --git a/app/app.go b/app/app.go index 80e260e44db..875db321bd6 100644 --- a/app/app.go +++ b/app/app.go @@ -109,6 +109,7 @@ import ( v22 "github.com/osmosis-labs/osmosis/v24/app/upgrades/v22" v23 "github.com/osmosis-labs/osmosis/v24/app/upgrades/v23" v24 "github.com/osmosis-labs/osmosis/v24/app/upgrades/v24" + v25 "github.com/osmosis-labs/osmosis/v24/app/upgrades/v25" v3 "github.com/osmosis-labs/osmosis/v24/app/upgrades/v3" v4 "github.com/osmosis-labs/osmosis/v24/app/upgrades/v4" v5 "github.com/osmosis-labs/osmosis/v24/app/upgrades/v5" @@ -158,7 +159,7 @@ var ( _ runtime.AppI = (*OsmosisApp)(nil) - Upgrades = []upgrades.Upgrade{v4.Upgrade, v5.Upgrade, v7.Upgrade, v9.Upgrade, v11.Upgrade, v12.Upgrade, v13.Upgrade, v14.Upgrade, v15.Upgrade, v16.Upgrade, v17.Upgrade, v18.Upgrade, v19.Upgrade, v20.Upgrade, v21.Upgrade, v22.Upgrade, v23.Upgrade, v24.Upgrade} + Upgrades = []upgrades.Upgrade{v4.Upgrade, v5.Upgrade, v7.Upgrade, v9.Upgrade, v11.Upgrade, v12.Upgrade, v13.Upgrade, v14.Upgrade, v15.Upgrade, v16.Upgrade, v17.Upgrade, v18.Upgrade, v19.Upgrade, v20.Upgrade, v21.Upgrade, v22.Upgrade, v23.Upgrade, v24.Upgrade, v25.Upgrade} Forks = []upgrades.Fork{v3.Fork, v6.Fork, v8.Fork, v10.Fork} // rpcAddressConfigName is the name of the config key that holds the RPC address. diff --git a/app/upgrades/v25/constants.go b/app/upgrades/v25/constants.go new file mode 100644 index 00000000000..6ad7244c8df --- /dev/null +++ b/app/upgrades/v25/constants.go @@ -0,0 +1,19 @@ +package v25 + +import ( + "github.com/osmosis-labs/osmosis/v24/app/upgrades" + + store "github.com/cosmos/cosmos-sdk/store/types" +) + +// UpgradeName defines the on-chain upgrade name for the Osmosis v25 upgrade. +const UpgradeName = "v25" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{ + Added: []string{}, + Deleted: []string{}, + }, +} diff --git a/app/upgrades/v25/upgrades.go b/app/upgrades/v25/upgrades.go new file mode 100644 index 00000000000..3bab234007e --- /dev/null +++ b/app/upgrades/v25/upgrades.go @@ -0,0 +1,28 @@ +package v25 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/osmosis-labs/osmosis/v24/app/keepers" + "github.com/osmosis-labs/osmosis/v24/app/upgrades" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + bpm upgrades.BaseAppParamManager, + keepers *keepers.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // Run migrations before applying any other state changes. + // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations(). + migrations, err := mm.RunMigrations(ctx, configurator, fromVM) + if err != nil { + return nil, err + } + + return migrations, nil + } +} diff --git a/tests/e2e/containers/config.go b/tests/e2e/containers/config.go index 643ba14a39c..a86cbf6ed7b 100644 --- a/tests/e2e/containers/config.go +++ b/tests/e2e/containers/config.go @@ -24,10 +24,10 @@ const ( // It should be uploaded to Docker Hub. OSMOSIS_E2E_SKIP_UPGRADE should be unset // for this functionality to be used. previousVersionOsmoRepository = "osmolabs/osmosis" - previousVersionOsmoTag = "23.0.0-rc1-alpine" + previousVersionOsmoTag = "v24.0.0" // Pre-upgrade repo/tag for osmosis initialization (this should be one version below upgradeVersion) previousVersionInitRepository = "osmolabs/osmosis-e2e-init-chain" - previousVersionInitTag = "v23.0.8-temp" + previousVersionInitTag = "v24.0.0" // Hermes repo/version for relayer relayerRepository = "osmolabs/relayer" relayerTag = "1.5.1" From ce9fd46e4aee4db022412125f752ab07ed27b338 Mon Sep 17 00:00:00 2001 From: Nikhil Vasan Date: Tue, 2 Apr 2024 13:55:14 -0700 Subject: [PATCH 5/5] upgrade handler + test-cases --- app/upgrades/v25/constants.go | 19 +++++++++-- app/upgrades/v25/upgrades.go | 5 +++ app/upgrades/v25/upgrades_test.go | 56 +++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 app/upgrades/v25/upgrades_test.go diff --git a/app/upgrades/v25/constants.go b/app/upgrades/v25/constants.go index 6ad7244c8df..7b8aa6564b9 100644 --- a/app/upgrades/v25/constants.go +++ b/app/upgrades/v25/constants.go @@ -4,16 +4,31 @@ import ( "github.com/osmosis-labs/osmosis/v24/app/upgrades" store "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + auctiontypes "github.com/skip-mev/block-sdk/x/auction/types" ) // UpgradeName defines the on-chain upgrade name for the Osmosis v25 upgrade. -const UpgradeName = "v25" +const ( + UpgradeName = "v25" + AuctionDenom = "uosmo" +) var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: CreateUpgradeHandler, StoreUpgrades: store.StoreUpgrades{ - Added: []string{}, + Added: []string{auctiontypes.StoreKey}, Deleted: []string{}, }, } + +// AuctionParams expected initial params for the block-sdk +var AuctionParams = auctiontypes.Params{ + MaxBundleSize: 3, + ReserveFee: sdk.NewCoin(AuctionDenom, sdk.NewInt(1000000)), + MinBidIncrement: sdk.NewCoin(AuctionDenom, sdk.NewInt(1000000)), + EscrowAccountAddress: auctiontypes.DefaultEscrowAccountAddress, + FrontRunningProtection: true, + ProposerFee: auctiontypes.DefaultProposerFee, +} diff --git a/app/upgrades/v25/upgrades.go b/app/upgrades/v25/upgrades.go index 3bab234007e..edc833b1470 100644 --- a/app/upgrades/v25/upgrades.go +++ b/app/upgrades/v25/upgrades.go @@ -23,6 +23,11 @@ func CreateUpgradeHandler( return nil, err } + // update block-sdk params + if err := keepers.AuctionKeeper.SetParams(ctx, AuctionParams); err != nil { + return nil, err + } + return migrations, nil } } diff --git a/app/upgrades/v25/upgrades_test.go b/app/upgrades/v25/upgrades_test.go new file mode 100644 index 00000000000..2ba41e39268 --- /dev/null +++ b/app/upgrades/v25/upgrades_test.go @@ -0,0 +1,56 @@ +package v25_test + +import ( + abci "github.com/cometbft/cometbft/abci/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/osmosis-labs/osmosis/v24/app/apptesting" + "github.com/osmosis-labs/osmosis/v24/app/upgrades/v25" + "github.com/stretchr/testify/suite" + "testing" +) + +const ( + v25UpgradeHeight = 100 +) + +type UpgradeTestSuite struct { + apptesting.KeeperTestHelper +} + +func TestUpgradeTestSuite(t *testing.T) { + suite.Run(t, new(UpgradeTestSuite)) +} + +func (s *UpgradeTestSuite) TestUpgrade() { + s.Setup() + + dummyUpgrade(s) + s.Require().NotPanics(func() { + s.App.BeginBlocker(s.Ctx, abci.RequestBeginBlock{}) + }) + + // check auction params + params, err := s.App.AuctionKeeper.GetParams(s.Ctx) + s.Require().NoError(err) + + // check auction params + s.Require().Equal(params.MaxBundleSize, v25.AuctionParams.MaxBundleSize) + s.Require().Equal(params.ReserveFee.Denom, v25.AuctionParams.ReserveFee.Denom) + s.Require().Equal(params.ReserveFee.Amount.Int64(), v25.AuctionParams.ReserveFee.Amount.Int64()) + s.Require().Equal(params.MinBidIncrement.Denom, v25.AuctionParams.MinBidIncrement.Denom) + s.Require().Equal(params.MinBidIncrement.Amount.Int64(), v25.AuctionParams.MinBidIncrement.Amount.Int64()) + s.Require().Equal(params.EscrowAccountAddress, v25.AuctionParams.EscrowAccountAddress) + s.Require().Equal(params.FrontRunningProtection, v25.AuctionParams.FrontRunningProtection) + s.Require().Equal(params.ProposerFee, v25.AuctionParams.ProposerFee) +} + +func dummyUpgrade(s *UpgradeTestSuite) { + s.Ctx = s.Ctx.WithBlockHeight(v25UpgradeHeight - 1) + plan := upgradetypes.Plan{Name: v25.Upgrade.UpgradeName, Height: v25UpgradeHeight} + err := s.App.UpgradeKeeper.ScheduleUpgrade(s.Ctx, plan) + s.Require().NoError(err) + _, exists := s.App.UpgradeKeeper.GetUpgradePlan(s.Ctx) + s.Require().True(exists) + + s.Ctx = s.Ctx.WithBlockHeight(v25UpgradeHeight) +}