Skip to content

Commit

Permalink
Update wasmd version
Browse files Browse the repository at this point in the history
  • Loading branch information
VegeBun-csj committed Nov 22, 2023
1 parent eefdbfb commit b54abda
Show file tree
Hide file tree
Showing 7 changed files with 160 additions and 122 deletions.
25 changes: 18 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ import (
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
// cosmwasm "github.com/CosmWasm/wasmvm"

appparams "github.com/DoraFactory/doravota/app/params"
"github.com/DoraFactory/doravota/docs"
Expand Down Expand Up @@ -161,7 +162,7 @@ var (

// GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to
// produce a list of enabled proposals to pass into wasmd app.
func GetEnabledProposals() []wasm.ProposalType {
/* func GetEnabledProposals() []wasm.ProposalType {
if EnableSpecificProposals == "" {
if ProposalsEnabled == "true" {
return wasm.EnableAllProposals
Expand All @@ -175,7 +176,7 @@ func GetEnabledProposals() []wasm.ProposalType {
}
return proposals
}

*/
func getGovProposalHandlers() []govclient.ProposalHandler {
var govProposalHandlers []govclient.ProposalHandler
// this line is used by starport scaffolding # stargate/app/govProposalHandlers
Expand Down Expand Up @@ -335,7 +336,7 @@ func New(
invCheckPeriod uint,
encodingConfig appparams.EncodingConfig,
appOpts servertypes.AppOptions,
enabledProposals []wasm.ProposalType,
// enabledProposals []wasm.ProposalType,
wasmOpts []wasm.Option,
baseAppOptions ...func(*baseapp.BaseApp),
) *App {
Expand Down Expand Up @@ -621,6 +622,15 @@ func New(
// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
availableCapabilities := strings.Join(AllCapabilities(), ",")

// wasmer, err := cosmwasm.NewVM(filepath.Join(wasmDir, "wasm"), availableCapabilities, 32, wasmConfig.ContractDebugMode, wasmConfig.MemoryCacheSize)
// if err != nil {
// panic(err)
// }

// trackingWasmVm := wasmtypes.Newwa(wasmer, &wasmdTypes.NoOpContractGasProcessor{})


app.WasmKeeper = wasm.NewKeeper(
appCodec,
keys[wasm.StoreKey],
Expand All @@ -643,9 +653,9 @@ func New(
)

// The gov proposal types can be individually enabled
if len(enabledProposals) != 0 {
/* if len(enabledProposals) != 0 {
govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, enabledProposals))
}
} */

// Set legacy router for backwards compatibility with gov v1beta1
app.GovKeeper.SetLegacyRouter(govRouter)
Expand Down Expand Up @@ -678,8 +688,9 @@ func New(

// Create static IBC router, add transfer route, then set and seal it
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule).
AddRoute(ibctransfertypes.ModuleName, transferIBCModule)
ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule)
ibcRouter.AddRoute(wasmtypes.ModuleName, wasmStack)
// this line is used by starport scaffolding # ibc/app/router
app.IBCKeeper.SetRouter(ibcRouter)

Expand Down
12 changes: 6 additions & 6 deletions app/simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func BenchmarkSimulation(b *testing.B) {
0,
app.MakeEncodingConfig(),
appOptions,
wasm.EnableAllProposals,
// wasm.EnableAllProposals,
emptyWasmOpts,
baseapp.SetChainID(config.ChainID),
)
Expand Down Expand Up @@ -178,7 +178,7 @@ func TestAppStateDeterminism(t *testing.T) {
simcli.FlagPeriodValue,
app.MakeEncodingConfig(),
appOptions,
wasm.EnableAllProposals,
// wasm.EnableAllProposals,
emptyWasmOpts,
fauxMerkleModeOpt,
baseapp.SetChainID(chainID),
Expand Down Expand Up @@ -258,7 +258,7 @@ func TestAppImportExport(t *testing.T) {
0,
app.MakeEncodingConfig(),
appOptions,
wasm.EnableAllProposals,
// wasm.EnableAllProposals,
emptyWasmOpts,
baseapp.SetChainID(config.ChainID),
)
Expand Down Expand Up @@ -321,7 +321,7 @@ func TestAppImportExport(t *testing.T) {
0,
app.MakeEncodingConfig(),
appOptions,
wasm.EnableAllProposals,
// wasm.EnableAllProposals,
emptyWasmOpts,
baseapp.SetChainID(config.ChainID),
)
Expand Down Expand Up @@ -416,7 +416,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
0,
app.MakeEncodingConfig(),
appOptions,
wasm.EnableAllProposals,
// wasm.EnableAllProposals,
emptyWasmOpts,
fauxMerkleModeOpt,
baseapp.SetChainID(config.ChainID),
Expand Down Expand Up @@ -485,7 +485,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
0,
app.MakeEncodingConfig(),
appOptions,
wasm.EnableAllProposals,
// wasm.EnableAllProposals,
emptyWasmOpts,
fauxMerkleModeOpt,
baseapp.SetChainID(config.ChainID),
Expand Down
2 changes: 2 additions & 0 deletions app/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ func AllCapabilities() []string {
"stargate",
"cosmwasm_1_1",
"cosmwasm_1_2",
"cosmwasm_1_3",
"cosmwasm_1_4",
}
}
6 changes: 3 additions & 3 deletions cmd/dorad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func (a appCreator) newApp(
cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)),
a.encodingConfig,
appOpts,
app.GetEnabledProposals(),
// app.GetEnabledProposals(),
wasmOpts,
baseapp.SetPruning(pruningOpts),
baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))),
Expand Down Expand Up @@ -353,7 +353,7 @@ func (a appCreator) appExport(
uint(1),
a.encodingConfig,
appOpts,
app.GetEnabledProposals(),
// app.GetEnabledProposals(),
emptyWasmOpts,
)

Expand Down Expand Up @@ -391,7 +391,7 @@ func initAppConfig() (string, interface{}) {
// - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their
// own app.toml to override, or use this default value.
//
srvCfg.MinGasPrices = "0.0001peaka"
srvCfg.MinGasPrices = "100000000000peaka"

customAppConfig := CustomAppConfig{
Config: *srvCfg,
Expand Down
71 changes: 41 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ go 1.19

require (
cosmossdk.io/api v0.3.1
cosmossdk.io/errors v1.0.0-beta.7
github.com/CosmWasm/wasmd v0.40.2
cosmossdk.io/errors v1.0.0
// github.com/CosmWasm/wasmd v0.40.2
github.com/CosmWasm/wasmd v0.43.0
// github.com/CosmWasm/wasmvm v1.5.0 // indirect
github.com/cometbft/cometbft v0.37.2
github.com/cometbft/cometbft-db v0.8.0
github.com/cosmos/cosmos-sdk v0.47.3
github.com/cosmos/cosmos-sdk v0.47.5
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-go/v7 v7.2.0
github.com/cosmos/ibc-go/v7 v7.3.0
github.com/golang/protobuf v1.5.3
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2
github.com/prometheus/client_golang v1.15.0
github.com/prometheus/client_golang v1.16.0
github.com/spf13/cast v1.5.1
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
Expand All @@ -29,21 +31,21 @@ require (
)

require (
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.19.0 // indirect
cloud.google.com/go v0.110.4 // indirect
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.13.0 // indirect
cloud.google.com/go/storage v1.29.0 // indirect
cloud.google.com/go/iam v1.1.0 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/core v0.5.1 // indirect
cosmossdk.io/depinject v1.0.0-alpha.3 // indirect
cosmossdk.io/log v1.1.0 // indirect
cosmossdk.io/math v1.0.1 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/log v1.2.1 // indirect
cosmossdk.io/math v1.1.2 // indirect
cosmossdk.io/tools/rosetta v0.2.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/CosmWasm/wasmvm v1.2.4 // indirect
github.com/CosmWasm/wasmvm v1.4.1 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/aws/aws-sdk-go v1.44.203 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -55,13 +57,16 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
github.com/cockroachdb/errors v1.10.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect
github.com/confio/ics23/go v0.9.0 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v0.20.0 // indirect
github.com/cosmos/iavl v0.20.1 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
Expand All @@ -77,6 +82,7 @@ require (
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/getsentry/sentry-go v0.23.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
Expand All @@ -91,10 +97,10 @@ require (
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/s2a-go v0.1.3 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
Expand All @@ -115,13 +121,15 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.7 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/linxGnu/grocksdb v1.7.16 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
Expand All @@ -135,11 +143,12 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rakyll/statik v0.1.7 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/cors v1.8.3 // indirect
github.com/rs/zerolog v1.29.1 // indirect
github.com/rs/zerolog v1.30.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand All @@ -153,19 +162,21 @@ require (
github.com/zondax/ledger-go v0.14.1 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.122.0 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.56.2 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit b54abda

Please sign in to comment.