Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/unordered-ica
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverHappened committed Aug 30, 2024
2 parents b3a0f5d + 5629cc5 commit 70e4de3
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 84 deletions.
2 changes: 2 additions & 0 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ ARG GIT_COMMIT
ARG BUILD_TAGS
ARG ENABLED_PROPOSALS

ENV GOTOOLCHAIN go1.22.6

RUN apk add --no-cache \
ca-certificates \
build-base \
Expand Down
5 changes: 5 additions & 0 deletions app/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
consumerante "github.com/cosmos/interchain-security/v5/app/consumer/ante"
Expand All @@ -24,6 +25,7 @@ import (
type HandlerOptions struct {
ante.HandlerOptions

BankKeeper bankkeeper.Keeper
AccountKeeper feemarketante.AccountKeeper
IBCKeeper *ibckeeper.Keeper
ConsumerKeeper ibcconsumerkeeper.Keeper
Expand Down Expand Up @@ -70,6 +72,9 @@ func NewAnteHandler(options HandlerOptions, logger log.Logger) (sdk.AnteHandler,
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
feemarketante.NewFeeMarketCheckDecorator(
options.AccountKeeper,
options.BankKeeper,
options.FeegrantKeeper,
options.FeeMarketKeeper,
NewFeeDecoratorWithSwitch(options),
),
Expand Down
9 changes: 7 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ import (
ccvconsumertypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types"

storetypes "cosmossdk.io/store/types"
"github.com/cosmos/cosmos-sdk/x/consensus"
consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
pfmkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper"
Expand Down Expand Up @@ -279,6 +280,7 @@ var (
oracle.AppModuleBasic{},
marketmap.AppModuleBasic{},
dynamicfees.AppModuleBasic{},
consensus.AppModuleBasic{},
)

// module account permissions
Expand Down Expand Up @@ -969,6 +971,7 @@ func New(
marketmapModule,
oracleModule,
auction.NewAppModule(appCodec, app.AuctionKeeper),
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
// always be last to make sure that it checks for all invariants and not only part of them
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
)
Expand Down Expand Up @@ -1015,6 +1018,7 @@ func New(
feemarkettypes.ModuleName,
ibcswaptypes.ModuleName,
dextypes.ModuleName,
consensusparamtypes.ModuleName,
)

app.mm.SetOrderEndBlockers(
Expand Down Expand Up @@ -1051,6 +1055,7 @@ func New(
feemarkettypes.ModuleName,
ibcswaptypes.ModuleName,
dextypes.ModuleName,
consensusparamtypes.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
Expand Down Expand Up @@ -1093,6 +1098,7 @@ func New(
ibcswaptypes.ModuleName,
dextypes.ModuleName,
dynamicfeestypes.ModuleName,
consensusparamtypes.ModuleName,
)

app.mm.RegisterInvariants(&app.CrisisKeeper)
Expand Down Expand Up @@ -1152,11 +1158,11 @@ func New(
anteHandler, err := NewAnteHandler(
HandlerOptions{
HandlerOptions: ante.HandlerOptions{
BankKeeper: app.BankKeeper,
FeegrantKeeper: app.FeeGrantKeeper,
SignModeHandler: encodingConfig.TxConfig.SignModeHandler(),
SigGasConsumer: ante.DefaultSigVerificationGasConsumer,
},
BankKeeper: app.BankKeeper,
AccountKeeper: app.AccountKeeper,
IBCKeeper: app.IBCKeeper,
GlobalFeeKeeper: app.GlobalFeeKeeper,
Expand All @@ -1175,7 +1181,6 @@ func New(
postHandlerOptions := PostHandlerOptions{
AccountKeeper: app.AccountKeeper,
BankKeeper: app.BankKeeper,
FeeGrantKeeper: app.FeeGrantKeeper,
FeeMarketKeeper: app.FeeMarkerKeeper,
}
postHandler, err := NewPostHandler(postHandlerOptions)
Expand Down
2 changes: 0 additions & 2 deletions app/post_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type PostHandlerOptions struct {
AccountKeeper feemarketpost.AccountKeeper
BankKeeper feemarketpost.BankKeeper
FeeMarketKeeper feemarketpost.FeeMarketKeeper
FeeGrantKeeper feemarketpost.FeeGrantKeeper
}

// NewPostHandler returns a PostHandler chain with the fee deduct decorator.
Expand All @@ -34,7 +33,6 @@ func NewPostHandler(options PostHandlerOptions) (sdk.PostHandler, error) {
feemarketpost.NewFeeMarketDeductDecorator(
options.AccountKeeper,
options.BankKeeper,
options.FeeGrantKeeper,
options.FeeMarketKeeper,
),
}
Expand Down
2 changes: 2 additions & 0 deletions app/proposals_allowlisting.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
Expand Down Expand Up @@ -63,6 +64,7 @@ func isSdkMessageWhitelisted(msg sdk.Msg) bool {
*wasmtypes.MsgUpdateParams,
*wasmtypes.MsgPinCodes,
*wasmtypes.MsgUnpinCodes,
*consensustypes.MsgUpdateParams,
*upgradetypes.MsgSoftwareUpgrade,
*upgradetypes.MsgCancelUpgrade,
*ibcclienttypes.MsgRecoverClient,
Expand Down
27 changes: 14 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/neutron-org/neutron/v4

go 1.22.5
go 1.22.6

require (
cosmossdk.io/client/v2 v2.0.0-beta.4
Expand All @@ -14,7 +14,7 @@ require (
cosmossdk.io/x/tx v0.13.4
cosmossdk.io/x/upgrade v0.1.4
github.com/CosmWasm/wasmd v0.51.0
github.com/CosmWasm/wasmvm/v2 v2.0.2
github.com/CosmWasm/wasmvm/v2 v2.0.3
github.com/cometbft/cometbft v0.38.11
github.com/cosmos/admin-module/v2 v2.0.0-20240430142959-8b3328d1b1a2
github.com/cosmos/cosmos-db v1.0.2
Expand All @@ -35,10 +35,10 @@ require (
github.com/hashicorp/go-metrics v0.5.3
github.com/iancoleman/orderedmap v0.3.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_golang v1.20.2
github.com/rs/zerolog v1.33.0
github.com/skip-mev/block-sdk/v2 v2.1.5
github.com/skip-mev/feemarket v1.0.4
github.com/skip-mev/feemarket v1.1.1
github.com/skip-mev/slinky v1.0.10
github.com/spf13/cast v1.7.0
github.com/spf13/cobra v1.8.1
Expand All @@ -47,7 +47,7 @@ require (
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142
google.golang.org/grpc v1.65.0
google.golang.org/grpc v1.66.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v2 v2.4.0
)
Expand Down Expand Up @@ -161,6 +161,7 @@ require (
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand All @@ -169,8 +170,8 @@ require (
github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.52.2 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/cors v1.8.3 // indirect
Expand All @@ -196,12 +197,12 @@ require (
go.uber.org/mock v0.4.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.180.0 // indirect
Expand All @@ -217,8 +218,8 @@ require (

replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/CosmWasm/wasmd => github.com/neutron-org/wasmd v0.51.1
github.com/cosmos/admin-module/v2 => github.com/neutron-org/admin-module/v2 v2.0.0
github.com/CosmWasm/wasmd => github.com/neutron-org/wasmd v0.51.2-neutron
github.com/cosmos/admin-module/v2 => github.com/neutron-org/admin-module/v2 v2.0.2
github.com/cosmos/cosmos-sdk => github.com/neutron-org/cosmos-sdk v0.50.8-neutron
// explicitely replace iavl to v1.2.0 cause sometimes go mod tidy uses not right version
github.com/cosmos/iavl => github.com/cosmos/iavl v1.2.0
Expand Down
Loading

0 comments on commit 70e4de3

Please sign in to comment.