Skip to content

Commit 8a8fe0d

Browse files
committed
Merge branch 'wasmd_v0.29.1' into apply_wasmd_v0.29.1
* wasmd_v0.29.1: (94 commits) fix test. fix test. update cosmos-sdk to v45.9, add dragonberry. Changelog updates (CosmWasm#1024) Validate incoming messages Add dependencies for protobuf and remove third_party forlder (CosmWasm#1030) Bump bufbuild/buf-setup-action from 1.7.0 to 1.8.0 (CosmWasm#1006) Add check version wasm (CosmWasm#1029) Make SenderPrivKey field public Bump actions/checkout from 3.0.2 to 3.1.0 Revert module version to 1 as there is no migration Doc ante handler Fix: typos Changelog for v0.29.0-rc1 (CosmWasm#1018) Implement improvements to new address generation (CosmWasm#1014) Prune vesting accounts balances (CosmWasm#1003) Bump github.com/cosmos/ibc-go/v3 from 3.2.0 to 3.3.0 Fix path to proofs in protos Upgrade .a files to 1.1.1 Bump wasmvm to 1.1.1 ... # Conflicts: # .circleci/config.yml # .github/workflows/proto-buf-publisher.yml # CHANGELOG.md # Dockerfile # Makefile # README.md # app/app.go # app/app_test.go # app/export.go # app/sim_test.go # app/test_helpers.go # go.mod # go.sum # scripts/protocgen.sh # third_party/proto/cosmos/base/query/v1beta1/pagination.proto # third_party/proto/cosmos/base/v1beta1/coin.proto # third_party/proto/tendermint/blockchain/types.pb.go # third_party/proto/tendermint/consensus/types.pb.go # third_party/proto/tendermint/consensus/wal.pb.go # third_party/proto/tendermint/p2p/conn.pb.go # third_party/proto/tendermint/privval/types.pb.go # third_party/proto/tendermint/state/types.pb.go # third_party/proto/tendermint/types/types.pb.go # third_party/proto/tendermint/types/validator.pb.go # x/wasm/alias.go # x/wasm/client/cli/genesis_msg.go # x/wasm/client/cli/genesis_msg_test.go # x/wasm/client/cli/query.go # x/wasm/client/cli/tx.go # x/wasm/client/rest/gov.go # x/wasm/handler.go # x/wasm/ibctesting/chain.go # x/wasm/ibctesting/wasm.go # x/wasm/ioutils/ioutil_test.go # x/wasm/ioutils/utils_test.go # x/wasm/keeper/authz_policy.go # x/wasm/keeper/bench_test.go # x/wasm/keeper/contract_keeper.go # x/wasm/keeper/gas_register.go # x/wasm/keeper/gas_register_test.go # x/wasm/keeper/genesis_test.go # x/wasm/keeper/ibc_test.go # x/wasm/keeper/keeper.go # x/wasm/keeper/keeper_test.go # x/wasm/keeper/legacy_querier_test.go # x/wasm/keeper/msg_server.go # x/wasm/keeper/options.go # x/wasm/keeper/options_test.go # x/wasm/keeper/proposal_handler.go # x/wasm/keeper/proposal_integration_test.go # x/wasm/keeper/querier.go # x/wasm/keeper/querier_test.go # x/wasm/keeper/recurse_test.go # x/wasm/keeper/reflect_test.go # x/wasm/keeper/relay_test.go # x/wasm/keeper/staking_test.go # x/wasm/keeper/submsg_test.go # x/wasm/keeper/test_common.go # x/wasm/keeper/testdata/reflect.go # x/wasm/keeper/testdata/reflect.wasm # x/wasm/keeper/wasmtesting/coin_transferrer.go # x/wasm/keeper/wasmtesting/gas_register.go # x/wasm/module.go # x/wasm/module_test.go # x/wasm/simulation/genesis.go # x/wasm/simulation/operations.go # x/wasm/simulation/params.go # x/wasm/types/codec.go # x/wasm/types/events.go # x/wasm/types/exported_keepers.go # x/wasm/types/genesis.pb.go # x/wasm/types/iavl_range_test.go # x/wasm/types/ibc.pb.go # x/wasm/types/params.go # x/wasm/types/proposal.pb.go # x/wasm/types/query.pb.go # x/wasm/types/query.pb.gw.go # x/wasm/types/tx.pb.go # x/wasm/types/types.pb.go
2 parents cae21ec + d8ebe64 commit 8a8fe0d

File tree

258 files changed

+6395
-25773
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+6395
-25773
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
version: 2
2-
updates:
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
38
- package-ecosystem: gomod
49
directory: "/"
510
schedule:

.github/workflows/codeql-analizer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
paths:
66
- "**.go"
77
push:
8-
branches: [ master ]
8+
branches: [ main ]
99
paths:
1010
- "**.go"
1111

@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v2.3.5
22+
uses: actions/checkout@v3.1.0
2323

2424
# Initializes the CodeQL tools for scanning.
2525
- name: Initialize CodeQL

.github/workflows/proto-buf-publisher.yml

Whitespace-only changes.

INTEGRATION.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# Integration
44

55
If you want to use Wasm in your own app, here is how you can get this working
6-
quickly and easily. First, check to make sure you fit the pre-requisites,
6+
quickly and easily.
7+
First start with This [article](https://medium.com/cosmwasm/cosmwasm-for-ctos-iv-native-integrations-713140bf75fc)
8+
in the "CosmWasm for CTOs" series that gives you a high level view.
9+
Then check to make sure you fit the pre-requisites,
710
then integrate the `x/wasm` module as described below, and finally, you
811
can add custom messages and queries to your custom Go/SDK modules, exposing
912
them to any chain-specific contract.
@@ -14,26 +17,18 @@ The pre-requisites of integrating `x/wasm` into your custom app is to be using
1417
a compatible version of the Cosmos SDK, and to accept some limits to the
1518
hardware it runs on.
1619

17-
| wasmd | Cosmos SDK |
18-
|:------:|:-----------:|
19-
| v0.24 | v0.45.0 |
20-
| v0.23 | v0.45.0 |
21-
| v0.22 | v0.45.0 |
22-
| v0.21 | v0.42.x |
23-
| v0.20 | v0.42.x |
24-
| v0.19 | v0.42.x |
25-
| v0.18 | v0.42.x |
26-
| v0.17 | v0.42.x |
27-
| v0.16 | v0.42.x |
28-
| v0.15 | v0.41.x |
29-
| v0.14 | v0.40.x |
30-
| v0.13 | v0.40.0-rc3 |
31-
| v0.12 | v0.40.0-rc3 |
32-
| v0.11 | v0.39.1 |
33-
| v0.10 | v0.39.1 |
34-
| v0.9 | v0.38.3 |
35-
| v0.8 | v0.38.3 |
36-
| v0.7 | v0.38.3 |
20+
| wasmd | Cosmos SDK |
21+
|:-----:|:----------:|
22+
| v0.29 | v0.45.8 |
23+
| v0.28 | v0.45.5 |
24+
| v0.27 | v0.45.4 |
25+
| v0.26 | v0.45.1 |
26+
| v0.25 | v0.45.1 |
27+
| v0.24 | v0.45.0 |
28+
| v0.23 | v0.45.0 |
29+
| v0.22 | v0.45.0 |
30+
| v0.21 | v0.42.x |
31+
3732

3833
We currently only support Intel/AMD64 CPUs and OSX or Linux. For Linux, the standard build
3934
commands work for `glibc` systems (Ubuntu, Debian, CentOS, etc). If you wish to compile
@@ -72,9 +67,12 @@ from the Cosmos SDK, and enabled them in `app.go`. If so, you can just look
7267
at [`wasmd/app/app.go`](https://github.com/CosmWasm/wasmd/blob/master/app/app.go#)
7368
for how to do so (just search there for lines with `wasm`).
7469

75-
`wasmd` also comes with a custom `ante handler` that adds the TX position in the block into the context
76-
and passes it to the contracts. In order to support this feature you would need to add our custom
77-
ante handler into the `ante handler chain` as in: [`app/ante.go`](https://github.com/CosmWasm/wasmd/blob/master/app/ante.go)
70+
`wasmd` also comes with 2 custom `ante handlers`:
71+
* `CountTXDecorator` adds the TX position in the block into the context and passes it to the contracts
72+
* `LimitSimulationGasDecorator` prevents an "infinite gas" query
73+
74+
In order to support these features you would need to add our custom
75+
ante handlers into the `ante handler chain` as in: [`app/ante.go`](https://github.com/CosmWasm/wasmd/blob/master/app/ante.go)
7876

7977
### Copied into your app
8078

@@ -202,5 +200,5 @@ the SDK is implemented properly.
202200

203201
Once you have tested this and are happy with the results, you can wire it up in `app.go`.
204202
Just edit [the default `NewKeeper` constructor](https://github.com/CosmWasm/wasmd/blob/v0.8.0-rc1/app/app.go#L257-L258)
205-
to have the proper `supportedFeatures` and pass in the `CustomEncoder` and `CustomQuerier` as the last two arguments to `NewKeeper`.
203+
to have the proper `availableCapabilities` and pass in the `CustomEncoder` and `CustomQuerier` as the last two arguments to `NewKeeper`.
206204
Now you can compile your chain and upload your custom contracts on it.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ go.sum: go.mod
108108

109109
draw-deps:
110110
@# requires brew install graphviz or apt-get install graphviz
111-
go get github.com/RobotsAndPencils/goviz
111+
go install github.com/RobotsAndPencils/goviz@latest
112112
@goviz -i ./cmd/wasmd -d 2 | dot -Tpng -o dependency-graph.png
113113

114114
clean:
@@ -166,7 +166,7 @@ format: format-tools
166166
### Protobuf ###
167167
###############################################################################
168168
PROTO_VERSION=v0.2
169-
PROTO_BUILDER_IMAGE=tendermintdev/sdk-proto-gen@sha256:372dce7be2f465123e26459973ca798fc489ff2c75aeecd814c0ca8ced24faca
169+
PROTO_BUILDER_IMAGE=tendermintdev/sdk-proto-gen:$(PROTO_VERSION)
170170
PROTO_FORMATTER_IMAGE=tendermintdev/docker-build-proto@sha256:aabcfe2fc19c31c0f198d4cd26393f5e5ca9502d7ea3feafbfe972448fee7cae
171171
PROTO_GEN_SWAGGER_IMAGE=cosmos-sdk-proto-gen-swagger-$(PROTO_VERSION)
172172

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ compatibility list:
2626

2727
| line/wasmd | cosmwasm/wasmd | line/wasmvm | cosmwasm/wasmvm | cosmwasm-vm | cosmwasm-std |
2828
|------------|----------------|:--------------|-----------------|-------------|--------------|
29+
| | 0.29 | | v1.1.0 | | 1.0-1.1 |
30+
| | 0.28 | | v1.0.0 | | 1.0-1.1 |
2931
| 0.1 | 0.27 | v1.0.0-0.10.0 | v1.0.0 | | 1.0 |
3032
| | 0.26 | | 1.0.0-beta10 | | 1.0 |
3133
| | 0.25 | | 1.0.0-beta10 | | 1.0 |
@@ -52,7 +54,7 @@ It will also run contracts compiled with 1.x assuming they don't opt into any ne
5254
The 1.x cosmwasm_vm will support all contracts with 1.0 <= version <= 1.x.
5355

5456
Note that `cosmwasm-std` version defines which contracts are compatible with this system. The wasm code uploaded must
55-
have been compiled with one of the supported `cosmwasm-std` versions, or will be rejeted upon upload (with some error
57+
have been compiled with one of the supported `cosmwasm-std` versions, or will be rejected upon upload (with some error
5658
message about "contract too old?" or "contract too new?"). `cosmwasm-vm` version defines the runtime used. It is a
5759
breaking change to switch runtimes (you will need to organize a chain upgrade). As of `cosmwasm-vm 0.13` we are
5860
using [wasmer](https://github.com/wasmerio/wasmer/) 1.0, which is significantly more performant than the older versions.
@@ -95,9 +97,9 @@ The used cosmos-sdk version is in transition migrating from amino encoding to pr
9597

9698
We use standard cosmos-sdk encoding (amino) for all sdk Messages. However, the message body sent to all contracts,
9799
as well as the internal state is encoded using JSON. Cosmwasm allows arbitrary bytes with the contract itself
98-
responsible for decodng. For better UX, we often use `json.RawMessage` to contain these bytes, which enforces that it is
100+
responsible for decoding. For better UX, we often use `json.RawMessage` to contain these bytes, which enforces that it is
99101
valid json, but also give a much more readable interface. If you want to use another encoding in the contracts, that is
100-
a relatively minor change to wasmd but would currently require a fork. Please open in issue if this is important for
102+
a relatively minor change to wasmd but would currently require a fork. Please open an issue if this is important for
101103
your use case.
102104

103105
## Quick Start
@@ -109,6 +111,12 @@ make test
109111
if you are using a linux without X or headless linux, look at [this article](https://ahelpme.com/linux/dbusexception-could-not-get-owner-of-name-org-freedesktop-secrets-no-such-name) or [#31](https://github.com/CosmWasm/wasmd/issues/31#issuecomment-577058321).
110112

111113
## Protobuf
114+
The protobuf files for this project are published automatically to the [buf repository](https://buf.build/) to make integration easier:
115+
116+
| wasmd version | buf tag |
117+
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------|
118+
| 0.26.x | [51931206dbe09529c1819a8a2863d291035a2549](https://buf.build/cosmwasm/wasmd/tree/51931206dbe09529c1819a8a2863d291035a2549:cosmwasm/wasm/v1) |
119+
112120
Generate protobuf
113121
```shell script
114122
make proto-gen

0 commit comments

Comments
 (0)