diff --git a/Dockerfile b/Dockerfile index bd33cbe..d99aedc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,10 +15,10 @@ RUN apk add git WORKDIR /code COPY . /code/ # See https://github.com/CosmWasm/wasmvm/releases -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a -RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 2a72c7062e3c791792b3dab781c815c9a76083a7997ce6f9f2799aaf577f3c25 -RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 8ea2e3b5fae83e671da2bb51115adc88591045953f509955ec38dc02ea5a7b94 +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a +RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 2687afbdae1bc6c7c8b05ae20dfb8ffc7ddc5b4e056697d0f37853dfe294e913 +RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 465e3a088e96fd009a11bfd234c69fb8a0556967677e54511c084f815cf9ce63 # Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc` RUN cp /lib/libwasmvm_muslc.${arch}.a /lib/libwasmvm_muslc.a diff --git a/app/app.go b/app/app.go index cfd9814..c71b5e8 100644 --- a/app/app.go +++ b/app/app.go @@ -156,23 +156,6 @@ func SetAddressPrefixes() { }) } -// GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to -// produce a list of enabled proposals to pass into wasmd app. -func GetEnabledProposals() []wasmtypes.ProposalType { - if EnableSpecificProposals == "" { - if ProposalsEnabled == "true" { - return wasmtypes.EnableAllProposals - } - return wasmtypes.DisableAllProposals - } - chunks := strings.Split(EnableSpecificProposals, ",") - proposals, err := wasmtypes.ConvertToProposals(chunks) - if err != nil { - panic(err) - } - return proposals -} - func GetWasmOpts(appOpts servertypes.AppOptions) []wasmkeeper.Option { var wasmOpts []wasmkeeper.Option if cast.ToBool(appOpts.Get("telemetry.enabled")) { @@ -230,7 +213,6 @@ func NewTerpApp( db dbm.DB, traceStore io.Writer, loadLatest bool, - enabledProposals []wasmtypes.ProposalType, appOpts servertypes.AppOptions, wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), @@ -263,7 +245,6 @@ func NewTerpApp( bApp, legacyAmino, keepers.GetMaccPerms(), - enabledProposals, appOpts, wasmOpts, ) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 61ff50c..9dc4921 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -197,7 +197,6 @@ func NewAppKeepers( bApp *baseapp.BaseApp, cdc *codec.LegacyAmino, maccPerms map[string][]string, - enabledProposals []wasmtypes.ProposalType, appOpts servertypes.AppOptions, wasmOpts []wasmkeeper.Option, ) AppKeepers { @@ -582,11 +581,6 @@ func NewAppKeepers( // govModAddress, // ) - // The gov proposal types can be individually enabled - if len(enabledProposals) != 0 { - govRouter.AddRoute(wasmtypes.RouterKey, wasmkeeper.NewWasmProposalHandler(appKeepers.WasmKeeper, enabledProposals)) //nolint:staticcheck - } - // Set legacy router for backwards compatibility with gov v1beta1 appKeepers.GovKeeper.SetLegacyRouter(govRouter) diff --git a/app/sim_test.go b/app/sim_test.go index 2eca812..8a35117 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -7,7 +7,6 @@ import ( "testing" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/stretchr/testify/require" dbm "github.com/cometbft/cometbft-db" @@ -112,7 +111,6 @@ func TestFullAppSimulation(t *testing.T) { db, nil, true, - wasmtypes.EnableAllProposals, appOptions, emptyWasmOption, fauxMerkleModeOpt, diff --git a/app/test_helpers.go b/app/test_helpers.go index b485176..2fa8565 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -7,7 +7,6 @@ import ( "time" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/stretchr/testify/require" dbm "github.com/cometbft/cometbft-db" @@ -151,7 +150,6 @@ func setup(t *testing.T, withGenesis bool, opts ...wasmkeeper.Option) (*TerpApp, db, nil, true, - wasmtypes.EnableAllProposals, EmptyAppOptions{}, opts, bam.SetChainID("testing"), diff --git a/cmd/terpd/cmd/root.go b/cmd/terpd/cmd/root.go index 0735e58..d2da3bd 100644 --- a/cmd/terpd/cmd/root.go +++ b/cmd/terpd/cmd/root.go @@ -324,7 +324,6 @@ func (ac appCreator) newApp( db, traceStore, loadLatest, - app.GetEnabledProposals(), appOpts, wasmOpts, baseappOptions..., @@ -363,7 +362,6 @@ func (ac appCreator) appExport( db, traceStore, height == -1, - app.GetEnabledProposals(), appOpts, emptyWasmOpts, ) diff --git a/go.mod b/go.mod index cf6d65b..14534cc 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/terpnetwork/terp-core/v2 go 1.19 require ( - github.com/CosmWasm/wasmd v0.42.0 - github.com/CosmWasm/wasmvm v1.4.0 + github.com/CosmWasm/wasmd v0.43.0 + github.com/CosmWasm/wasmvm v1.5.0 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 diff --git a/go.sum b/go.sum index 7f59c26..998cc59 100644 --- a/go.sum +++ b/go.sum @@ -211,10 +211,10 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.42.0 h1:4xZ7GHLrJp3P8qN0wsWOpk5qYLHW9AM5fgcDFPi/p90= -github.com/CosmWasm/wasmd v0.42.0/go.mod h1:DiEyBjHxzkEENYqQhHyka+r4HfR72stSPUtGv+Yh/UU= -github.com/CosmWasm/wasmvm v1.4.0 h1:84I3MlvvzcOo2z+ed0ztPi7eeDNk6/sYuK76uyXP1nI= -github.com/CosmWasm/wasmvm v1.4.0/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= +github.com/CosmWasm/wasmd v0.43.0 h1:4xQAiNf6Ej+TuYe4PXwrtVJ9C+xyFrbsdqHH/kU9Vxk= +github.com/CosmWasm/wasmd v0.43.0/go.mod h1:gpri8YvkRErBz+qDme5jOThGZmSlHfyN532bWibXOl4= +github.com/CosmWasm/wasmvm v1.5.0 h1:3hKeT9SfwfLhxTGKH3vXaKFzBz1yuvP8SlfwfQXbQfw= +github.com/CosmWasm/wasmvm v1.5.0/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= diff --git a/interchaintest/chain_upgrade_test.go b/interchaintest/chain_upgrade_test.go index 268044d..54af505 100644 --- a/interchaintest/chain_upgrade_test.go +++ b/interchaintest/chain_upgrade_test.go @@ -1,5 +1,7 @@ package interchaintest +// notice: upgrade v4 will return error, as headstash accounts in v3 upgrade do not have balance during ictests. + import ( "context" "fmt" @@ -24,8 +26,8 @@ const ( func TestBasicTerpUpgrade(t *testing.T) { repo, version := GetDockerImageInfo() - startVersion := "v2.0.0" - upgradeName := "v3" + startVersion := "v3.0.0" + upgradeName := "v4.0.0" CosmosChainUpgradeTest(t, "terp", startVersion, version, repo, upgradeName) } diff --git a/interchaintest/go.mod b/interchaintest/go.mod index c3cac88..a606f05 100644 --- a/interchaintest/go.mod +++ b/interchaintest/go.mod @@ -16,7 +16,7 @@ replace ( ) require ( - github.com/CosmWasm/wasmd v0.41.0 + github.com/CosmWasm/wasmd v0.43.0 github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.3.0 @@ -47,7 +47,7 @@ require ( github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000 // indirect github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 // indirect - github.com/CosmWasm/wasmvm v1.4.1 // indirect + github.com/CosmWasm/wasmvm v1.5.0 // indirect github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect github.com/Microsoft/go-winio v0.6.0 // indirect diff --git a/interchaintest/go.sum b/interchaintest/go.sum index d485e32..5318d66 100644 --- a/interchaintest/go.sum +++ b/interchaintest/go.sum @@ -219,10 +219,10 @@ github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRr github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 h1:oknQF/iIhf5lVjbwjsVDzDByupRhga8nhA3NAmwyHDA= github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420/go.mod h1:KYkiMX5AbOlXXYfxkrYPrRPV6EbVUALTQh5ptUOJzu8= -github.com/CosmWasm/wasmd v0.41.0 h1:fmwxSbwb50zZDcBaayYFRLIaSFca+EFld1WOaQi49jg= -github.com/CosmWasm/wasmd v0.41.0/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= -github.com/CosmWasm/wasmvm v1.4.1 h1:YgodVlBrXa2HJZzOXjWDH0EIRwQzK3zuA73dDPRRLS4= -github.com/CosmWasm/wasmvm v1.4.1/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= +github.com/CosmWasm/wasmd v0.43.0 h1:4xQAiNf6Ej+TuYe4PXwrtVJ9C+xyFrbsdqHH/kU9Vxk= +github.com/CosmWasm/wasmd v0.43.0/go.mod h1:gpri8YvkRErBz+qDme5jOThGZmSlHfyN532bWibXOl4= +github.com/CosmWasm/wasmvm v1.5.0 h1:3hKeT9SfwfLhxTGKH3vXaKFzBz1yuvP8SlfwfQXbQfw= +github.com/CosmWasm/wasmvm v1.5.0/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25YnZWly5Gq1ekg6jcmWaGj/vG/MhF4aisoc= github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= diff --git a/interchaintest/module_burn_test.go b/interchaintest/module_burn_test.go index 6e79fe9..936eeaf 100644 --- a/interchaintest/module_burn_test.go +++ b/interchaintest/module_burn_test.go @@ -13,7 +13,6 @@ import ( ) // TestTerpBurnModule ensures the terpburn module register and execute sharing functions work properly on smart contracts. -// This is required due to how x/mint handles minting tokens for the target supply. // It is purely for developers ::BurnTokens to function as expected. func TestTerpBurnModule(t *testing.T) { t.Parallel() diff --git a/x/feeshare/integration_test.go b/x/feeshare/integration_test.go index 27e6460..a0ee14a 100644 --- a/x/feeshare/integration_test.go +++ b/x/feeshare/integration_test.go @@ -6,7 +6,6 @@ import ( "testing" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/stretchr/testify/require" dbm "github.com/cometbft/cometbft-db" @@ -79,7 +78,6 @@ func GenApp(t *testing.T, withGenesis bool, opts ...wasmkeeper.Option) (*terpapp db, nil, true, - wasmtypes.EnableAllProposals, simtestutil.EmptyAppOptions{}, opts, bam.SetChainID("testing"),