diff --git a/.changelog/unreleased/api-breaking/3335-bump-ics.md b/.changelog/unreleased/api-breaking/3335-bump-ics.md new file mode 100644 index 00000000000..6e4d4619319 --- /dev/null +++ b/.changelog/unreleased/api-breaking/3335-bump-ics.md @@ -0,0 +1,5 @@ +- Bump [ICS](https://github.com/cosmos/interchain-security) to + [v6.0.0](https://github.com/cosmos/interchain-security/releases/tag/v6.0.0). + This release of ICS introduces several API breaking changes. + See the [ICS changelog](https://github.com/cosmos/interchain-security/blob/v6.0.0/CHANGELOG.md#api-breaking) for details. + ([\#3335](https://github.com/cosmos/gaia/pull/3335)) diff --git a/.changelog/unreleased/bug-fixes/3333-migrate-consensus-params.md b/.changelog/unreleased/bug-fixes/3333-migrate-consensus-params.md new file mode 100644 index 00000000000..14130a94e78 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/3333-migrate-consensus-params.md @@ -0,0 +1,2 @@ +- Migrate consensus params - initialize Version field + ([\#3333](https://github.com/cosmos/gaia/pull/3333)) diff --git a/.changelog/unreleased/dependencies/3305-bump-ibc.md b/.changelog/unreleased/dependencies/3305-bump-ibc.md deleted file mode 100644 index 8cb82f09d87..00000000000 --- a/.changelog/unreleased/dependencies/3305-bump-ibc.md +++ /dev/null @@ -1,3 +0,0 @@ -- Bump [ibc-go](https://github.com/cosmos/ibc-go) to - [v8.5.0](https://github.com/cosmos/ibc-go/releases/tag/v8.5.0) - ([\#3305](https://github.com/cosmos/gaia/pull/3305)) \ No newline at end of file diff --git a/.changelog/unreleased/dependencies/3335-bump-ics.md b/.changelog/unreleased/dependencies/3335-bump-ics.md new file mode 100644 index 00000000000..a7bbf8a4a1b --- /dev/null +++ b/.changelog/unreleased/dependencies/3335-bump-ics.md @@ -0,0 +1,3 @@ +- Bump [ICS](https://github.com/cosmos/interchain-security) to + [v6.0.0](https://github.com/cosmos/interchain-security/releases/tag/v6.0.0). + ([\#3335](https://github.com/cosmos/gaia/pull/3335)) diff --git a/.changelog/unreleased/dependencies/3338-bump-ibc.md b/.changelog/unreleased/dependencies/3338-bump-ibc.md new file mode 100644 index 00000000000..69d370fc243 --- /dev/null +++ b/.changelog/unreleased/dependencies/3338-bump-ibc.md @@ -0,0 +1,3 @@ +- Bump [ibc-go](https://github.com/cosmos/ibc-go) to + [v8.5.1](https://github.com/cosmos/ibc-go/releases/tag/v8.5.1) + ([\#3338](https://github.com/cosmos/gaia/pull/3338)) \ No newline at end of file diff --git a/.changelog/unreleased/feature/3263-max-provider-consensus.md b/.changelog/unreleased/features/3263-max-provider-consensus.md similarity index 100% rename from .changelog/unreleased/feature/3263-max-provider-consensus.md rename to .changelog/unreleased/features/3263-max-provider-consensus.md diff --git a/.changelog/unreleased/feature/3263-max-validators.md b/.changelog/unreleased/features/3263-max-validators.md similarity index 100% rename from .changelog/unreleased/feature/3263-max-validators.md rename to .changelog/unreleased/features/3263-max-validators.md diff --git a/.changelog/unreleased/features/3308-ics-metadata.md b/.changelog/unreleased/features/3308-ics-metadata.md new file mode 100644 index 00000000000..ccfb6f0cbff --- /dev/null +++ b/.changelog/unreleased/features/3308-ics-metadata.md @@ -0,0 +1,2 @@ +- Set the metadata for launched ICS consumer chains. + ([\#3308](https://github.com/cosmos/gaia/pull/3308)) \ No newline at end of file diff --git a/.changelog/unreleased/features/3316-ics-props-migrate.md b/.changelog/unreleased/features/3316-ics-props-migrate.md new file mode 100644 index 00000000000..de1abce0cee --- /dev/null +++ b/.changelog/unreleased/features/3316-ics-props-migrate.md @@ -0,0 +1,3 @@ +- Migrate active ICS gov proposal to the new messages + introduced by the permissionless ICS feature. + ([\#3316](https://github.com/cosmos/gaia/pull/3316)) \ No newline at end of file diff --git a/.changelog/unreleased/features/3335-bump-ics.md b/.changelog/unreleased/features/3335-bump-ics.md new file mode 100644 index 00000000000..eb0032908c5 --- /dev/null +++ b/.changelog/unreleased/features/3335-bump-ics.md @@ -0,0 +1,6 @@ +- Bump [ICS](https://github.com/cosmos/interchain-security) to + [v6.0.0](https://github.com/cosmos/interchain-security/releases/tag/v6.0.0). + This release of ICS enables the permissionless creation of consumer chains + and allows validators outside the active validator set to opt in to validate + on consumer chains. + ([\#3335](https://github.com/cosmos/gaia/pull/3335)) diff --git a/.changelog/unreleased/state-breaking/3263-max-provider-consensus.md b/.changelog/unreleased/state-breaking/3263-max-provider-consensus.md new file mode 100644 index 00000000000..8a3843b3904 --- /dev/null +++ b/.changelog/unreleased/state-breaking/3263-max-provider-consensus.md @@ -0,0 +1,4 @@ +- Set the `MaxProviderConsensusValidators` parameter of the provider module to 180. + This parameter will be used to govern the number of validators participating in consensus, + and takes over this role from the `MaxValidators` parameter of the staking module. + ([\#3263](https://github.com/cosmos/gaia/pull/3263)) \ No newline at end of file diff --git a/.changelog/unreleased/state-breaking/3263-max-validators.md b/.changelog/unreleased/state-breaking/3263-max-validators.md new file mode 100644 index 00000000000..a7aca6c9877 --- /dev/null +++ b/.changelog/unreleased/state-breaking/3263-max-validators.md @@ -0,0 +1,5 @@ +- Set the `MaxValidators` parameter of the staking module to 200, which is the current number of 180 plus 20. + This is done as a result of introducing the inactive-validators feature of Interchain Security, + which entails that the number of validators participating in consensus will be governed by the + `MaxProviderConsensusValidators` parameter in the provider module. + ([\#3263](https://github.com/cosmos/gaia/pull/3263)) \ No newline at end of file diff --git a/.changelog/unreleased/state-breaking/3308-ics-metadata.md b/.changelog/unreleased/state-breaking/3308-ics-metadata.md new file mode 100644 index 00000000000..ccfb6f0cbff --- /dev/null +++ b/.changelog/unreleased/state-breaking/3308-ics-metadata.md @@ -0,0 +1,2 @@ +- Set the metadata for launched ICS consumer chains. + ([\#3308](https://github.com/cosmos/gaia/pull/3308)) \ No newline at end of file diff --git a/.changelog/unreleased/state-breaking/3316-ics-props-migrate.md b/.changelog/unreleased/state-breaking/3316-ics-props-migrate.md new file mode 100644 index 00000000000..de1abce0cee --- /dev/null +++ b/.changelog/unreleased/state-breaking/3316-ics-props-migrate.md @@ -0,0 +1,3 @@ +- Migrate active ICS gov proposal to the new messages + introduced by the permissionless ICS feature. + ([\#3316](https://github.com/cosmos/gaia/pull/3316)) \ No newline at end of file diff --git a/.changelog/unreleased/state-breaking/3335-bump-ics.md b/.changelog/unreleased/state-breaking/3335-bump-ics.md new file mode 100644 index 00000000000..a7bbf8a4a1b --- /dev/null +++ b/.changelog/unreleased/state-breaking/3335-bump-ics.md @@ -0,0 +1,3 @@ +- Bump [ICS](https://github.com/cosmos/interchain-security) to + [v6.0.0](https://github.com/cosmos/interchain-security/releases/tag/v6.0.0). + ([\#3335](https://github.com/cosmos/gaia/pull/3335)) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a04647a403b..7cead4c66c6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,7 +21,7 @@ updates: directory: "/" schedule: interval: daily - target-branch: "release/v18.1.x" + target-branch: "release/v19.2.x" # Only allow automated security-related dependency updates on release branches. open-pull-requests-limit: 0 labels: @@ -31,7 +31,7 @@ updates: directory: "/" schedule: interval: daily - target-branch: "release/v19.1.x" + target-branch: "release/v20.x" # Only allow automated security-related dependency updates on release branches. open-pull-requests-limit: 0 labels: diff --git a/.goreleaser.yml b/.goreleaser.yml index 7b15cf6c363..40129243478 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -76,72 +76,6 @@ builds: - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm - -X github.com/cometbft/cometbft/version.TMCoreSemVer={{ .Env.TM_VERSION }} - - id: gaiad-linux-amd64 - main: ./cmd/gaiad - binary: gaiad - hooks: - pre: - - wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a - goos: - - linux - goarch: - - amd64 - env: - - CC=x86_64-linux-gnu-gcc - flags: - - -mod=readonly - - -trimpath - ldflags: - - -X main.commit={{.Commit}} - - -X main.date={{ .CommitDate }} - - -X github.com/cosmos/cosmos-sdk/version.Name=gaia - - -X github.com/cosmos/cosmos-sdk/version.AppName=gaiad - - -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }} - - -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} - - -X github.com/cometbft/cometbft/version.TMCoreSemVer={{ .Env.TM_VERSION }} - - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo - - -w -s - - -linkmode=external - - -extldflags '-Wl,-z,muldefs -static -lm' - tags: - - netgo - - ledger - - muslc - - osusergo - - - id: gaiad-linux-arm64 - main: ./cmd/gaiad - binary: gaiad - hooks: - pre: - - wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /lib/libwasmvm_muslc.aarch64.a - goos: - - linux - goarch: - - arm64 - env: - - CC=aarch64-linux-gnu-gcc - flags: - - -mod=readonly - - -trimpath - ldflags: - - -s -w - - -linkmode=external - - -X main.commit={{.Commit}} - - -X main.date={{ .CommitDate }} - - -X github.com/cosmos/cosmos-sdk/version.Name=gaia - - -X github.com/cosmos/cosmos-sdk/version.AppName=gaiad - - -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }} - - -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} - - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger - - -X github.com/cometbft/cometbft/version.TMCoreSemVer={{ .Env.TM_VERSION }} - - -extldflags '-Wl,-z,muldefs -static -lm' - tags: - - netgo - - ledger - - muslc - - osusergo - universal_binaries: - id: gaiad-darwin-universal @@ -168,8 +102,6 @@ archives: builds: - gaiad-darwin-arm64 - gaiad-darwin-amd64 - - gaiad-linux-amd64 - - gaiad-linux-arm64 wrap_in_directory: false files: - none* diff --git a/.mergify.yml b/.mergify.yml index 7ab2ca20e80..2a0004c821c 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -24,20 +24,20 @@ pull_request_rules: {{ title }} (#{{ number }}) {{ body }} - - name: Backport patches to the release/v18.1.x branch + - name: Backport patches to the release/v19.2.x branch conditions: - base=main - - label=A:backport/v18.1.x + - label=A:backport/v19.2.x actions: backport: branches: - - release/v18.1.x + - release/v19.2.x - - name: Backport patches to the release/v19.1.x branch + - name: Backport patches to the release/v20.x branch conditions: - base=main - - label=A:backport/v19.1.x + - label=A:backport/v20.x actions: backport: branches: - - release/v19.1.x + - release/v20.x diff --git a/Makefile b/Makefile index 2de6d14fc6d..e21967e1fcc 100644 --- a/Makefile +++ b/Makefile @@ -120,9 +120,6 @@ vulncheck: $(BUILDDIR)/ GOBIN=$(BUILDDIR) go install golang.org/x/vuln/cmd/govulncheck@latest $(BUILDDIR)/govulncheck ./... -build-linux: go.sum - LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build - go.sum: go.mod @echo "--> Ensure dependencies have not been modified" @echo "--> Ensure dependencies have not been modified unless suppressed by SKIP_MOD_VERIFY" @@ -184,9 +181,27 @@ else @echo "--> No tag specified, skipping tag release" endif - -# uses goreleaser to create static binaries for linux an darwin on local machine -# platform is set because not setting it results in broken builds for linux-amd64 +# 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 gaiabuilder || true + $(DOCKER) buildx use gaiabuilder + $(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 gaiad-static-amd64 \ + -f Dockerfile . \ + --load + $(DOCKER) rm -f gaiabinary || true + $(DOCKER) create -ti --name gaiabinary gaiad-static-amd64 + $(DOCKER) cp gaiabinary:/usr/local/bin/ $(BUILDDIR)/gaiad-linux-amd64 + $(DOCKER) rm -f gaiabinary + + +# uses goreleaser to create static binaries for darwin on local machine goreleaser-build-local: docker run \ --rm \ @@ -195,7 +210,6 @@ goreleaser-build-local: -e COSMWASM_VERSION=$(COSMWASM_VERSION) \ -v `pwd`:/go/src/gaiad \ -w /go/src/gaiad \ - --platform=linux/amd64 \ $(GORELEASER_IMAGE) \ release \ --snapshot \ @@ -216,7 +230,6 @@ ci-release: -e COSMWASM_VERSION=$(COSMWASM_VERSION) \ -v `pwd`:/go/src/gaiad \ -w /go/src/gaiad \ - --platform=linux/amd64 \ $(GORELEASER_IMAGE) \ release \ --release-notes ./RELEASE_NOTES.md \ diff --git a/app/upgrades/v20/upgrades.go b/app/upgrades/v20/upgrades.go index 15e43b63a05..6969cd00cbe 100644 --- a/app/upgrades/v20/upgrades.go +++ b/app/upgrades/v20/upgrades.go @@ -5,6 +5,8 @@ import ( "encoding/json" "fmt" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + providerkeeper "github.com/cosmos/interchain-security/v6/x/ccv/provider/keeper" providertypes "github.com/cosmos/interchain-security/v6/x/ccv/provider/types" @@ -15,6 +17,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -54,6 +57,13 @@ func CreateUpgradeHandler( return vm, errorsmod.Wrapf(err, "running module migrations") } + ctx.Logger().Info("Initializing ConsensusParam Version...") + err = InitializeConsensusParamVersion(ctx, keepers.ConsensusParamsKeeper) + if err != nil { + // don't hard fail here, as this is not critical for the upgrade to succeed + ctx.Logger().Error("Error initializing ConsensusParam Version:", "message", err.Error()) + } + ctx.Logger().Info("Initializing MaxProviderConsensusValidators parameter...") InitializeMaxProviderConsensusParam(ctx, keepers.ProviderKeeper) @@ -87,6 +97,20 @@ func CreateUpgradeHandler( } } +// InitializeConsensusParamVersion initializes the consumer params that were missed in a consensus keeper migration. +// Some fields were set to nil values instead of zero values, which causes a panic during Txs to modify the params. +// Context: +// - https://github.com/cosmos/cosmos-sdk/issues/21483 +// - https://github.com/cosmos/cosmos-sdk/pull/21484 +func InitializeConsensusParamVersion(ctx sdk.Context, consensusKeeper consensusparamkeeper.Keeper) error { + params, err := consensusKeeper.ParamsStore.Get(ctx) + if err != nil { + return err + } + params.Version = &cmtproto.VersionParams{} + return consensusKeeper.ParamsStore.Set(ctx, params) +} + // InitializeMaxProviderConsensusParam initializes the MaxProviderConsensusValidators parameter. // It is set to 180, which is the current number of validators participating in consensus on the Cosmos Hub. // This parameter will be used to govern the number of validators participating in consensus on the Cosmos Hub, diff --git a/go.mod b/go.mod index 50b744ab1e5..1c244e036b1 100644 --- a/go.mod +++ b/go.mod @@ -27,8 +27,8 @@ require ( github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 - github.com/cosmos/ibc-go/v8 v8.5.0 - github.com/cosmos/interchain-security/v6 v6.0.0-20240911170053-c05141e163b2 + github.com/cosmos/ibc-go/v8 v8.5.1 + github.com/cosmos/interchain-security/v6 v6.0.0 github.com/google/gofuzz v1.2.0 github.com/gorilla/mux v1.8.1 github.com/ory/dockertest/v3 v3.11.0 diff --git a/go.sum b/go.sum index e4ad852caf5..1f9d70cd278 100644 --- a/go.sum +++ b/go.sum @@ -439,16 +439,12 @@ github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0 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.0 h1:OjaSXz480JT8ZuMrASxGgS7XzloZ2NuuJPwZB/fKDgE= -github.com/cosmos/ibc-go/v8 v8.5.0/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo= +github.com/cosmos/ibc-go/v8 v8.5.1 h1:3JleEMKBjRKa3FeTKt4fjg22za/qygLBo7mDkoYTNBs= +github.com/cosmos/ibc-go/v8 v8.5.1/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= -github.com/cosmos/interchain-security/v6 v6.0.0-20240906165300-5b6252c77268 h1:UJEywL1Fi/HYAFao8fUQxvQXudrt2Vv+D3BL9JK/osM= -github.com/cosmos/interchain-security/v6 v6.0.0-20240906165300-5b6252c77268/go.mod h1:+5zIZEzkL4yNHB/UWXCu75t6GeEgEmWHbz5OnBWiL0o= -github.com/cosmos/interchain-security/v6 v6.0.0-20240911164533-804b53b1bdc8 h1:5Y5h7ANC36DEOrrDhDFl9ecKUXAl/ZmSwXDQMHR2Gl4= -github.com/cosmos/interchain-security/v6 v6.0.0-20240911164533-804b53b1bdc8/go.mod h1:+5zIZEzkL4yNHB/UWXCu75t6GeEgEmWHbz5OnBWiL0o= -github.com/cosmos/interchain-security/v6 v6.0.0-20240911170053-c05141e163b2 h1:wGfWTO+frkqPbRsa0otX1tWappl6ovWgrlA/n7J9XcA= -github.com/cosmos/interchain-security/v6 v6.0.0-20240911170053-c05141e163b2/go.mod h1:+5zIZEzkL4yNHB/UWXCu75t6GeEgEmWHbz5OnBWiL0o= +github.com/cosmos/interchain-security/v6 v6.0.0 h1:BieZEefykqrD2Vvt3onsYjEAa5O+aWoRWSF8nN5aidE= +github.com/cosmos/interchain-security/v6 v6.0.0/go.mod h1:+5zIZEzkL4yNHB/UWXCu75t6GeEgEmWHbz5OnBWiL0o= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM=