Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upd: updated to wasmd v0.50 #NTRN-231 #153

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
cd66f78
SDK upgrade to v0.50 (branch) (#1611)
alpe Sep 25, 2023
d5305e8
Bump actions/checkout from 4.0.0 to 4.1.0 (#1635)
dependabot[bot] Sep 25, 2023
d79c819
Update cosmos-sdk version in system tests (#1636)
pinosu Sep 26, 2023
625cc49
Bump sdk to rc1
alpe Sep 26, 2023
bb2a2fa
Merge pull request #1637 from CosmWasm/sdk-upgrade050rc1
alpe Sep 26, 2023
4c710cb
Bump github.com/rs/zerolog from 1.30.0 to 1.31.0
dependabot[bot] Sep 26, 2023
f3ad908
Bump github.com/cosmos/ibc-go/modules/capability
dependabot[bot] Sep 27, 2023
5966c11
Merge pull request #1639 from CosmWasm/dependabot/go_modules/github.c…
alpe Sep 27, 2023
af8c491
Merge pull request #1638 from CosmWasm/dependabot/go_modules/github.c…
alpe Sep 27, 2023
e654808
Add msg update contract label (#1640)
pinosu Sep 28, 2023
894076a
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 (#1641)
dependabot[bot] Sep 28, 2023
ca682c0
Bump github.com/docker/distribution from 2.8.2+incompatible to 2.8.3+…
dependabot[bot] Oct 3, 2023
b845e14
Bump github.com/cosmos/ibc-go/v8 from 8.0.0-beta.0 to 8.0.0-beta.1 (#…
dependabot[bot] Oct 3, 2023
e0da419
Remove gov v1beta1 dependencies and deprecated proposals (#1646)
pinosu Oct 4, 2023
6b8b45c
fix: propagate funds validation errors
aelesbao Oct 3, 2023
3ea8575
Merge pull request #1649 from aelesbao/aelesbao/fix/propagate-funds-err
alpe Oct 5, 2023
4cd1345
Retract v0.42.0 release
pinosu Oct 6, 2023
bb7d3e5
Bump bufbuild/buf-setup-action from 1.26.1 to 1.27.0 (#1653)
dependabot[bot] Oct 6, 2023
4d5f875
Merge pull request #1652 from CosmWasm/1651-retract_42_release
alpe Oct 9, 2023
99367e1
Bump github.com/spf13/viper from 1.16.0 to 1.17.0 (#1656)
dependabot[bot] Oct 9, 2023
1a22c29
Add label validation for non printable chars (#1650)
pinosu Oct 9, 2023
90d4368
Bump wasmvm to v1.4.1 - bugfix (backport #1658) (#1660)
mergify[bot] Oct 9, 2023
1445baa
Added tests for classic addresses.
DariuszDepta Oct 12, 2023
d8fe3f9
Used another prefix.
DariuszDepta Oct 12, 2023
f79a694
Fixes.
DariuszDepta Oct 12, 2023
29d10f3
Fixes.
DariuszDepta Oct 12, 2023
99ade09
Refactoring.
DariuszDepta Oct 12, 2023
9394faf
Maybe this will fix the problem.
DariuszDepta Oct 12, 2023
3af3036
Refactoring.
DariuszDepta Oct 12, 2023
76f6f3d
Refactoring.
DariuszDepta Oct 12, 2023
257cd7e
Made cleanup function private.
DariuszDepta Oct 13, 2023
c8a6594
Merge pull request #1666 from CosmWasm/classic-address-tests
DariuszDepta Oct 13, 2023
96867a3
Update changelog for v0.43.0 release (#1662) (#1668)
mergify[bot] Oct 13, 2023
cd78376
Add system tests for chain upgrade (#1643)
alpe Oct 13, 2023
bb2beb8
Fix test code
alpe Oct 16, 2023
606289a
Merge pull request #1671 from CosmWasm/mergify/bp/main/pr-1670
alpe Oct 16, 2023
361ff25
Bump actions/checkout from 4.1.0 to 4.1.1
dependabot[bot] Oct 18, 2023
a6fe36d
Rename some more "features" to "capabilities" (#1679)
webmaster128 Oct 20, 2023
2eee755
Merge pull request #1678 from CosmWasm/dependabot/github_actions/acti…
alpe Oct 20, 2023
62505fc
Bump bufbuild/buf-setup-action from 1.27.0 to 1.27.1 (#1677)
dependabot[bot] Oct 25, 2023
5adfe12
Bump google.golang.org/grpc from 1.58.1 to 1.58.3 in /tests/system (#…
dependabot[bot] Oct 26, 2023
c6919e1
Bump bufbuild/buf-setup-action from 1.27.1 to 1.27.2 (#1684)
dependabot[bot] Oct 30, 2023
a2bbd36
Bump wasmvm 1.5.0 (#1686)
pinosu Oct 31, 2023
62d91d9
Update changelog for v0.44.0 release (#1689)
pinosu Nov 6, 2023
fc549d4
Prevent empty channel version
alpe Nov 8, 2023
7c8f1e8
Merge pull request #1697 from CosmWasm/1693_default_version
alpe Nov 10, 2023
4313d7f
Upgrade to SDK v0.50.1 (#1696)
pinosu Nov 13, 2023
6f8c0a9
Minor cleanups and comments (#1712)
alpe Nov 13, 2023
c5f5881
Fix local test scripts
alpe Nov 13, 2023
2a82e35
Fix gov v1beta1 support for legacy propsals (#1715)
alpe Nov 15, 2023
1223434
Merge pull request #1714 from CosmWasm/local_scripts
alpe Nov 15, 2023
4e7316e
Allow empty attribute values (#1618)
99Kies Nov 15, 2023
f31351f
Pass empty attribute value through stack
alpe Nov 15, 2023
12589b2
Retract wasmd v0.43.0 and v0.44.0
pinosu Nov 15, 2023
0c8a485
Merge pull request #1720 from CosmWasm/retract_43_44
alpe Nov 15, 2023
09ae328
Merge pull request #1719 from CosmWasm/1617_regression
alpe Nov 15, 2023
8eaa55b
Add changelog for 0.45 release (#1721)
pinosu Nov 15, 2023
07eb14a
Bump bufbuild/buf-setup-action from 1.28.0 to 1.28.1 (#1726)
dependabot[bot] Nov 16, 2023
3b6512c
Update README (#1727)
pinosu Nov 16, 2023
5cbc756
Update compatibility metrics
alpe Nov 17, 2023
9050b5f
Merge pull request #1730 from CosmWasm/doc
alpe Nov 17, 2023
dffa321
Fix migrate legacy params (#1729)
alpe Nov 21, 2023
b02a472
Bump github.com/cometbft/cometbft from 0.38.0 to 0.38.1 (#1733)
dependabot[bot] Nov 22, 2023
7ea00e2
Prepare v0.50.0 release (#1737)
alpe Nov 23, 2023
1e620a5
Merge branch 'cosmwasm-orig-0.50.0' into upd/neutron-upd-0.50
swelf19 Mar 4, 2024
564e5d1
merged orig v0.50
swelf19 Mar 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ orbs:
executors:
golang:
docker:
- image: cimg/go:1.20
- image: cimg/go:1.21

commands:
make:
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
test-system:
executor: golang
parallelism: 1
resource_class: large
resource_class: xlarge
steps:
- attach_workspace:
at: /tmp/workspace
Expand All @@ -112,6 +112,13 @@ jobs:
- run:
name: Build and run system tests
command: make test-system
- run:
command: |
mkdir -p /tmp/system-test-workspace
mv /home/circleci/project/tests/system/testnet /tmp/system-test-workspace
when: on_fail
- store_artifacts:
path: /tmp/system-test-workspace

benchmark:
executor: golang
Expand All @@ -135,7 +142,7 @@ jobs:
simulations:
executor: golang
parallelism: 1
resource_class: large
resource_class: xlarge
steps:
- checkout
- run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/proto-buf-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.0.0
- uses: bufbuild/buf-setup-action@v1.26.1
- uses: actions/checkout@v4.1.1
- uses: bufbuild/buf-setup-action@v1.28.1

# lint checks
- uses: bufbuild/buf-lint-action@v1
Expand Down
8 changes: 4 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ queue_rules:
pull_request_rules:
- name: backport patches to main branch
conditions:
- base=releases/v0.40.x
- base=releases/v0.4x
- label=backport/main
actions:
backport:
Expand All @@ -20,11 +20,11 @@ pull_request_rules:
backport:
branches:
- releases/v0.3x
- name: backport patches to v0.40.x release branch
- name: backport patches to sdk47 release branch
conditions:
- base=main
- label=backport/v0.40.x
- label=backport/v0.4x
actions:
backport:
branches:
- releases/v0.40.x
- releases/v0.4x
40 changes: 20 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@

## [Unreleased](https://github.com/CosmWasm/wasmd/tree/HEAD)

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.40.2...HEAD)
[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.50.0...HEAD)

## [v0.40.2](https://github.com/CosmWasm/wasmd/tree/v0.40.2) (2023-06-09)
## [v0.50.0](https://github.com/CosmWasm/wasmd/tree/v0.50.0) (2023-11-23)

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.40.1...v0.40.2)
[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.45.0...v0.50.0)

This patch release includes only the cosmos-sdk upgrade to [v0.47.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.3).
It solves [barberry](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry/10825) security vulnerability.
- Fix module migration fails when code upload access is set to `OnlyAddress` [\#1725](https://github.com/CosmWasm/wasmd/issues/1725)
- Upgrade to SDK v0.50.1 [\#1696](https://github.com/CosmWasm/wasmd/pull/1696)
- Bump bufbuild/buf-setup-action from 1.27.1 to 1.27.2 [\#1684](https://github.com/CosmWasm/wasmd/pull/1684)
- Bump google.golang.org/grpc from 1.58.1 to 1.58.3 in /tests/system [\#1682](https://github.com/CosmWasm/wasmd/pull/1682)
- Rename some more "features" to "capabilities" [\#1679](https://github.com/CosmWasm/wasmd/pull/1679)
- Bump actions/checkout from 4.1.0 to 4.1.1 [\#1678](https://github.com/CosmWasm/wasmd/pull/1678)
- Bump bufbuild/buf-setup-action from 1.27.0 to 1.27.1 [\#1677](https://github.com/CosmWasm/wasmd/pull/1677)
- Upgrade to SDK v0.50 + IBC v8.0 [\#1611](https://github.com/CosmWasm/wasmd/pull/1611)

### Notable changes:
- Upgrade cosmos-sdk to [v0.47.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.3)
- Upgrade to [SDK v0.50.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.1) Eden release
- Upgrade to [IBC v8.0.0](https://github.com/cosmos/ibc-go/releases/tag/v8.0.0) release

### Migration notes:
- This release does not include any state migrations or breaking changes, therefore a coordinated chain upgrade is not required.

## [v0.40.1](https://github.com/CosmWasm/wasmd/tree/v0.40.1) (2023-06-06)

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.40.0...v0.40.1)
- This release includes state migrations! Please pay careful attention to the doc provided by the [SDK](https://github.com/cosmos/cosmos-sdk/blob/v0.50.1/UPGRADING.md#v050x) team
and the [IBC](https://github.com/cosmos/ibc-go/releases/tag/v8.0.0) team with their releases
- We have some example upgrade code in the `app/upgrade/v0.50` dir, assuming that you come from a wasmd v0.4x version.
- We also tested a chain upgrade with wasmd v0.33 to v0.50 directly with a fix to [app.go](https://github.com/CosmWasm/wasmd/blame/b02a4723618629b5bb9603d8298621f6ef449f92/app/app.go#L927)
to work around an issue.
- Disclaimer: the upgrade codes are examples and may require more customization for your chain. Please do proper tests before applying on mainnets
- Please share your experience and success stories on CosmWasm [discord](https://discord.com/invite/cPjEnPd)

This patch release includes only the wasmvm upgrade to [v1.2.4](https://github.com/CosmWasm/wasmvm/releases/tag/v1.2.4).
It solves some incompatibility problems by improving cache invalidation. See [\#426](https://github.com/CosmWasm/wasmvm/issues/426)

### Notable changes:
- Upgrade wasmvm to v1.2.4. [\#1430](https://github.com/CosmWasm/wasmd/issues/1430)

### Migration notes:
- This release does not include any state migrations or breaking changes, therefore a coordinated chain upgrade is not required.
[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.45.0...HEAD)

## [v0.45.0](https://github.com/CosmWasm/wasmd/tree/v0.45.0) (2023-11-15)

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build . -t cosmwasm/wasmd:latest
# docker run --rm -it cosmwasm/wasmd:latest /bin/sh
FROM golang:1.19-alpine3.15 AS go-builder
FROM golang:1.21-alpine3.17 AS go-builder
ARG arch=x86_64

# this comes from standard alpine nightly file
Expand Down Expand Up @@ -29,7 +29,7 @@ RUN echo "Ensuring binary is statically linked ..." \
&& (file /code/build/wasmd | grep "statically linked")

# --------------------------------------------------------
FROM alpine:3.16
FROM alpine:3.17

COPY --from=go-builder /code/build/wasmd /usr/bin/wasmd

Expand Down
6 changes: 6 additions & 0 deletions INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ hardware it runs on.

| wasmd | Cosmos SDK |
|:-----:|:----------:|
| v0.50 | v0.50.1 |
| v0.45 | v0.47.5 |
| v0.44 | v0.47.5 |
| v0.43 | v0.47.5 |
| v0.42 | v0.47.5 |
| v0.41 | v0.47.4 |
| v0.40 | v0.47.1 |
| v0.31 | v0.45.14 |
| v0.30 | v0.45.11 |
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ test-system: install
format-tools:
go install mvdan.cc/gofumpt@v0.4.0
go install github.com/client9/misspell/cmd/misspell@v0.3.4
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/daixiang0/gci@v0.11.2

lint: format-tools
golangci-lint run --tests=false
Expand All @@ -170,13 +170,13 @@ lint: format-tools
format: format-tools
find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofumpt -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs goimports -w -local github.com/CosmWasm/wasmd
find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gci write --skip-generated -s standard -s default -s "prefix(cosmossdk.io)" -s "prefix(github.com/cosmos/cosmos-sdk)" -s "prefix(github.com/CosmWasm/wasmd)" --custom-order


###############################################################################
### Protobuf ###
###############################################################################
protoVer=0.13.1
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This code was forked from the `cosmos/gaia` repository as a basis and then we ad
many gaia-specific files. However, the `wasmd` binary should function just like `gaiad` except for the
addition of the `x/wasm` module.

**Note**: Requires [Go 1.19+](https://golang.org/dl/)
**Note**: Requires [Go 1.21+](https://golang.org/dl/)

For critical security issues & disclosure, see [SECURITY.md](SECURITY.md).
## Compatibility with CosmWasm contracts
Expand All @@ -27,6 +27,8 @@ compatibility list:

| wasmd | wasmvm | cosmwasm-vm | cosmwasm-std |
|-------|--------------|-------------|--------------|
| 0.50 | v1.5.0 | | 1.0-1.5 |
| 0.45 | v1.5.0 | | 1.0-1.5 |
| 0.44 | v1.5.0 | | 1.0-1.5 |
| 0.43 | v1.4.1 | | 1.0-1.4 |
| 0.42 | v1.4.0 | | 1.0-1.4 |
Expand Down
40 changes: 24 additions & 16 deletions app/ante.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package app

import (
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
"github.com/cosmos/ibc-go/v7/modules/core/keeper"
"errors"

errorsmod "cosmossdk.io/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"
circuitante "cosmossdk.io/x/circuit/ante"
circuitkeeper "cosmossdk.io/x/circuit/keeper"

storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
Expand All @@ -20,34 +22,40 @@ import (
type HandlerOptions struct {
ante.HandlerOptions

IBCKeeper *keeper.Keeper
WasmKeeper *wasmkeeper.Keeper
WasmConfig *wasmTypes.WasmConfig
TXCounterStoreKey storetypes.StoreKey
IBCKeeper *keeper.Keeper
WasmConfig *wasmTypes.WasmConfig
WasmKeeper *wasmkeeper.Keeper
TXCounterStoreService corestoretypes.KVStoreService
CircuitKeeper *circuitkeeper.Keeper
}

// NewAnteHandler constructor
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
if options.AccountKeeper == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "account keeper is required for AnteHandler")
return nil, errors.New("account keeper is required for ante builder")
}
if options.BankKeeper == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler")
return nil, errors.New("bank keeper is required for ante builder")
}
if options.SignModeHandler == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
return nil, errors.New("sign mode handler is required for ante builder")
}
if options.WasmConfig == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder")
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")
}
if options.TXCounterStoreKey == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "tx counter key is required for ante builder")
if options.CircuitKeeper == nil {
return nil, errors.New("circuit keeper 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.TXCounterStoreKey),
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreService),
wasmkeeper.NewGasRegisterDecorator(options.WasmKeeper.GetGasRegister()),
circuitante.NewCircuitBreakerDecorator(options.CircuitKeeper),
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
Expand Down
Loading
Loading