Skip to content

Commit

Permalink
Merge branch 'main' into insumity/add-v21-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Oct 2, 2024
2 parents 19aa123 + 7f16da6 commit 1626e11
Show file tree
Hide file tree
Showing 59 changed files with 389 additions and 137 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Update wasmvm to v2.1.3 - security patch
([\#3366](https://github.com/cosmos/gaia/pull/3366))
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
build
.github
.vscode
.vscode
docs
.changelog
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ updates:
directory: "/"
schedule:
interval: daily
target-branch: "release/v19.2.x"
target-branch: "release/v21.x"
# Only allow automated security-related dependency updates on release branches.
open-pull-requests-limit: 0
labels:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
make build-docs
- name: Deploy 🚀
uses: JamesIves/[email protected].4
uses: JamesIves/[email protected].8
with:
branch: gh-pages
folder: ~/output
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
flavor: "latest=false"

- name: Build and push docker image
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: Dockerfile
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ jobs:
# the old gaiad binary version is hardcoded, need to be updated each major release.
- name: Install Old Gaiad
run: |
curl -LO https://github.com/cosmos/gaia/releases/download/v19.1.0/gaiad-v19.1.0-linux-amd64
chmod a+x gaiad-v19.1.0-linux-amd64
curl -LO https://github.com/cosmos/gaia/releases/download/v20.0.0/gaiad-v20.0.0-linux-amd64
chmod a+x gaiad-v20.0.0-linux-amd64
mkdir build
mv ./gaiad-v19.1.0-linux-amd64 ./build/gaiadold
mv ./gaiad-v20.0.0-linux-amd64 ./build/gaiadold
if: env.GIT_DIFF
- name: Install New Gaiad
run: |
curl -LO https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm.x86_64.so
curl -LO https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm.aarch64.so
curl -LO https://github.com/CosmWasm/wasmvm/releases/download/v2.1.3/libwasmvm.x86_64.so
curl -LO https://github.com/CosmWasm/wasmvm/releases/download/v2.1.3/libwasmvm.aarch64.so
uname -m
sudo cp "./libwasmvm.$(uname -m).so" /usr/lib/
make build
Expand Down
6 changes: 3 additions & 3 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ pull_request_rules:
{{ title }} (#{{ number }})
{{ body }}
- name: Backport patches to the release/v19.2.x branch
- name: Backport patches to the release/v21.x branch
conditions:
- base=main
- label=A:backport/v19.2.x
- label=A:backport/v21.x
actions:
backport:
branches:
- release/v19.2.x
- release/v21.x

- name: Backport patches to the release/v20.x branch
conditions:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ 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.2
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 0881c5b463e89e229b06370e9e2961aec0a5c636772d5142c68d351564464a66
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 58e1f6bfa89ee390cb9abc69a5bc126029a497fe09dd399f38a82d0d86fe95ef
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* ./
Expand Down
2 changes: 1 addition & 1 deletion ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

gaiaerrors "github.com/cosmos/gaia/v20/types/errors"
gaiaerrors "github.com/cosmos/gaia/v21/types/errors"
)

// UseFeeMarketDecorator to make the integration testing easier: we can switch off its ante and post decorators with this flag
Expand Down
2 changes: 1 addition & 1 deletion ante/gov_expedited_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"

gaiaerrors "github.com/cosmos/gaia/v20/types/errors"
gaiaerrors "github.com/cosmos/gaia/v21/types/errors"
)

var expeditedPropDecoratorEnabled = true
Expand Down
4 changes: 2 additions & 2 deletions ante/gov_expedited_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"

"github.com/cosmos/gaia/v20/ante"
"github.com/cosmos/gaia/v20/app/helpers"
"github.com/cosmos/gaia/v21/ante"
"github.com/cosmos/gaia/v21/app/helpers"
)

func TestGovExpeditedProposalsDecorator(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion ante/gov_vote_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaiaerrors "github.com/cosmos/gaia/v20/types/errors"
gaiaerrors "github.com/cosmos/gaia/v21/types/errors"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions ante/gov_vote_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/cosmos/gaia/v20/ante"
"github.com/cosmos/gaia/v20/app/helpers"
"github.com/cosmos/gaia/v21/ante"
"github.com/cosmos/gaia/v21/app/helpers"
)

// Test that the GovVoteDecorator rejects v1beta1 vote messages from accounts with less than 1 atom staked
Expand Down
10 changes: 5 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

gaiaante "github.com/cosmos/gaia/v20/ante"
"github.com/cosmos/gaia/v20/app/keepers"
"github.com/cosmos/gaia/v20/app/upgrades"
v20 "github.com/cosmos/gaia/v20/app/upgrades/v20"
gaiaante "github.com/cosmos/gaia/v21/ante"
"github.com/cosmos/gaia/v21/app/keepers"
"github.com/cosmos/gaia/v21/app/upgrades"
v21 "github.com/cosmos/gaia/v21/app/upgrades/v21"
)

var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string

Upgrades = []upgrades.Upgrade{v20.Upgrade}
Upgrades = []upgrades.Upgrade{v21.Upgrade}
)

var (
Expand Down
4 changes: 2 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"

gaia "github.com/cosmos/gaia/v20/app"
gaiahelpers "github.com/cosmos/gaia/v20/app/helpers"
gaia "github.com/cosmos/gaia/v21/app"
gaiahelpers "github.com/cosmos/gaia/v21/app/helpers"
)

type EmptyAppOptions struct{}
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"

gaiaapp "github.com/cosmos/gaia/v20/app"
gaiaapp "github.com/cosmos/gaia/v21/app"
)

// SimAppChainID hardcoded chainID for simulation
Expand Down
4 changes: 2 additions & 2 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ import (
wasm "github.com/CosmWasm/wasmd/x/wasm"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

"github.com/cosmos/gaia/v20/x/metaprotocols"
metaprotocolstypes "github.com/cosmos/gaia/v20/x/metaprotocols/types"
"github.com/cosmos/gaia/v21/x/metaprotocols"
metaprotocolstypes "github.com/cosmos/gaia/v21/x/metaprotocols/types"
)

var maccPerms = map[string][]string{
Expand Down
2 changes: 1 addition & 1 deletion app/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

"github.com/cosmos/gaia/v20/ante"
"github.com/cosmos/gaia/v21/ante"
)

// PostHandlerOptions are the options required for constructing a FeeMarket PostHandler.
Expand Down
2 changes: 1 addition & 1 deletion app/sim/sim_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

gaia "github.com/cosmos/gaia/v20/app"
gaia "github.com/cosmos/gaia/v21/app"
)

// Simulation parameter constants
Expand Down
2 changes: 1 addition & 1 deletion app/sim/sim_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

gaia "github.com/cosmos/gaia/v20/app"
gaia "github.com/cosmos/gaia/v21/app"
)

// SimulationOperations retrieves the simulation params from the provided file path
Expand Down
4 changes: 2 additions & 2 deletions app/sim_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/simulation"
simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli"

gaia "github.com/cosmos/gaia/v20/app"
"github.com/cosmos/gaia/v20/app/sim"
gaia "github.com/cosmos/gaia/v21/app"
"github.com/cosmos/gaia/v21/app/sim"
)

// Profile with:
Expand Down
6 changes: 3 additions & 3 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"github.com/cosmos/cosmos-sdk/x/simulation"
simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli"

"github.com/cosmos/gaia/v20/ante"
gaia "github.com/cosmos/gaia/v20/app"
"github.com/cosmos/gaia/v21/ante"
gaia "github.com/cosmos/gaia/v21/app"
// "github.com/cosmos/gaia/v11/app/helpers"
// "github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v20/app/sim"
"github.com/cosmos/gaia/v21/app/sim"
)

// AppChainID hardcoded chainID for simulation
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/cosmos/gaia/v20/app/keepers"
"github.com/cosmos/gaia/v21/app/keepers"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v19/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v19

import (
"github.com/cosmos/gaia/v20/app/upgrades"
"github.com/cosmos/gaia/v21/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v19/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/cosmos/gaia/v20/app/keepers"
"github.com/cosmos/gaia/v21/app/keepers"
)

func CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v20/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v20

import (
"github.com/cosmos/gaia/v20/app/upgrades"
"github.com/cosmos/gaia/v21/app/upgrades"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v20/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

"github.com/cosmos/gaia/v20/app/keepers"
"github.com/cosmos/gaia/v21/app/keepers"
)

// Constants for the new parameters in the v20 upgrade.
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v20/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"

"github.com/cosmos/gaia/v20/app/helpers"
v20 "github.com/cosmos/gaia/v20/app/upgrades/v20"
"github.com/cosmos/gaia/v21/app/helpers"
v20 "github.com/cosmos/gaia/v21/app/upgrades/v20"
)

func GetTestMsgConsumerAddition() providertypes.MsgConsumerAddition { //nolint:staticcheck
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v21/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v21

import (
"github.com/cosmos/gaia/v20/app/upgrades"
"github.com/cosmos/gaia/v21/app/upgrades"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions app/upgrades/v21/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package v21

import (
"context"
"fmt"

errorsmod "cosmossdk.io/errors"
"cosmossdk.io/math"
upgradetypes "cosmossdk.io/x/upgrade/types"
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
"github.com/cosmos/gaia/v20/app/keepers"
"github.com/cosmos/gaia/v21/app/keepers"
providerkeeper "github.com/cosmos/interchain-security/v6/x/ccv/provider/keeper"
types2 "github.com/cosmos/interchain-security/v6/x/ccv/provider/types"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaiad/cmd/bech32_convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/spf13/cobra"

addressutil "github.com/cosmos/gaia/v20/pkg/address"
addressutil "github.com/cosmos/gaia/v21/pkg/address"
)

var flagBech32Prefix = "prefix"
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaiad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

gaia "github.com/cosmos/gaia/v20/app"
gaia "github.com/cosmos/gaia/v21/app"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
4 changes: 2 additions & 2 deletions cmd/gaiad/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/cosmos/gaia/v20/app"
"github.com/cosmos/gaia/v20/cmd/gaiad/cmd"
app "github.com/cosmos/gaia/v21/app"
"github.com/cosmos/gaia/v21/cmd/gaiad/cmd"
)

func TestRootCmdConfig(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaiad/cmd/testnet_set_local_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
"github.com/cosmos/cosmos-sdk/server"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
gaia "github.com/cosmos/gaia/v20/app"
gaia "github.com/cosmos/gaia/v21/app"
"github.com/spf13/cast"
"github.com/spf13/cobra"

Expand Down
4 changes: 2 additions & 2 deletions cmd/gaiad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/cosmos/gaia/v20/app"
"github.com/cosmos/gaia/v20/cmd/gaiad/cmd"
app "github.com/cosmos/gaia/v21/app"
"github.com/cosmos/gaia/v21/cmd/gaiad/cmd"
)

func main() {
Expand Down
Loading

0 comments on commit 1626e11

Please sign in to comment.