diff --git a/modules/light-clients/08-wasm/Dockerfile b/modules/light-clients/08-wasm/Dockerfile index 2877f026ef3..4c6055eb20c 100644 --- a/modules/light-clients/08-wasm/Dockerfile +++ b/modules/light-clients/08-wasm/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.4-alpine as builder +FROM golang:1.23.4-alpine as builder-base ARG LIBWASM_VERSION ARG TARGETARCH @@ -23,12 +23,12 @@ RUN go mod download # Since it is not easy to fully cache a RUN script download of libwasmvm, we use two different stages # and copy the correct file in the final stage. The multistage setup also helps speed up the build process -FROM alpine:3.18 AS amd64-stage +FROM alpine:3.21 AS amd64-stage ARG LIBWASM_VERSION ADD https://github.com/CosmWasm/wasmvm/releases/download/${LIBWASM_VERSION}/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a -FROM alpine:3.18 AS arm64-stage +FROM alpine:3.21 AS arm64-stage ARG LIBWASM_VERSION ADD https://github.com/CosmWasm/wasmvm/releases/download/${LIBWASM_VERSION}/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a @@ -44,6 +44,6 @@ COPY --from=libwasm-stage /lib/libwasmvm_muslc.* /lib/ RUN go build -mod=readonly -tags "netgo ledger muslc" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=sim -X github.com/cosmos/cosmos-sdk/version.AppName=simd -X github.com/cosmos/cosmos-sdk/version.Version= -X github.com/cosmos/cosmos-sdk/version.Commit= -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo ledger muslc," -w -s -linkmode=external -extldflags "-Wl,-z,muldefs -static"' -trimpath -o /go/build/ ./... -FROM alpine:3.18 +FROM alpine:3.21 COPY --from=builder /go/build/simd /bin/simd ENTRYPOINT ["simd"] diff --git a/modules/light-clients/08-wasm/testing/simapp/app.go b/modules/light-clients/08-wasm/testing/simapp/app.go index f8d27ad0ce9..6b025bea332 100644 --- a/modules/light-clients/08-wasm/testing/simapp/app.go +++ b/modules/light-clients/08-wasm/testing/simapp/app.go @@ -110,6 +110,7 @@ import ( cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cmtcrypto "github.com/cometbft/cometbft/crypto" cmted25519 "github.com/cometbft/cometbft/crypto/ed25519" + cmttypes "github.com/cometbft/cometbft/types" wasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm" wasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" @@ -977,6 +978,17 @@ func (app *SimApp) InitChainer(ctx sdk.Context, req *abci.InitChainRequest) (*ab if err := app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()); err != nil { panic(err) } + + paramsProto, err := app.ConsensusParamsKeeper.ParamsStore.Get(ctx) + if err != nil { + return nil, err + } + consensusParams := cmttypes.ConsensusParamsFromProto(paramsProto) + consensusParams.Block.MaxGas = 75_000_000 // The same as Cosmos Hub at the moment + if err := app.ConsensusParamsKeeper.ParamsStore.Set(ctx, consensusParams.ToProto()); err != nil { + return nil, err + } + return app.ModuleManager.InitGenesis(ctx, genesisState) } diff --git a/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go b/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go index ba5303918c0..05f070929ed 100644 --- a/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go +++ b/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go @@ -16,6 +16,7 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/log" confixcmd "cosmossdk.io/tools/confix/cmd" + txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -27,6 +28,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/client/snapshot" "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -64,11 +66,17 @@ func NewRootCmd() *cobra.Command { initClientCtx := client.Context{}. WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). + WithAddressCodec(addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix())). + WithValidatorAddressCodec(addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix())). + WithConsensusAddressCodec(addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix())). WithHomeDir(simapp.DefaultNodeHome). - WithViper("") // In simapp, we don't use any prefix for env variables. + WithViper(""). // uses by default the binary name as prefix + WithAddressPrefix(sdk.GetConfig().GetBech32AccountAddrPrefix()). + WithValidatorPrefix(sdk.GetConfig().GetBech32ValidatorAddrPrefix()) rootCmd := &cobra.Command{ Use: "simd", @@ -96,6 +104,10 @@ func NewRootCmd() *cobra.Command { txConfigOpts := tx.ConfigOptions{ EnabledSignModes: enabledSignModes, TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx), + SigningOptions: &txsigning.Options{ + AddressCodec: initClientCtx.InterfaceRegistry.SigningContext().AddressCodec(), + ValidatorAddressCodec: initClientCtx.InterfaceRegistry.SigningContext().ValidatorAddressCodec(), + }, } txConfigWithTextual, err := tx.NewTxConfigWithOptions( codec.NewProtoCodec(encodingConfig.InterfaceRegistry),