From a9aa8b993cd00cd3bb837ac4abb00af7deb73970 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Tue, 20 Feb 2024 14:15:49 -0700 Subject: [PATCH 1/5] all go bump changes --- .github/workflows/build.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/dependabot-update-all.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release-cosmovisor.yml | 2 +- .github/workflows/release-rosetta.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/sims-045.yml | 10 +++++----- .github/workflows/sims-046.yml | 10 +++++----- .github/workflows/sims-047.yml | 10 +++++----- .github/workflows/sims-nightly.yml | 4 ++-- .github/workflows/sims.yml | 8 ++++---- .github/workflows/test.yml | 14 +++++++------- .golangci.yml | 7 +++++-- Dockerfile | 2 +- Makefile | 4 ++-- contrib/devtools/Dockerfile | 8 ++++---- contrib/images/simd-dlv/Dockerfile | 2 +- contrib/images/simd-env/Dockerfile | 2 +- contrib/rosetta/rosetta-ci/Dockerfile | 2 +- x/gov/simulation/operations.go | 20 ++++++++++++-------- x/gov/simulation/operations_test.go | 4 ++-- 22 files changed, 64 insertions(+), 57 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 389aebcdf9ba..09fc65927356 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: technote-space/get-diff-action@v6.1.1 id: git_diff diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index bda16844cc3a..f9b6eef79e33 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dependabot-update-all.yml b/.github/workflows/dependabot-update-all.yml index cc5589ab7e57..c0abd0e9e3ab 100644 --- a/.github/workflows/dependabot-update-all.yml +++ b/.github/workflows/dependabot-update-all.yml @@ -17,7 +17,7 @@ jobs: token: ${{ secrets.PRBOT_PAT }} - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - name: Extract updated dependency id: deps diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d5d03194fc5c..8371504d7ec1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/checkout@v3 - name: golangci-lint diff --git a/.github/workflows/release-cosmovisor.yml b/.github/workflows/release-cosmovisor.yml index 9b64aac56ba0..6522fde8a949 100644 --- a/.github/workflows/release-cosmovisor.yml +++ b/.github/workflows/release-cosmovisor.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true # get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV - name: Set env diff --git a/.github/workflows/release-rosetta.yml b/.github/workflows/release-rosetta.yml index 577edbce7def..34e0872e0545 100644 --- a/.github/workflows/release-rosetta.yml +++ b/.github/workflows/release-rosetta.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true # get 'v*.*.*' part from 'rosetta/v*.*.*' and save to $GITHUB_ENV - name: Set env diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a129b614642..18aa5d3d736b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/sims-045.yml b/.github/workflows/sims-045.yml index 2c768e272720..4b8be4966e72 100644 --- a/.github/workflows/sims-045.yml +++ b/.github/workflows/sims-045.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -51,7 +51,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: @@ -70,7 +70,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.45.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-046.yml b/.github/workflows/sims-046.yml index 293872992c82..f0d9a1b10292 100644 --- a/.github/workflows/sims-046.yml +++ b/.github/workflows/sims-046.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -52,7 +52,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: @@ -71,7 +71,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.46.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-047.yml b/.github/workflows/sims-047.yml index 8219ff6edf24..12fcb0b87d9a 100644 --- a/.github/workflows/sims-047.yml +++ b/.github/workflows/sims-047.yml @@ -21,7 +21,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - run: make build @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -52,7 +52,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: @@ -71,7 +71,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: @@ -90,7 +90,7 @@ jobs: ref: "release/v0.47.x" - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-nightly.yml b/.github/workflows/sims-nightly.yml index 804bf9147b06..80c930d49d7d 100644 --- a/.github/workflows/sims-nightly.yml +++ b/.github/workflows/sims-nightly.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 45ac6f0f609a..5b2a91a81b37 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - run: make build - name: Install runsim @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: @@ -56,7 +56,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: @@ -74,7 +74,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7866f461a68d..d1d22348a5dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true - name: Create a file with all core Cosmos SDK pkgs run: go list ./... > pkgs.txt @@ -54,7 +54,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true cache: true cache-dependency-path: go.sum @@ -86,7 +86,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true cache: true cache-dependency-path: go.sum @@ -117,7 +117,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true cache: true cache-dependency-path: go.sum @@ -189,7 +189,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true cache: true cache-dependency-path: go.sum @@ -219,7 +219,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true cache: true cache-dependency-path: go.sum @@ -245,7 +245,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" check-latest: true cache: true cache-dependency-path: simapp/go.sum diff --git a/.golangci.yml b/.golangci.yml index 4b16301cbcd4..ada1fc0cfc7c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -40,10 +40,13 @@ issues: - text: "ST1016:" linters: - stylecheck - - path: "migrations" - text: "SA1019:" + - text: "SA1019:" linters: - staticcheck + - path: "crypto/keyring" + text: "G306:" + linters: + - gosec max-issues-per-linter: 10000 max-same-issues: 10000 diff --git a/Dockerfile b/Dockerfile index 865a03dcd171..93581e74671d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # # This image is pushed to the GHCR as https://ghcr.io/cosmos/simapp -FROM --platform=$BUILDPLATFORM golang:1.19-alpine AS build-env +FROM --platform=$BUILDPLATFORM golang:1.20-alpine AS build-env # Install minimum necessary dependencies ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev diff --git a/Makefile b/Makefile index d9313246778c..23444c327640 100644 --- a/Makefile +++ b/Makefile @@ -347,12 +347,12 @@ benchmark: ############################################################################### golangci_lint_cmd=golangci-lint -golangci_version=v1.50.1 +golangci_version=v1.51.2 lint: @echo "--> Running linter" @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) - @$(golangci_lint_cmd) run --timeout=10m + @$(golangci_lint_cmd) run --timeout=10m -c .golangci.yml lint-fix: @echo "--> Running linter" diff --git a/contrib/devtools/Dockerfile b/contrib/devtools/Dockerfile index de6c75c70a13..8feb15b0073f 100644 --- a/contrib/devtools/Dockerfile +++ b/contrib/devtools/Dockerfile @@ -3,7 +3,7 @@ # docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh FROM bufbuild/buf:1.9.0 as BUILDER -FROM golang:1.19-alpine +FROM golang:1.20-alpine RUN apk add --no-cache \ nodejs \ @@ -23,9 +23,9 @@ ENV GOLANG_PROTOBUF_VERSION=1.28.1 \ GRPC_GATEWAY_VERSION=1.16.0 RUN go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest && \ - go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} && \ - go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} + go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} && \ + go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ + github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} # install all gogo protobuf binaries RUN git clone https://github.com/cosmos/gogoproto.git; \ diff --git a/contrib/images/simd-dlv/Dockerfile b/contrib/images/simd-dlv/Dockerfile index ed0c1c672d4b..b3a67673c64a 100644 --- a/contrib/images/simd-dlv/Dockerfile +++ b/contrib/images/simd-dlv/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine AS build +FROM golang:1.20-alpine AS build RUN apk add build-base git linux-headers libc-dev RUN go install github.com/go-delve/delve/cmd/dlv@latest diff --git a/contrib/images/simd-env/Dockerfile b/contrib/images/simd-env/Dockerfile index d0263925f583..29e18f9efe63 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine AS build +FROM golang:1.20-alpine AS build RUN apk add build-base git linux-headers diff --git a/contrib/rosetta/rosetta-ci/Dockerfile b/contrib/rosetta/rosetta-ci/Dockerfile index a255f0171b7e..165d0d0f0aa8 100644 --- a/contrib/rosetta/rosetta-ci/Dockerfile +++ b/contrib/rosetta/rosetta-ci/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine as build +FROM golang:1.20-alpine as build RUN apk add git tar gcc libc-dev --no-cache diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index 2ca94cc4e9c7..c8c65853835a 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -5,7 +5,6 @@ import ( "math/rand" "time" - sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -190,7 +189,8 @@ func simulateMsgSubmitProposal(ak types.AccountKeeper, bk types.BankKeeper, k *k chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { simAccount, _ := simtypes.RandomAcc(r, accs) - deposit, skip, err := randomDeposit(r, ctx, ak, bk, k, simAccount.Address, true) + expedited := r.Intn(2) == 0 + deposit, skip, err := randomDeposit(r, ctx, ak, bk, k, simAccount.Address, true, expedited) switch { case skip: return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "skip deposit"), nil, nil @@ -198,11 +198,6 @@ func simulateMsgSubmitProposal(ak types.AccountKeeper, bk types.BankKeeper, k *k return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "unable to generate deposit"), nil, err } - expedited := r.Intn(2) == 0 - if expedited { - deposit = deposit.MulInt(sdkmath.NewInt(v1.DefaultMinExpeditedDepositTokensRatio)) - } - msg, err := v1.NewMsgSubmitProposal( proposalMsgs, deposit, @@ -283,7 +278,12 @@ func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k *keeper.K return simtypes.NoOpMsg(types.ModuleName, TypeMsgDeposit, "unable to generate proposalID"), nil, nil } - deposit, skip, err := randomDeposit(r, ctx, ak, bk, k, simAccount.Address, false) + p, ok := k.GetProposal(ctx, proposalID) + if !ok { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgDeposit, "unable to get proposal"), nil, nil + } + + deposit, skip, err := randomDeposit(r, ctx, ak, bk, k, simAccount.Address, false, p.Expedited) switch { case skip: return simtypes.NoOpMsg(types.ModuleName, TypeMsgDeposit, "skip deposit"), nil, nil @@ -438,6 +438,7 @@ func randomDeposit( k *keeper.Keeper, addr sdk.AccAddress, useMinAmount bool, + expedited bool, ) (deposit sdk.Coins, skip bool, err error) { account := ak.GetAccount(ctx, addr) spendable := bk.SpendableCoins(ctx, account.GetAddress()) @@ -448,6 +449,9 @@ func randomDeposit( params := k.GetParams(ctx) minDeposit := params.MinDeposit + if expedited { + minDeposit = params.ExpeditedMinDeposit + } denomIndex := r.Intn(len(minDeposit)) denom := minDeposit[denomIndex].Denom diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 20d20f539cfa..06b8adf51f79 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -152,7 +152,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Proposer) require.NotEqual(t, len(msg.InitialDeposit), 0) - require.Equal(t, "560969stake", msg.InitialDeposit[0].String()) + require.Equal(t, "47841094stake", msg.InitialDeposit[0].String()) require.Equal(t, simulation.TypeMsgSubmitProposal, sdk.MsgTypeURL(&msg)) } @@ -182,7 +182,7 @@ func TestSimulateMsgSubmitLegacyProposal(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Proposer) require.NotEqual(t, len(msg.InitialDeposit), 0) - require.Equal(t, "13430055stake", msg.InitialDeposit[0].String()) + require.Equal(t, "25166256stake", msg.InitialDeposit[0].String()) require.Equal(t, "title-3: ZBSpYuLyYggwexjxusrBqDOTtGTOWeLrQKjLxzIivHSlcxgdXhhuTSkuxKGLwQvuyNhYFmBZHeAerqyNEUzXPFGkqEGqiQWIXnku", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetTitle()) require.Equal(t, "description-3: NJWzHdBNpAXKJPHWQdrGYcAHSctgVlqwqHoLfHsXUdStwfefwzqLuKEhmMyYLdbZrcPgYqjNHxPexsruwEGStAneKbWkQDDIlCWBLSiAASNhZqNFlPtfqPJoxKsgMdzjWqLWdqKQuJqWPMvwPQWZUtVMOTMYKJbfdlZsjdsomuScvDmbDkgRualsxDvRJuCAmPOXitIbcyWsKGSdrEunFAOdmXnsuyFVgJqEjbklvmwrUlsxjRSfKZxGcpayDdgoFcnVSutxjRgOSFzPwidAjubMncNweqpbxhXGchpZUxuFDOtpnhNUycJICRYqsPhPSCjPTWZFLkstHWJxvdPEAyEIxXgLwbNOjrgzmaujiBABBIXvcXpLrbcEWNNQsbjvgJFgJkflpRohHUutvnaUqoopuKjTDaemDeSdqbnOzcfJpcTuAQtZoiLZOoAIlboFDAeGmSNwkvObPRvRWQgWkGkxwtPauYgdkmypLjbqhlHJIQTntgWjXwZdOyYEdQRRLfMSdnxqppqUofqLbLQDUjwKVKfZJUJQPsWIPwIVaSTrmKskoAhvmZyJgeRpkaTfGgrJzAigcxtfshmiDCFkuiluqtMOkidknnTBtumyJYlIsWLnCQclqdVmikUoMOPdPWwYbJxXyqUVicNxFxyqJTenNblyyKSdlCbiXxUiYUiMwXZASYfvMDPFgxniSjWaZTjHkqlJvtBsXqwPpyVxnJVGFWhfSxgOcduoxkiopJvFjMmFabrGYeVtTXLhxVUEiGwYUvndjFGzDVntUvibiyZhfMQdMhgsiuysLMiePBNXifRLMsSmXPkwlPloUbJveCvUlaalhZHuvdkCnkSHbMbmOnrfEGPwQiACiPlnihiaOdbjPqPiTXaHDoJXjSlZmltGqNHHNrcKdlFSCdmVOuvDcBLdSklyGJmcLTbSFtALdGlPkqqecJrpLCXNPWefoTJNgEJlyMEPneVaxxduAAEqQpHWZodWyRkDAxzyMnFMcjSVqeRXLqsNyNtQBbuRvunZflWSbbvXXdkyLikYqutQhLPONXbvhcQZJPSWnOulqQaXmbfFxAkqfYeseSHOQidHw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jhbdMAnJmYQVZBQZkFVweHDAlaqJjRqoQPoOMLhyvYCzqEuQsAFoxWrzRnTVjStPadhsESlERnKhpEPsfDxNvxqcOyIulaCkmPdambLHvGhTZzysvqFauEgkFRItPfvisehFmoBhQqmkfbHVsgfHXDPJVyhwPllQpuYLRYvGodxKjkarnSNgsXoKEMlaSKxKdcVgvOkuLcfLFfdtXGTclqfPOfeoVLbqcjcXCUEBgAGplrkgsmIEhWRZLlGPGCwKWRaCKMkBHTAcypUrYjWwCLtOPVygMwMANGoQwFnCqFrUGMCRZUGJKTZIGPyldsifauoMnJPLTcDHmilcmahlqOELaAUYDBuzsVywnDQfwRLGIWozYaOAilMBcObErwgTDNGWnwQMUgFFSKtPDMEoEQCTKVREqrXZSGLqwTMcxHfWotDllNkIJPMbXzjDVjPOOjCFuIvTyhXKLyhUScOXvYthRXpPfKwMhptXaxIxgqBoUqzrWbaoLTVpQoottZyPFfNOoMioXHRuFwMRYUiKvcWPkrayyTLOCFJlAyslDameIuqVAuxErqFPEWIScKpBORIuZqoXlZuTvAjEdlEWDODFRregDTqGNoFBIHxvimmIZwLfFyKUfEWAnNBdtdzDmTPXtpHRGdIbuucfTjOygZsTxPjfweXhSUkMhPjMaxKlMIJMOXcnQfyzeOcbWwNbeH", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetDescription()) require.Equal(t, "gov", msg.Route()) From 765649a02fd2c1a4ded124a349a0f52297f93c9a Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Tue, 20 Feb 2024 14:23:53 -0700 Subject: [PATCH 2/5] fix lint --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8371504d7ec1..8cce641e6b98 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,4 +23,4 @@ jobs: uses: golangci/golangci-lint-action@v3 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.50.1 + version: v1.51.2 From 30faabd3e3152d7e37c0bea10ce188f48ecda274 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Tue, 20 Feb 2024 14:36:49 -0700 Subject: [PATCH 3/5] one more linter change --- .golangci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index ada1fc0cfc7c..f6db509d83cd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,7 +20,6 @@ linters: - ineffassign - misspell - nakedret - - nolintlint - staticcheck - stylecheck - typecheck From 60df37cbf7dca8573c6ef88cd0fdcb479c04d7ad Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Tue, 20 Feb 2024 14:43:50 -0700 Subject: [PATCH 4/5] remove explicit config location call --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 23444c327640..bcbd6804f8ca 100644 --- a/Makefile +++ b/Makefile @@ -352,7 +352,7 @@ golangci_version=v1.51.2 lint: @echo "--> Running linter" @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) - @$(golangci_lint_cmd) run --timeout=10m -c .golangci.yml + @$(golangci_lint_cmd) run --timeout=10m lint-fix: @echo "--> Running linter" From 2dc527e8c226685358aa62d19fcbbbe038f4c7f8 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Tue, 20 Feb 2024 14:57:41 -0700 Subject: [PATCH 5/5] delete unnecessary CI check --- .github/workflows/proto-docker.yml | 67 ------------------------------ 1 file changed, 67 deletions(-) delete mode 100644 .github/workflows/proto-docker.yml diff --git a/.github/workflows/proto-docker.yml b/.github/workflows/proto-docker.yml deleted file mode 100644 index 63e6617360da..000000000000 --- a/.github/workflows/proto-docker.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Build & Push SDK Proto Builder -on: - push: - branches: - - main - paths: - - "contrib/devtools/Dockerfile" - workflow_dispatch: - inputs: - tags: - description: "Docker image tags" - required: true - type: string - pull_request: - paths: - - "contrib/devtools/Dockerfile" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: cosmos/proto-builder - -# Allow one concurrent deployment -concurrency: - group: "proto-docker" - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - # set VERSION to new version when making changes, when merged to main the image will automatically be pushed - - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - # modify value when deploying a new version - tags: | - type=semver,pattern={{version}},value=${{ inputs.tags }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - if: ${{ github.event_name != 'pull_request' }} - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish to GHCR - uses: docker/build-push-action@v3 - with: - context: ./contrib/devtools - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }}