diff --git a/Dockerfile b/Dockerfile index 0de80b510..ee59d18ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,29 @@ ARG IMG_TAG=latest # Compile the shentud binary -FROM golang:1.19-alpine AS shentud-builder +FROM golang:1.22-alpine AS shentud-builder WORKDIR /src/app/ +ENV PACKAGES="curl make git libc-dev bash file gcc linux-headers eudev-dev" +RUN apk add --no-cache $PACKAGES + +# See https://github.com/CosmWasm/wasmvm/releases +ARG WASMVM_VERSION=v2.1.3 +ADD https://github.com/CosmWasm/wasmvm/releases/download/${WASMVM_VERSION}/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a +ADD https://github.com/CosmWasm/wasmvm/releases/download/${WASMVM_VERSION}/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a +RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep faea4e15390e046d2ca8441c21a88dba56f9a0363f92c5d94015df0ac6da1f2d +RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 8dab08434a5fe57a6fbbcb8041794bc3c31846d31f8ff5fb353ee74e0fcd3093 +RUN cp "/lib/libwasmvm_muslc.$(uname -m).a" /lib/libwasmvm_muslc.a + COPY go.mod go.sum* ./ RUN go mod download + COPY . . -ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 -RUN apk add --no-cache $PACKAGES -RUN CGO_ENABLED=0 make install +RUN LEDGER_ENABLED=false LINK_STATICALLY=true BUILD_TAGS=muslc make build # Add to a distroless container -FROM distroless.dev/static:$IMG_TAG +FROM gcr.io/distroless/cc:$IMG_TAG ARG IMG_TAG -COPY --from=shentud-builder /go/bin/shentud /usr/local/bin/ +COPY --from=shentud-builder /src/app/build/shentud /usr/local/bin/ EXPOSE 26656 26657 1317 9090 -USER 0 ENTRYPOINT ["shentud", "start"] diff --git a/Makefile b/Makefile index 84224bb49..ea26e3af8 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,28 @@ -PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') -VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//') + COMMIT := $(shell git log -1 --format='%H') + +# don't override user values +ifeq (,$(VERSION)) + VERSION := $(shell git describe --exact-match 2>/dev/null) + # if VERSION is empty, then populate it with branch's name and raw commit hash + ifeq (,$(VERSION)) + VERSION := $(BRANCH)-$(COMMIT) + endif +endif + +PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') LEDGER_ENABLED ?= true -GOBIN ?= $(GOPATH)/bin -STATIK = $(GOBIN)/statik -SHASUM := $(shell which sha256sum) -PKG_LIST := $(shell go list ./...) +SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') +TM_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') # grab everything after the space in "github.com/cometbft/cometbft v0.34.7" DOCKER := $(shell which docker) -DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf BUILDDIR ?= $(CURDIR)/build -verbosity = 2 +GO_SYSTEM_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1-2) +REQUIRE_GO_VERSION = 1.22 + +export GO111MODULE = on + +# process build tags build_tags = netgo ifeq ($(LEDGER_ENABLED),true) @@ -36,14 +48,11 @@ ifeq ($(LEDGER_ENABLED),true) endif endif -ifeq (cleveldb,$(findstring cleveldb,$(GAIA_BUILD_OPTIONS))) - build_tags += gcc -endif build_tags += $(BUILD_TAGS) build_tags := $(strip $(build_tags)) whitespace := -whitespace += $(whitespace) +whitespace := $(whitespace) $(whitespace) comma := , build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags)) @@ -51,9 +60,14 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=shentu \ -X github.com/cosmos/cosmos-sdk/version.AppName=shentud \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ - -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" + -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \ + -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TM_VERSION) -build_tags := $(strip $(build_tags)) + +ifeq ($(LINK_STATICALLY),true) + ldflags += -linkmode=external -extldflags "-Wl,-z,muldefs -static" +endif +ldflags += $(LDFLAGS) ldflags := $(strip $(ldflags)) BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' @@ -61,75 +75,167 @@ BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' # The below include contains the tools target. include devtools/Makefile -export GO111MODULE = on +############################################################################### +### Build ### +############################################################################### + +check_version: +ifneq ($(shell [ "$(GO_SYSTEM_VERSION)" \< "$(REQUIRE_GO_VERSION)" ] && echo true),) + @echo "ERROR: Minimum Go version $(REQUIRE_GO_VERSION) is required for $(VERSION) of Gaia." + exit 1 +endif all: install release lint test-unit -install: go.sum - go install $(BUILD_FLAGS) ./app/shentud - -proto-swagger-gen: - @./devtools/protoc-swagger-gen.sh - -update-swagger-docs: statik - $(GOBIN)/statik -src=docs/swagger -dest=docs -f -m - @if [ -n "$(git status --porcelain)" ]; then \ - echo "\033[91mSwagger docs are out of sync!!!\033[0m";\ - exit 1;\ - else \ - echo "\033[92mSwagger docs are in sync\033[0m";\ - fi - -update-cli-docs: install - shentud --doc docs/shentud - @perl -pi -e "s|^#* Auto generated by .*||" docs/**/*.md - @perl -pi -e "s|$$HOME|~|" docs/**/*.md - -release: go.sum - GOOS=linux go build $(BUILD_FLAGS) -o build/shentud ./app/shentud - GOOS=windows go build $(BUILD_FLAGS) -o build/shentud.exe ./app/shentud - GOOS=darwin go build $(BUILD_FLAGS) -o build/shentud-macos ./app/shentud - -build: go.sum -ifeq ($(OS),Windows_NT) - go build -mod=readonly $(BUILD_FLAGS) -o build/shentud.exe ./app/shentud -else - go build -mod=readonly $(BUILD_FLAGS) -o build/shentud ./app/shentud -endif +BUILD_TARGETS := build install -build-linux: go.sum - LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build +build: BUILD_ARGS=-o $(BUILDDIR)/ -########## Tools ########## +$(BUILD_TARGETS): check_version go.sum $(BUILDDIR)/ + go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./... -go-mod-cache: go.sum - @echo "--> Download go modules to local cache" - @go mod download +$(BUILDDIR)/: + mkdir -p $(BUILDDIR)/ + +vulncheck: $(BUILDDIR)/ + GOBIN=$(BUILDDIR) go install golang.org/x/vuln/cmd/govulncheck@latest + $(BUILDDIR)/govulncheck ./... go.sum: go.mod @echo "--> Ensure dependencies have not been modified" + @echo "--> Ensure dependencies have not been modified unless suppressed by SKIP_MOD_VERIFY" +ifndef SKIP_MOD_VERIFY go mod verify +endif + go mod tidy + @echo "--> Download go modules to local cache" + go mod download + +draw-deps: + @# requires brew install graphviz or apt-get install graphviz + go install github.com/RobotsAndPencils/goviz + @goviz -i ./cmd/shentud -d 2 | dot -Tpng -o dependency-graph.png clean: - #rm -rf snapcraft-local.yaml build/ rm -rf $(BUILDDIR)/ artifacts/ -distclean: - rm -rf \ - gitian-build-darwin/ \ - gitian-build-linux/ \ - gitian-build-windows/ \ - .gitian-builder-cache/ +distclean: clean + rm -rf vendor/ -tidy: - @gofmt -s -w . - @go mod tidy +############################################################################### +### Release ### +############################################################################### +GO_VERSION := $(shell cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2) +GORELEASER_IMAGE := ghcr.io/goreleaser/goreleaser-cross:v$(GO_VERSION) +COSMWASM_VERSION := $(shell go list -m github.com/CosmWasm/wasmvm/v2 | sed 's/.* //') + +# create tag and run goreleaser without publishing +# errors are possible while running goreleaser - the process can run for >30 min +# if the build is failing due to timeouts use goreleaser-build-local instead +create-release-dry-run: +ifneq ($(strip $(TAG)),) + @echo "--> Dry running release for tag: $(TAG)" + @echo "--> Create tag: $(TAG) dry run" + git tag -s $(TAG) -m $(TAG) + git push origin $(TAG) --dry-run + @echo "--> Delete local tag: $(TAG)" + @git tag -d $(TAG) + @echo "--> Running goreleaser" + @go install github.com/goreleaser/goreleaser@latest + @docker run \ + --rm \ + -e CGO_ENABLED=1 \ + -e TM_VERSION=$(TM_VERSION) \ + -e COSMWASM_VERSION=$(COSMWASM_VERSION) \ + -v `pwd`:/go/src/shentud \ + -w /go/src/shentud \ + $(GORELEASER_IMAGE) \ + release \ + --snapshot \ + --skip=publish \ + --verbose \ + --clean + @rm -rf dist/ + @echo "--> Done create-release-dry-run for tag: $(TAG)" +else + @echo "--> No tag specified, skipping tag release" +endif -lint: tidy - @echo "--> Running linter" - @go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout=10m +# Build static binaries for linux/amd64 using docker buildx +# Pulled from neutron-org/neutron: https://github.com/neutron-org/neutron/blob/v4.2.2/Makefile#L107 +build-static-linux-amd64: go.sum $(BUILDDIR)/ + $(DOCKER) buildx create --name shentubuilder || true + $(DOCKER) buildx use shentubuilder + $(DOCKER) buildx build \ + --build-arg GO_VERSION=$(GO_VERSION) \ + --build-arg GIT_VERSION=$(VERSION) \ + --build-arg GIT_COMMIT=$(COMMIT) \ + --build-arg BUILD_TAGS=$(build_tags_comma_sep),muslc \ + --platform linux/amd64 \ + -t shentud-static-amd64 \ + -f Dockerfile . \ + --load + $(DOCKER) rm -f shentubinary || true + $(DOCKER) create -ti --name shentubinary shentud-static-amd64 + $(DOCKER) cp shentubinary:/usr/local/bin/ $(BUILDDIR)/shentud-linux-amd64 + $(DOCKER) rm -f shentubinary + +# uses goreleaser to create static binaries for darwin on local machine +goreleaser-build-local: + docker run \ + --rm \ + -e CGO_ENABLED=1 \ + -e TM_VERSION=$(TM_VERSION) \ + -e COSMWASM_VERSION=$(COSMWASM_VERSION) \ + -v `pwd`:/go/src/shentud \ + -w /go/src/shentud \ + $(GORELEASER_IMAGE) \ + release \ + --snapshot \ + --skip=publish \ + --release-notes ./RELEASE_NOTES.md \ + --timeout 90m \ + --verbose + +# uses goreleaser to create static binaries for linux an darwin +# requires access to GITHUB_TOKEN which has to be available in the CI environment +ifdef GITHUB_TOKEN +ci-release: + docker run \ + --rm \ + -e CGO_ENABLED=1 \ + -e GITHUB_TOKEN=$(GITHUB_TOKEN) \ + -e TM_VERSION=$(TM_VERSION) \ + -e COSMWASM_VERSION=$(COSMWASM_VERSION) \ + -v `pwd`:/go/src/shentud \ + -w /go/src/shentud \ + $(GORELEASER_IMAGE) \ + release \ + --release-notes ./RELEASE_NOTES.md \ + --timeout=90m \ + --clean +else +ci-release: + @echo "Error: GITHUB_TOKEN is not defined. Please define it before running 'make release'." +endif -########## Testing ########## +# create tag and publish it +create-release: +ifneq ($(strip $(TAG)),) + @echo "--> Running release for tag: $(TAG)" + @echo "--> Create release tag: $(TAG)" + git tag -s $(TAG) -m $(TAG) + git push origin $(TAG) + @echo "--> Done creating release tag: $(TAG)" +else + @echo "--> No tag specified, skipping create-release" +endif + +############################################################################### +### Tests & Simulation ### +############################################################################### + +include sims.mk PACKAGES_UNIT=$(shell go list ./... | grep -v -e '/tests/e2e') PACKAGES_E2E=$(shell go list ./... | grep '/e2e') @@ -142,7 +248,7 @@ test-unit-cover: ARGS=-timeout=5m -tags='norace' -coverprofile=coverage.txt -cov test-unit-cover: TEST_PACKAGES=$(PACKAGES_UNIT) test-race: ARGS=-timeout=5m -race test-race: TEST_PACKAGES=$(PACKAGES_UNIT) -test-e2e: ARGS=-timeout=25m -v +test-e2e: ARGS=-timeout=35m -v test-e2e: TEST_PACKAGES=$(PACKAGES_E2E) $(TEST_TARGETS): run-tests @@ -158,40 +264,47 @@ endif .PHONY: run-tests $(TEST_TARGETS) docker-build-debug: - @docker build -t shentuchain/shentud-e2e --build-arg IMG_TAG=debug -f e2e.Dockerfile . + @docker build -t shentuchain/shentud-e2e --build-arg IMG_TAG=debug -f Dockerfile . +# TODO: Push this to the Cosmos Dockerhub so we don't have to keep building it # in CI. docker-build-hermes: @cd tests/e2e/docker; docker build -t cosmos/hermes-e2e:1.0.0 -f hermes.Dockerfile . +docker-build-all: docker-build-debug docker-build-hermes + +############################################################################### +### Linting ### +############################################################################### +golangci_lint_cmd=golangci-lint +golangci_version=v1.60.1 + +tidy: + @gofmt -s -w . + @go mod tidy -image: Dockerfile Dockerfile.update - @docker rmi -f shentu-base -f shentud - @docker build -t shentu-base -t shentud . -f Dockerfile +lint: tidy + @echo "--> Running linter" + @go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout=10m -image.update: Dockerfile.update - @docker rmi -f shentud - @docker build -t shentud . -f Dockerfile.update +lint-fix: + @echo "--> Running linter" + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + @$(golangci_lint_cmd) run --fix --out-format=tab --issues-exit-code=0 -include .env +format: + @go install mvdan.cc/gofumpt@latest + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name "*.pb.go" -not -name "*.pb.gw.go" -not -name "*.pulsar.go" -not -path "./crypto/keys/secp256k1/*" | xargs gofumpt -w -l + $(golangci_lint_cmd) run --fix +.PHONY: format ############################################################################### ### Localnet ### ############################################################################### -build-docker-shentunode: - $(MAKE) -C networks/local - -# Run a 4-node testnet locally -localnet-start: build-linux build-docker-shentunode localnet-stop - @if ! [ -f build/node0/shentu/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/shentu:Z shentufoundation/shentunode testnet --v 4 -o . --starting-ip-address 192.168.10.2 --keyring-backend=test ; fi - docker-compose up -d - -# Stop testnet -localnet-stop: - docker-compose down - -start-localnet-ci: +start-localnet-ci: build + rm -rf ~/.shentud-liveness ./build/shentud init liveness -o --chain-id liveness --home ~/.shentud-liveness ./build/shentud config set client keyring-backend test --home ~/.shentud-liveness ./build/shentud keys add val --keyring-backend test --home ~/.shentud-liveness @@ -203,10 +316,26 @@ start-localnet-ci: .PHONY: start-localnet-ci -# include simulations -include sims.mk +############################################################################### +### Docker ### +############################################################################### + +test-docker: + @docker build -f contrib/Dockerfile.test -t ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) . + @docker tag ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) ${TEST_DOCKER_REPO}:$(shell git rev-parse --abbrev-ref HEAD | sed 's#/#_#g') + @docker tag ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) ${TEST_DOCKER_REPO}:latest + +test-docker-push: test-docker + @docker push ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) + @docker push ${TEST_DOCKER_REPO}:$(shell git rev-parse --abbrev-ref HEAD | sed 's#/#_#g') + @docker push ${TEST_DOCKER_REPO}:latest + +.PHONY: all build-linux install format lint draw-deps clean build \ + docker-build-debug docker-build-hermes docker-build-all + + + +#build-linux: go.sum +# CGO_ENABLED=1 LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build +# -.PHONY: all build-linux install release release32 \ - fix lint test cov coverage coverage.out image image.update \ - build-docker-shentunode localnet-start localnet-stop \ - docker-build-debug docker-build-hermes \ diff --git a/app/ante.go b/app/ante.go new file mode 100644 index 000000000..b94ab13ee --- /dev/null +++ b/app/ante.go @@ -0,0 +1,67 @@ +package app + +import ( + "errors" + + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" + "github.com/cosmos/ibc-go/v8/modules/core/keeper" + + corestoretypes "cosmossdk.io/core/store" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types" +) + +// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC +// channel keeper. +type HandlerOptions struct { + ante.HandlerOptions + + IBCKeeper *keeper.Keeper + WasmConfig *wasmTypes.WasmConfig + WasmKeeper *wasmkeeper.Keeper + TXCounterStoreService corestoretypes.KVStoreService +} + +// NewAnteHandler constructor +func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { + if options.AccountKeeper == nil { + return nil, errors.New("account keeper is required for ante builder") + } + if options.BankKeeper == nil { + return nil, errors.New("bank keeper is required for ante builder") + } + if options.SignModeHandler == nil { + return nil, errors.New("sign mode handler is required for ante builder") + } + if options.WasmConfig == nil { + return nil, errors.New("wasm config is required for ante builder") + } + if options.TXCounterStoreService == nil { + return nil, errors.New("wasm store service is required for ante builder") + } + + anteDecorators := []sdk.AnteDecorator{ + ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first + wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), // after setup context to enforce limits early + wasmkeeper.NewCountTXDecorator(options.TXCounterStoreService), + wasmkeeper.NewGasRegisterDecorator(options.WasmKeeper.GetGasRegister()), + ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), + ante.NewValidateBasicDecorator(), + ante.NewTxTimeoutHeightDecorator(), + ante.NewValidateMemoDecorator(options.AccountKeeper), + ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), + ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators + ante.NewValidateSigCountDecorator(options.AccountKeeper), + ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), + ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + ante.NewIncrementSequenceDecorator(options.AccountKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCKeeper), + } + + return sdk.ChainAnteDecorators(anteDecorators...), nil +} diff --git a/app/app.go b/app/app.go index 94cf0c173..ed0f6aeda 100644 --- a/app/app.go +++ b/app/app.go @@ -3,8 +3,10 @@ package app import ( "encoding/json" + "fmt" "io" "os" + "path/filepath" "github.com/spf13/cast" @@ -42,12 +44,14 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth/ante" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" sdkauthkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" sdkauthz "github.com/cosmos/cosmos-sdk/x/authz" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" @@ -104,6 +108,10 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + "github.com/CosmWasm/wasmd/x/wasm" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + appparams "github.com/shentufoundation/shentu/v2/app/params" "github.com/shentufoundation/shentu/v2/x/auth" authkeeper "github.com/shentufoundation/shentu/v2/x/auth/keeper" @@ -150,6 +158,7 @@ var ( shieldtypes.ModuleName: {authtypes.Burner}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, bountytypes.ModuleName: {authtypes.Burner}, + wasmtypes.ModuleName: {authtypes.Burner}, } ) @@ -198,11 +207,13 @@ type ShentuApp struct { BountyKeeper bountykeeper.Keeper GroupKeeper groupkeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper + WasmKeeper wasmkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper + scopedWasmKeeper capabilitykeeper.ScopedKeeper // module manager mm *module.Manager @@ -484,6 +495,31 @@ func NewShentuApp( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper + wasmDir := filepath.Join(homePath, "wasm") + wasmConfig, err := wasm.ReadWasmConfig(appOpts) + if err != nil { + panic("error while reading wasm config: " + err.Error()) + } + app.WasmKeeper = wasmkeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(app.keys[wasmtypes.StoreKey]), + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + distrkeeper.NewQuerier(app.DistrKeeper), + app.IBCFeeKeeper, + app.IBCKeeper.ChannelKeeper, + app.IBCKeeper.PortKeeper, + app.scopedWasmKeeper, + app.TransferKeeper, + bApp.MsgServiceRouter(), + bApp.GRPCQueryRouter(), + wasmDir, + wasmConfig, + wasmkeeper.BuiltInCapabilities(), + authtypes.NewModuleAddress(sdkgovtypes.ModuleName).String(), + ) + /**** Module Options ****/ // always skip genesis invariant for now @@ -510,6 +546,7 @@ func NewShentuApp( cert.NewAppModule(app.CertKeeper, app.AccountKeeper, app.BankKeeper), oracle.NewAppModule(app.OracleKeeper, app.BankKeeper), shield.NewAppModule(app.ShieldKeeper, app.AccountKeeper, app.BankKeeper), + wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)), ibc.NewAppModule(app.IBCKeeper), ibctm.AppModule{}, params.NewAppModule(app.ParamsKeeper), @@ -537,6 +574,22 @@ func NewShentuApp( app.BasicModuleManager.RegisterLegacyAminoCodec(legacyAmino) app.BasicModuleManager.RegisterInterfaces(interfaceRegistry) + // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) + enabledSignModes := append([]sigtypes.SignMode(nil), authtx.DefaultSignModes...) + enabledSignModes = append(enabledSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts := authtx.ConfigOptions{ + EnabledSignModes: enabledSignModes, + TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), + } + txConfig, err = authtx.NewTxConfigWithOptions( + appCodec, + txConfigOpts, + ) + if err != nil { + panic(err) + } + app.txConfig = txConfig + app.mm.SetOrderPreBlockers( upgradetypes.ModuleName, ) @@ -558,6 +611,7 @@ func NewShentuApp( sdkminttypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, sdkauthz.ModuleName, sdkfeegrant.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, ibcexported.ModuleName, ibctransfertypes.ModuleName, icatypes.ModuleName, certtypes.ModuleName, oracletypes.ModuleName, bountytypes.ModuleName, group.ModuleName, consensusparamtypes.ModuleName, + wasmtypes.ModuleName, ) // NOTE: genutil moodule must occur after staking so that pools @@ -587,6 +641,7 @@ func NewShentuApp( bountytypes.ModuleName, group.ModuleName, consensusparamtypes.ModuleName, + wasmtypes.ModuleName, ) app.mm.SetOrderExportGenesis( @@ -614,11 +669,12 @@ func NewShentuApp( bountytypes.ModuleName, group.ModuleName, consensusparamtypes.ModuleName, + wasmtypes.ModuleName, ) app.mm.RegisterInvariants(app.CrisisKeeper) app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - err := app.mm.RegisterServices(app.configurator) + err = app.mm.RegisterServices(app.configurator) if err != nil { panic(err) } @@ -651,25 +707,12 @@ func NewShentuApp( app.MountTransientStores(tkeys) app.MountMemoryStores(memKeys) - // initialize BaseApp - // The AnteHandler handles signature verification and transaction pre-processing - anteHandler, err := ante.NewAnteHandler( - ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - FeegrantKeeper: app.FeegrantKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - }, - ) - if err != nil { - tmos.Exit(err.Error()) - } - app.SetAnteHandler(anteHandler) app.SetInitChainer(app.InitChainer) app.SetPreBlocker(app.PreBlocker) app.SetBeginBlocker(app.BeginBlocker) app.SetEndBlocker(app.EndBlocker) + // The AnteHandler handles signature verification and transaction pre-processing + app.setAnteHandler(txConfig, wasmConfig, keys[wasmtypes.StoreKey]) app.RegisterUpgradeHandlers() @@ -685,6 +728,30 @@ func NewShentuApp( return app } +func (app *ShentuApp) setAnteHandler(txConfig client.TxConfig, wasmConfig wasmtypes.WasmConfig, txCounterStoreKey *storetypes.KVStoreKey) { + anteHandler, err := NewAnteHandler( + HandlerOptions{ + HandlerOptions: ante.HandlerOptions{ + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + SignModeHandler: txConfig.SignModeHandler(), + FeegrantKeeper: app.FeegrantKeeper, + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + }, + IBCKeeper: app.IBCKeeper, + WasmConfig: &wasmConfig, + WasmKeeper: &app.WasmKeeper, + TXCounterStoreService: runtime.NewKVStoreService(txCounterStoreKey), + }, + ) + if err != nil { + panic(fmt.Errorf("failed to create AnteHandler: %s", err)) + } + + // set ante and post handlers + app.SetAnteHandler(anteHandler) +} + // Name returns the name of the App func (app *ShentuApp) Name() string { return app.BaseApp.Name() } @@ -941,6 +1008,7 @@ func StoreKeys() ( capabilitytypes.StoreKey, bountytypes.StoreKey, group.StoreKey, + wasmtypes.StoreKey, } keys := storetypes.NewKVStoreKeys(storeKeys...) diff --git a/app/shentud/cmd/root.go b/app/shentud/cmd/root.go index 41f944727..4c993cb90 100644 --- a/app/shentud/cmd/root.go +++ b/app/shentud/cmd/root.go @@ -4,6 +4,8 @@ import ( "io" "os" + "github.com/CosmWasm/wasmd/x/wasm" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/spf13/cast" "github.com/spf13/cobra" @@ -34,7 +36,10 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/types/tx/signing" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" @@ -49,11 +54,15 @@ func NewRootCmd() *cobra.Command { cfg.SetBech32PrefixForAccount(common.Bech32PrefixAccAddr, common.Bech32PrefixAccPub) cfg.SetBech32PrefixForValidator(common.Bech32PrefixValAddr, common.Bech32PrefixValPub) cfg.SetBech32PrefixForConsensusNode(common.Bech32PrefixConsAddr, common.Bech32PrefixConsPub) + cfg.SetAddressVerifier(wasmtypes.VerifyAddressLen()) cfg.Seal() tempApp := app.NewShentuApp( - log.NewNopLogger(), dbm.NewMemDB(), nil, true, - simtestutil.NewAppOptionsWithFlagHome(app.DefaultNodeHome), + log.NewNopLogger(), + dbm.NewMemDB(), + nil, + true, + simtestutil.NewAppOptionsWithFlagHome(tempDir()), ) encodingConfig := tempApp.EncodingConfig() @@ -84,6 +93,25 @@ func NewRootCmd() *cobra.Command { if err != nil { return err } + + // This needs to go after ReadFromClientConfig, as that function + // sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode + // is only available if the client is online. + if !initClientCtx.Offline { + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL), + TextualCoinMetadataQueryFn: authtxconfig.NewGRPCCoinMetadataQueryFn(initClientCtx), + } + txConfigWithTextual, err := tx.NewTxConfigWithOptions( + initClientCtx.Codec, + txConfigOpts, + ) + if err != nil { + return err + } + initClientCtx = initClientCtx.WithTxConfig(txConfigWithTextual) + } + if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { return err } @@ -92,14 +120,6 @@ func NewRootCmd() *cobra.Command { return server.InterceptConfigsPreRunHandler(cmd, template, customAppConfig, tmcfg.DefaultConfig()) }, - //Run: func(cmd *cobra.Command, args []string) { - // docDir, err := cmd.Flags().GetString(shentuinit.DocFlag) - // if err == nil && docDir != "" { - // shentuinit.GenDoc(cmd, docDir) - // } else if err = cmd.Help(); err != nil { - // panic(err) - // } - //}, } initRootCmd(rootCmd, encodingConfig, tempApp.BasicModuleManager) @@ -176,6 +196,7 @@ func genesisCommand(txConfig client.TxConfig, basicManager module.BasicManager, func addModuleInitFlags(startCmd *cobra.Command) { crisis.AddModuleInitFlags(startCmd) + wasm.AddModuleInitFlags(startCmd) } func queryCommand() *cobra.Command { @@ -263,3 +284,13 @@ func createSimappAndExport( return shentuApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } + +var tempDir = func() string { + dir, err := os.MkdirTemp("", "wasmd") + if err != nil { + panic("failed to create temp dir: " + err.Error()) + } + defer os.RemoveAll(dir) + + return dir +} diff --git a/app/sim_test.go b/app/sim_test.go index 40b50dd63..13008b184 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -70,10 +70,13 @@ func NewSimApp(logger log.Logger, db dbm.DB, baseAppOptions ...func(*baseapp.Bas appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + dir, err := os.MkdirTemp("", "shentu-simulation") + if err != nil { + return nil, err + } + appOptions[flags.FlagHome] = dir app := NewShentuApp(logger, db, nil, true, appOptions, baseAppOptions...) - //if err := app.LoadLatestVersion(); err != nil { - // return nil, err - //} + return app, nil } @@ -319,6 +322,8 @@ func TestAppSimulationAfterImport(t *testing.T) { require.NoError(t, err) } +// TODO: Make another test for the fuzzer itself, which just has noOp txs +// and doesn't depend on the application. func TestAppStateDeterminism(t *testing.T) { if !simcli.FlagEnabledValue { t.Skip("skipping application simulation") @@ -333,16 +338,28 @@ func TestAppStateDeterminism(t *testing.T) { numSeeds := 3 numTimesToRunPerSeed := 5 + + // We will be overriding the random seed and just run a single simulation on the provided seed value + if config.Seed != simcli.DefaultSeedValue { + numSeeds = 1 + } + appHashList := make([]json.RawMessage, numTimesToRunPerSeed) + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue for i := 0; i < numSeeds; i++ { - //nolint: gosec - config.Seed = rand.Int63() + if config.Seed == simcli.DefaultSeedValue { + config.Seed = rand.Int63() + } + fmt.Println("config.Seed: ", config.Seed) for j := 0; j < numTimesToRunPerSeed; j++ { logger := log.NewNopLogger() if simcli.FlagVerboseValue { logger = log.NewTestLogger(t) + } else { + logger = log.NewNopLogger() } db := dbm.NewMemDB() diff --git a/app/upgrade_handler.go b/app/upgrade_handler.go index c3d1fba31..931c6f93f 100644 --- a/app/upgrade_handler.go +++ b/app/upgrade_handler.go @@ -6,13 +6,14 @@ import ( storetypes "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/module" ) const ( - upgradeName = "v2.13.0" + upgradeName = "v2.14.0" ) func (app ShentuApp) setUpgradeHandler(_ codec.BinaryCodec) { @@ -30,7 +31,9 @@ func (app ShentuApp) setUpgradeHandler(_ codec.BinaryCodec) { if upgradeInfo.Name == upgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { storeUpgrades := storetypes.StoreUpgrades{ - Added: []string{}, + Added: []string{ + wasmtypes.ModuleName, + }, } // configure store loader that checks if version == upgradeHeight and applies store upgrades diff --git a/e2e.Dockerfile b/e2e.Dockerfile deleted file mode 100644 index 7075e9eb1..000000000 --- a/e2e.Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -ARG IMG_TAG=latest - -# Compile the shentud binary -FROM golang:1.22-alpine AS shentud-builder -WORKDIR /src/app/ -COPY go.mod go.sum* ./ -RUN go mod download -COPY . . -ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 -RUN apk add --no-cache $PACKAGES -RUN CGO_ENABLED=0 make install - -# Add to a distroless container -FROM gcr.io/distroless/cc:$IMG_TAG -ARG IMG_TAG -COPY --from=shentud-builder /go/bin/shentud /usr/local/bin/ -EXPOSE 26656 26657 1317 9090 - -ENTRYPOINT ["shentud", "start"] diff --git a/go.mod b/go.mod index 6e9c1f6b3..503c723ee 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( cosmossdk.io/x/feegrant v0.1.1 cosmossdk.io/x/tx v0.13.7 cosmossdk.io/x/upgrade v0.1.4 + github.com/CosmWasm/wasmd v0.53.0 github.com/cometbft/cometbft v0.38.13 github.com/cosmos/cosmos-db v1.1.0 github.com/cosmos/cosmos-proto v1.0.0-beta.5 @@ -69,6 +70,7 @@ require ( github.com/Antonboom/nilnil v0.1.3 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.4.0 // indirect + github.com/CosmWasm/wasmvm/v2 v2.1.3 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect @@ -129,6 +131,7 @@ require ( github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/docker/cli v24.0.7+incompatible // indirect github.com/docker/docker v24.0.9+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect @@ -184,6 +187,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-github/v27 v27.0.6 // indirect github.com/google/go-querystring v1.0.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -201,7 +205,7 @@ require ( github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.4 // indirect + github.com/hashicorp/go-getter v1.7.5 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect @@ -298,6 +302,7 @@ require ( github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect github.com/securego/gosec/v2 v2.15.0 // indirect + github.com/shamaton/msgpack/v2 v2.2.0 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.2 // indirect diff --git a/go.sum b/go.sum index e99ad02a6..22a963b3c 100644 --- a/go.sum +++ b/go.sum @@ -216,6 +216,8 @@ cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= +cosmossdk.io/x/nft v0.1.1 h1:pslAVS8P5NkW080+LWOamInjDcq+v2GSCo+BjN9sxZ8= +cosmossdk.io/x/nft v0.1.1/go.mod h1:Kac6F6y2gsKvoxU+fy8uvxRTi4BIhLOor2zgCNQwVgY= cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38= @@ -237,6 +239,10 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/CosmWasm/wasmd v0.53.0 h1:kdaoAi20bIb4VCsxw9pRaT2g5PpIp82Wqrr9DRVN9ao= +github.com/CosmWasm/wasmd v0.53.0/go.mod h1:FJl/aWjdpGof3usAMFQpDe07Rkx77PUzp0cygFMOvtw= +github.com/CosmWasm/wasmvm/v2 v2.1.3 h1:CSJTauZqkHyb9yic6JVYCjiGUgxI2MJV2QzfSu8m49c= +github.com/CosmWasm/wasmvm/v2 v2.1.3/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -411,6 +417,8 @@ github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fr github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= +github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd h1:Lx+/5dZ/nN6qPXP2Ofog6u1fmlkCFA1ElcOconnofEM= +github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd/go.mod h1:JWfpWVKJKiKtd53/KbRoKfxWl8FsT2GPcNezTOk0o5Q= github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= github.com/cosmos/ibc-go/v8 v8.5.1 h1:3JleEMKBjRKa3FeTKt4fjg22za/qygLBo7mDkoYTNBs= @@ -465,6 +473,8 @@ github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkz github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= @@ -810,8 +820,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= -github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= +github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -1215,6 +1225,8 @@ github.com/sashamelentyev/usestdlibvars v1.23.0/go.mod h1:YPwr/Y1LATzHI93CqoPUN/ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/securego/gosec/v2 v2.15.0 h1:v4Ym7FF58/jlykYmmhZ7mTm7FQvN/setNm++0fgIAtw= github.com/securego/gosec/v2 v2.15.0/go.mod h1:VOjTrZOkUtSDt2QLSJmQBMWnvwiQPEjg0l+5juIqGk8= +github.com/shamaton/msgpack/v2 v2.2.0 h1:IP1m01pHwCrMa6ZccP9B3bqxEMKMSmMVAVKk54g3L/Y= +github.com/shamaton/msgpack/v2 v2.2.0/go.mod h1:6khjYnkx73f7VQU7wjcFS9DFjs+59naVWJv1TB7qdOI= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shentufoundation/cosmos-sdk v0.50.11-shentu2 h1:rxZBRlK62LD61QjcGSxr5zeQrPYFVhWKUMU6K7eID/E=