Skip to content

Commit 0e7480c

Browse files
committed
Merge branch 'main' into aw/new-schema
2 parents b4b7b2b + b6b0591 commit 0e7480c

File tree

193 files changed

+7498
-14114
lines changed

Some content is hidden

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

193 files changed

+7498
-14114
lines changed

.circleci/config.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ workflows:
7070
- package_schema_derive
7171
- package_std
7272
- package_vm
73+
- package_vm_derive
7374
- package_vm_windows
7475
- contract_burner
7576
- contract_crypto_verify
@@ -80,6 +81,7 @@ workflows:
8081
- contract_ibc_callbacks
8182
- contract_ibc_reflect
8283
- contract_ibc_reflect_send
84+
- contract_nested_contracts
8385
- contract_queue
8486
- contract_reflect
8587
- contract_staking
@@ -492,6 +494,34 @@ jobs:
492494
- target/debug/deps
493495
key: cargocache-v2-package_vm-rust:1.74-{{ checksum "Cargo.lock" }}
494496

497+
package_vm_derive:
498+
docker:
499+
- image: rust:1.74
500+
steps:
501+
- checkout
502+
- run:
503+
name: Version information
504+
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
505+
- restore_cache:
506+
keys:
507+
- cargocache-v2-package_vm_derive-rust:1.74-{{ checksum "Cargo.lock" }}
508+
- run:
509+
name: Build
510+
working_directory: ~/project/packages/vm-derive
511+
command: cargo build --locked
512+
- run:
513+
name: Test
514+
working_directory: ~/project/packages/vm-derive
515+
command: cargo test --locked
516+
517+
- save_cache:
518+
paths:
519+
- /usr/local/cargo/registry
520+
- target/debug/.fingerprint
521+
- target/debug/build
522+
- target/debug/deps
523+
key: cargocache-v2-package_vm_derive-rust:1.74-{{ checksum "Cargo.lock" }}
524+
495525
package_vm_windows:
496526
executor:
497527
name: win/default
@@ -637,6 +667,7 @@ jobs:
637667
- cargocache-v2-contract_hackatom-rust:1.74-{{ checksum "Cargo.lock" }}
638668
- check_contract:
639669
min_version: "1.4"
670+
skip_cosmwasm_check: true
640671
- save_cache:
641672
paths:
642673
- /usr/local/cargo/registry
@@ -762,6 +793,34 @@ jobs:
762793
- target/wasm32-unknown-unknown/release/deps
763794
key: cargocache-v2-contract_floaty-rust:1.74-{{ checksum "Cargo.lock" }}
764795

796+
contract_nested_contracts:
797+
docker:
798+
- image: rust:1.75
799+
environment:
800+
RUST_BACKTRACE: 1
801+
working_directory: ~/cosmwasm/contracts/nested-contracts
802+
steps:
803+
- checkout:
804+
path: ~/cosmwasm
805+
- run:
806+
name: Version information
807+
command: rustc --version; cargo --version; rustup --version
808+
- restore_cache:
809+
keys:
810+
- cargocache-v2-contract_nested_contracts-rust:1.75-{{ checksum "Cargo.lock" }}
811+
- check_contract:
812+
min_version: "1.4"
813+
- save_cache:
814+
paths:
815+
- /usr/local/cargo/registry
816+
- target/debug/.fingerprint
817+
- target/debug/build
818+
- target/debug/deps
819+
- target/wasm32-unknown-unknown/release/.fingerprint
820+
- target/wasm32-unknown-unknown/release/build
821+
- target/wasm32-unknown-unknown/release/deps
822+
key: cargocache-v2-contract_nested_contracts-rust:1.75-{{ checksum "Cargo.lock" }}
823+
765824
contract_queue:
766825
docker:
767826
- image: rust:1.74

.github/workflows/autofix.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,28 @@ jobs:
2929

3030
# Get latest version from https://autofix.ci/setup
3131
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
32+
33+
autofix-schemas:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Update schemas
39+
run: ./devtools/update_schemas.sh
40+
41+
# Get latest version from https://autofix.ci/setup
42+
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
43+
44+
autofix-toml:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Install taplo
49+
run: |
50+
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
51+
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
52+
- run: |
53+
taplo fmt
54+
55+
# Get latest version from https://autofix.ci/setup
56+
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a

.github/workflows/toml.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "TOML checks"
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
fmt-check:
13+
name: "Formatting"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install taplo
18+
run: |
19+
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
20+
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
21+
- run: |
22+
taplo fmt
23+
CHANGES_IN_REPO=$(git status --porcelain)
24+
if [[ -n "$CHANGES_IN_REPO" ]]; then
25+
exit 1
26+
fi

.github/workflows/typo-check.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check for typos
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
check-typos:
13+
name: "Spell-check repository source"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Run spell-check
19+
uses: crate-ci/typos@master

.taplo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[formatting]
2+
indent_string = " "
3+
reorder_arrays = true

CHANGELOG-pre1.0.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ and this project adheres to
738738
with this change, the `backtraces` feature now requires Rust nightly.
739739
- Rename `StdError::ParseErr::source` to `StdError::ParseErr::source_type` and
740740
`StdError::SerializeErr::target` to `StdError::SerializeErr::target_type` to
741-
work around speacial treatment of the field name `source` in thiserror.
741+
work around special treatment of the field name `source` in thiserror.
742742
- Rename `Extern` to `Deps` to unify naming.
743743
- Simplify ownership of calling `handle`, etc. with `Deps` and `DepsMut` struct
744744
that just contains references (`DepsMut` has `&mut Storage` otherwise the
@@ -1259,7 +1259,7 @@ https://github.com/CosmWasm/cosmwasm/issues/451).
12591259
for mock storage and copying a stateless bridge for the external storage,
12601260
which are different semantics.
12611261
- Remove public `cosmwasm::imports::dependencies`. A user of this library does
1262-
not need to call this explicitely. Dependencies are created internally and
1262+
not need to call this explicitly. Dependencies are created internally and
12631263
passed as an argument in `exports::do_init`, `exports::do_handle` and
12641264
`exports::do_query`.
12651265
- Make `ExternalStorage` not `Clone`able anymore. This does not copy any data,

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,20 @@ and this project adheres to
1717
- cosmwasm-std: Add `IbcMsg::{PayPacketFee, PayPacketFeeAsync}` and
1818
`IbcQuery::FeeEnabledChannel` to allow contracts to incentivize IBC packets
1919
using IBC Fees. ([#2196])
20+
- cosmwasm-vm: Add `Config` that allows to configure the limits for static Wasm
21+
validation. ([#2220])
22+
- cosmwasm-check: Add `--wasm-limits` flag to supply configured limits for
23+
static validation. ([#2220])
24+
- cosmwasm-std: Add `migrate_with_info` call implementation for the extended
25+
`migrate` entrypoint function ([#2212])
26+
- cosmwasm-vm: Export a new `migrate_with_info` function ([#2212])
27+
- cosmwasm-derive: Add support for migrate method with
28+
`migrate_info: MigrateInfo` argument. ([#2212])
2029

2130
[#2118]: https://github.com/CosmWasm/cosmwasm/pull/2118
2231
[#2196]: https://github.com/CosmWasm/cosmwasm/pull/2196
32+
[#2220]: https://github.com/CosmWasm/cosmwasm/pull/2220
33+
[#2212]: https://github.com/CosmWasm/cosmwasm/pull/2212
2334

2435
### Changed
2536

@@ -35,9 +46,27 @@ and this project adheres to
3546
- cosmwasm-vm: Let `mock_env` return a contract address that is valid bech32 and
3647
uses the same bech32 prefix as `MockApi`; Change `MOCK_CONTRACT_ADDR` value to
3748
match the contract address from `mock_env`. ([#2211])
49+
- cosmwasm-derive: Automatically detect whether the package is a dependency or
50+
the primary package, only expanding entrypoints for the primary package. This
51+
effectively deprecates the usage of the `library` feature pattern. ([#2246])
52+
- cosmwasm-std: Deprecate `BankQuery::AllBalances` and `IbcQuery::ListChannels`.
53+
Both are inherently problematic to use because the returned entries are
54+
unbounded. ([#2247])
55+
- cosmwasm-vm: Upgrade Wasmer to 4.3.7; Bump `MODULE_SERIALIZATION_VERSION` to
56+
"v20". ([#2255])
57+
- cosmwasm-vm: Effectively remove the `cranelift` feature. It still exists but
58+
is only a no-op for semver compatibility. It will now unconditionally use the
59+
singlepass compiler. ([#2260])
60+
- cosmwasm-vm: Automatically derive cache version from function hashes and the
61+
Wasmer version ([#2250])
3862

3963
[#2118]: https://github.com/CosmWasm/cosmwasm/pull/2118
4064
[#2211]: https://github.com/CosmWasm/cosmwasm/issues/2211
65+
[#2246]: https://github.com/CosmWasm/cosmwasm/pull/2246
66+
[#2247]: https://github.com/CosmWasm/cosmwasm/pull/2247
67+
[#2255]: https://github.com/CosmWasm/cosmwasm/pull/2255
68+
[#2260]: https://github.com/CosmWasm/cosmwasm/pull/2260
69+
[#2250]: https://github.com/CosmWasm/cosmwasm/pull/2250
4170

4271
## [2.1.3] - 2024-08-08
4372

@@ -753,7 +782,7 @@ and this project adheres to
753782
- all: Bump a few dependency versions to make the codebase compile with
754783
`-Zminimal-versions` ([#1465]).
755784
- cosmwasm-profiler: Package was removed 🪦. It served its job showing us that
756-
we cannot properly measure different runtimes for differet Wasm opcodes.
785+
we cannot properly measure different runtimes for different Wasm opcodes.
757786
- cosmwasm-schema: schema generation is now locked to produce strictly
758787
`draft-07` schemas
759788
- cosmwasm-schema: `QueryResponses` derive now sets the `JsonSchema` trait bound

0 commit comments

Comments
 (0)