Skip to content

Commit 5648ce7

Browse files
authored
feat: upgrade to Cosmos SDK v0.50.10 (#1302)
# Related Github tickets - VolumeFi#2092 # Background This change upgrades to `comsos-sdk v0.50.10` and introduces support for `cosmwasm 2.0` # Testing completed - [x] test coverage exists or has been added/updated - [x] tested in a private testnet # Breaking changes - [x] I have checked my code for breaking changes - [x] If there are breaking changes, there is a supporting migration.
1 parent e60029d commit 5648ce7

File tree

8 files changed

+231
-197
lines changed

8 files changed

+231
-197
lines changed

app/app.go

+13-8
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ import (
158158

159159
const (
160160
Name = "paloma"
161-
162-
wasmAvailableCapabilities = "iterator,staking,stargate,paloma"
163161
)
164162

165163
func getGovProposalHandlers() []govclient.ProposalHandler {
@@ -530,6 +528,8 @@ func New(
530528
app.MsgServiceRouter(),
531529
authorityAddress,
532530
)
531+
app.ICAHostKeeper.WithQueryRouter(app.GRPCQueryRouter())
532+
533533
app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper(
534534
appCodec,
535535
keys[icacontrollertypes.StoreKey],
@@ -712,6 +712,17 @@ func New(
712712
panic("error while reading wasm config: " + err.Error())
713713
}
714714

715+
wasmAvailableCapabilities := []string{
716+
"iterator",
717+
"staking",
718+
"stargate",
719+
"paloma",
720+
"cosmwasm_1_1",
721+
"cosmwasm_1_2",
722+
"cosmwasm_1_3",
723+
"cosmwasm_1_4",
724+
"cosmwasm_2_0",
725+
}
715726
app.wasmKeeper = wasmkeeper.NewKeeper(
716727
appCodec,
717728
runtime.NewKVStoreService(keys[wasmtypes.StoreKey]),
@@ -740,12 +751,6 @@ func New(
740751

741752
app.AuthzKeeper = authzkeeper.NewKeeper(runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), appCodec, app.MsgServiceRouter(), app.AccountKeeper)
742753

743-
// register wasm gov proposal types
744-
// enabledProposals := GetEnabledProposals()
745-
// if len(enabledProposals) != 0 {
746-
// govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.wasmKeeper, enabledProposals))
747-
// }
748-
749754
// Create Transfer Stack
750755
var transferStack porttypes.IBCModule
751756
transferStack = transfer.NewIBCModule(app.TransferKeeper)

cmd/palomad/app_config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func initAppConfig() (string, interface{}) {
5050
customAppConfig := CustomAppConfig{
5151
Config: *srvCfg,
5252
WASM: WASMConfig{
53-
LRUSize: 1,
53+
LRUSize: 0,
5454
QueryGasLimit: 300000,
5555
},
5656
}

cmd/palomad/root.go

+22-1
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,20 @@ import (
3232
func NewRootCmd() *cobra.Command {
3333
// set Bech32 address configuration
3434
params.SetAddressConfig()
35+
tempDir := tempDir()
3536
appOptions := make(db.OptionsMap, 0)
36-
appOptions[flags.FlagHome] = palomaapp.DefaultNodeHome
37+
appOptions[flags.FlagHome] = tempDir
38+
3739
tempApp := palomaapp.New(cosmoslog.NewNopLogger(), db.NewMemDB(), io.MultiWriter(), true, appOptions)
40+
defer func() {
41+
if err := tempApp.Close(); err != nil {
42+
panic(err)
43+
}
44+
if tempDir != palomaapp.DefaultNodeHome {
45+
os.RemoveAll(tempDir)
46+
}
47+
}()
48+
3849
encCfg := params.EncodingConfig{
3950
InterfaceRegistry: tempApp.InterfaceRegistry(),
4051
Codec: tempApp.AppCodec(),
@@ -207,3 +218,13 @@ func rootPreRunE(cmd *cobra.Command, args []string) error {
207218

208219
return nil
209220
}
221+
222+
var tempDir = func() string {
223+
dir, err := os.MkdirTemp("", ".paloma")
224+
if err != nil {
225+
panic(fmt.Sprintf("failed creating temp directory: %s", err.Error()))
226+
}
227+
defer os.RemoveAll(dir)
228+
229+
return dir
230+
}

go.mod

+59-56
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,47 @@ go 1.22.2
44

55
require (
66
cosmossdk.io/errors v1.0.1
7-
github.com/CosmWasm/wasmd v0.50.0
8-
github.com/CosmWasm/wasmvm v1.5.2
7+
github.com/CosmWasm/wasmd v0.53.0
98
github.com/VolumeFi/whoops v0.7.2
10-
github.com/cometbft/cometbft v0.38.6
11-
github.com/cometbft/cometbft-db v0.9.1 // indirect
9+
github.com/cometbft/cometbft v0.38.12
10+
github.com/cometbft/cometbft-db v0.11.0 // indirect
1211
github.com/cosmos/cosmos-proto v1.0.0-beta.5
13-
github.com/cosmos/cosmos-sdk v0.50.6
14-
github.com/cosmos/gogoproto v1.4.12
12+
github.com/cosmos/cosmos-sdk v0.50.10
13+
github.com/cosmos/gogoproto v1.7.0
1514
github.com/gogo/protobuf v1.3.2
1615
github.com/gorilla/mux v1.8.1
1716
github.com/grpc-ecosystem/grpc-gateway v1.16.0
1817
github.com/huandu/skiplist v1.2.0
1918
github.com/onsi/gomega v1.33.1
2019
github.com/sirupsen/logrus v1.9.3 // indirect
21-
github.com/spf13/cast v1.6.0
22-
github.com/spf13/cobra v1.8.0
20+
github.com/spf13/cast v1.7.0
21+
github.com/spf13/cobra v1.8.1
2322
github.com/spf13/pflag v1.0.5
24-
github.com/spf13/viper v1.18.2
23+
github.com/spf13/viper v1.19.0
2524
github.com/stretchr/testify v1.9.0
2625
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0
2726
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157
2827
google.golang.org/grpc v1.65.0
29-
google.golang.org/protobuf v1.34.1
28+
google.golang.org/protobuf v1.34.2
3029
gopkg.in/yaml.v2 v2.4.0
3130
)
3231

3332
require (
34-
cosmossdk.io/api v0.7.4
33+
cosmossdk.io/api v0.7.5
3534
cosmossdk.io/client/v2 v2.0.0-beta.1
36-
cosmossdk.io/core v0.11.0
37-
cosmossdk.io/log v1.3.1
35+
cosmossdk.io/core v0.11.1
36+
cosmossdk.io/log v1.4.1
3837
cosmossdk.io/math v1.3.0
39-
cosmossdk.io/store v1.1.0
40-
cosmossdk.io/tools/confix v0.1.1
41-
cosmossdk.io/x/evidence v0.1.0
42-
cosmossdk.io/x/feegrant v0.1.0
43-
cosmossdk.io/x/tx v0.13.2
44-
cosmossdk.io/x/upgrade v0.1.1
38+
cosmossdk.io/store v1.1.1
39+
cosmossdk.io/tools/confix v0.1.2
40+
cosmossdk.io/x/evidence v0.1.1
41+
cosmossdk.io/x/feegrant v0.1.1
42+
cosmossdk.io/x/tx v0.13.5
43+
cosmossdk.io/x/upgrade v0.1.4
44+
github.com/CosmWasm/wasmvm/v2 v2.1.3
4545
github.com/cosmos/cosmos-db v1.0.2
46-
github.com/cosmos/ibc-go/modules/capability v1.0.0
47-
github.com/cosmos/ibc-go/v8 v8.2.0
46+
github.com/cosmos/ibc-go/modules/capability v1.0.1
47+
github.com/cosmos/ibc-go/v8 v8.4.0
4848
github.com/ethereum/go-ethereum v1.13.15
4949
github.com/golang/protobuf v1.5.4
5050
github.com/hashicorp/go-metrics v0.5.3
@@ -53,14 +53,14 @@ require (
5353
)
5454

5555
require (
56-
cloud.google.com/go v0.112.0 // indirect
56+
cloud.google.com/go v0.112.1 // indirect
5757
cloud.google.com/go/compute/metadata v0.3.0 // indirect
5858
cloud.google.com/go/iam v1.1.6 // indirect
59-
cloud.google.com/go/storage v1.36.0 // indirect
59+
cloud.google.com/go/storage v1.38.0 // indirect
6060
cosmossdk.io/collections v0.4.0 // indirect
61-
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
62-
cosmossdk.io/x/circuit v0.1.0 // indirect
63-
cosmossdk.io/x/nft v0.1.0 // indirect
61+
cosmossdk.io/depinject v1.0.0 // indirect
62+
cosmossdk.io/x/circuit v0.1.1 // indirect
63+
cosmossdk.io/x/nft v0.1.1 // indirect
6464
filippo.io/edwards25519 v1.0.0 // indirect
6565
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
6666
github.com/99designs/keyring v1.2.1 // indirect
@@ -74,24 +74,25 @@ require (
7474
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
7575
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
7676
github.com/bits-and-blooms/bitset v1.10.0 // indirect
77-
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
77+
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
7878
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
7979
github.com/cespare/xxhash v1.1.0 // indirect
8080
github.com/cespare/xxhash/v2 v2.3.0 // indirect
8181
github.com/chzyer/readline v1.5.1 // indirect
8282
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
83-
github.com/cockroachdb/errors v1.11.1 // indirect
83+
github.com/cockroachdb/errors v1.11.3 // indirect
8484
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
85-
github.com/cockroachdb/pebble v1.1.0 // indirect
85+
github.com/cockroachdb/pebble v1.1.1 // indirect
8686
github.com/cockroachdb/redact v1.1.5 // indirect
8787
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
8888
github.com/consensys/bavard v0.1.13 // indirect
8989
github.com/consensys/gnark-crypto v0.12.1 // indirect
9090
github.com/cosmos/btcutil v1.0.5 // indirect
9191
github.com/cosmos/go-bip39 v1.0.0 // indirect
9292
github.com/cosmos/gogogateway v1.2.0 // indirect
93-
github.com/cosmos/iavl v1.1.4 // indirect
94-
github.com/cosmos/ics23/go v0.10.0 // indirect
93+
github.com/cosmos/iavl v1.2.0 // indirect
94+
github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd // indirect
95+
github.com/cosmos/ics23/go v0.11.0 // indirect
9596
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
9697
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
9798
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
@@ -137,9 +138,9 @@ require (
137138
github.com/google/s2a-go v0.1.7 // indirect
138139
github.com/google/uuid v1.6.0 // indirect
139140
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
140-
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
141+
github.com/googleapis/gax-go/v2 v2.12.3 // indirect
141142
github.com/gorilla/handlers v1.5.2 // indirect
142-
github.com/gorilla/websocket v1.5.0 // indirect
143+
github.com/gorilla/websocket v1.5.3 // indirect
143144
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
144145
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
145146
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@@ -150,6 +151,7 @@ require (
150151
github.com/hashicorp/go-safetemp v1.0.0 // indirect
151152
github.com/hashicorp/go-version v1.6.0 // indirect
152153
github.com/hashicorp/golang-lru v1.0.2 // indirect
154+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
153155
github.com/hashicorp/hcl v1.0.0 // indirect
154156
github.com/hashicorp/yamux v0.1.1 // indirect
155157
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
@@ -160,11 +162,10 @@ require (
160162
github.com/inconshreveable/mousetrap v1.1.0 // indirect
161163
github.com/jmespath/go-jmespath v0.4.0 // indirect
162164
github.com/jmhodges/levigo v1.0.0 // indirect
163-
github.com/klauspost/compress v1.17.7 // indirect
165+
github.com/klauspost/compress v1.17.9 // indirect
164166
github.com/kr/pretty v0.3.1 // indirect
165167
github.com/kr/text v0.2.0 // indirect
166168
github.com/lib/pq v1.10.7 // indirect
167-
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
168169
github.com/linxGnu/grocksdb v1.8.14 // indirect
169170
github.com/magiconair/properties v1.8.7 // indirect
170171
github.com/manifoldco/promptui v0.9.0 // indirect
@@ -177,26 +178,28 @@ require (
177178
github.com/mitchellh/mapstructure v1.5.0 // indirect
178179
github.com/mmcloughlin/addchain v0.4.0 // indirect
179180
github.com/mtibben/percent v0.2.1 // indirect
181+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
180182
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
181183
github.com/oklog/run v1.1.0 // indirect
182184
github.com/olekukonko/tablewriter v0.0.5 // indirect
183185
github.com/opencontainers/go-digest v1.0.0 // indirect
184-
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
186+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
185187
github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect
186188
github.com/pkg/errors v0.9.1 // indirect
187189
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
188-
github.com/prometheus/client_golang v1.19.0 // indirect
190+
github.com/prometheus/client_golang v1.20.1 // indirect
189191
github.com/prometheus/client_model v0.6.1 // indirect
190-
github.com/prometheus/common v0.52.2 // indirect
191-
github.com/prometheus/procfs v0.13.0 // indirect
192+
github.com/prometheus/common v0.55.0 // indirect
193+
github.com/prometheus/procfs v0.15.1 // indirect
192194
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
193195
github.com/rivo/uniseg v0.2.0 // indirect
194196
github.com/rogpeppe/go-internal v1.12.0 // indirect
195-
github.com/rs/cors v1.8.3 // indirect
196-
github.com/rs/zerolog v1.32.0 // indirect
197+
github.com/rs/cors v1.11.1 // indirect
198+
github.com/rs/zerolog v1.33.0 // indirect
197199
github.com/sagikazarmark/locafero v0.4.0 // indirect
198200
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
199201
github.com/sasha-s/go-deadlock v0.3.1 // indirect
202+
github.com/shamaton/msgpack/v2 v2.2.0 // indirect
200203
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
201204
github.com/sourcegraph/conc v0.3.0 // indirect
202205
github.com/spf13/afero v1.11.0 // indirect
@@ -211,26 +214,26 @@ require (
211214
github.com/ulikunitz/xz v0.5.11 // indirect
212215
github.com/zondax/hid v0.9.2 // indirect
213216
github.com/zondax/ledger-go v0.14.3 // indirect
214-
go.etcd.io/bbolt v1.3.8 // indirect
217+
go.etcd.io/bbolt v1.3.10 // indirect
215218
go.opencensus.io v0.24.0 // indirect
216-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
217-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
218-
go.opentelemetry.io/otel v1.22.0 // indirect
219-
go.opentelemetry.io/otel/metric v1.22.0 // indirect
220-
go.opentelemetry.io/otel/trace v1.22.0 // indirect
219+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
220+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
221+
go.opentelemetry.io/otel v1.24.0 // indirect
222+
go.opentelemetry.io/otel/metric v1.24.0 // indirect
223+
go.opentelemetry.io/otel/trace v1.24.0 // indirect
221224
go.uber.org/multierr v1.11.0 // indirect
222-
golang.org/x/crypto v0.25.0 // indirect
223-
golang.org/x/net v0.27.0 // indirect
224-
golang.org/x/oauth2 v0.20.0 // indirect
225-
golang.org/x/sync v0.7.0 // indirect
226-
golang.org/x/sys v0.22.0 // indirect
227-
golang.org/x/term v0.22.0 // indirect
228-
golang.org/x/text v0.16.0 // indirect
225+
golang.org/x/crypto v0.26.0 // indirect
226+
golang.org/x/net v0.28.0 // indirect
227+
golang.org/x/oauth2 v0.21.0 // indirect
228+
golang.org/x/sync v0.8.0 // indirect
229+
golang.org/x/sys v0.24.0 // indirect
230+
golang.org/x/term v0.23.0 // indirect
231+
golang.org/x/text v0.17.0 // indirect
229232
golang.org/x/time v0.5.0 // indirect
230233
golang.org/x/tools v0.23.0 // indirect
231-
google.golang.org/api v0.162.0 // indirect
234+
google.golang.org/api v0.171.0 // indirect
232235
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
233-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
236+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect
234237
gopkg.in/ini.v1 v1.67.0 // indirect
235238
gopkg.in/yaml.v3 v3.0.1 // indirect
236239
gotest.tools/v3 v3.5.1 // indirect

0 commit comments

Comments
 (0)