Skip to content

Commit

Permalink
feat: merge original version 0.16.3 (#148)
Browse files Browse the repository at this point in the history
* typo

* Typo in IBC.md

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Make mock_ibc_{channel, packet} private

* Change new release version to 0.16

* Add custom events to IBC response types

* Add the cosmwasm-* version changes to MIGRATING.md

* Update IBC contracts

* Test the new events field in IBC response types

* attr construction should panic for reserved names

* type in packages/std/src/results/attribute.rs

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Collect Attribute and Event in events.rs

* cargo update

* Update to latest k256 v0.9.4

* Update Cargo.lock

* Fix deprecation warning in benches

* Update contract lock files

* Move counterparty_version to IbcChannelOpenMsg

* Diff between the 6 different IBC entry points

* Update contracts

* Fix clippy +1.53.0 warnings

* Add changelog entry for to_hex() change

* style

* Update vm test contracts

* Update docs re IBC channel entrypoint changes

* Update docs

* Set version: 0.16.0-rc1

* Update NOTICE file

* Export GovMsg

* Make IBC Msg types serialize as snake case

* CHANGELOG update

* Set version: 0.15.1

* Set version: 0.16.0-rc2

* Export VoteOption

* Run format on std

* Builder-esque pattern for Response

* Revert "Builder-esque pattern for Response" (oops)

This reverts commit 8202901.

* CHANGELOG update

* Set version: 0.15.2

* CHANGELOG update - 0.15.2

* Fix CHANGELOG

* Set version: 0.16.0-rc3

* Use _contract_address rather than contract_address

* Rebuild vm test contracts

* Update event attributes for test (_contract_address)

* Fix compiler errors

* Add mock_wasmd_attr helper

* cosmwasm-std: Rename IbcAcknowledgementWithPacket -> IbcPacketAckMsg

* Update ibc-reflect-send contract

* Update test contract for vm

* Update CHANGELOG and MIGRATING

* Fixed integration tests

* Set version: 0.16.0-rc4

* Response: builder pattern instead of literals

* Handy traits for Attribute

* Make Response::add_attribute more flexible

* cargo fmt

* Add bulk setters for Response

* Update contracts

* Docs update

* Switch back to `add_attribute` accepting 2 params

* Improve docs

* style

* Apply the new "builder" pattern to IBC responses

* Make `Event` non_exhaustive

* CHANGELOG update

* Make IBC Msgs non_exhaustive

* Mark IbcAcknowledgement non_exhaustive

* Mark IbcChannel and IbcPacket as non_exhaustive

* Make `mock_ibc_channel` public again

* CHANGELOG update

* Update MIGRATING

* Add constructors for IbcChannel and IbcPacket

* Refactor event construction test

* Set version: 0.16.0-rc5

* fix a typo

* execute cargo schema in some contracts

* Make sure all features are enabled for docs.rs

* Improve events documentation

* Fix broken docs link

* Disable `backtraces` feature in docs builds

* update schemas

* Fully removed all generic implementations of Into<String>, and some others

* Resolve merge conflict

* Remove merge conflict #2 im rlly stupid

* Got all of them (I think)

* Fixed links to other CosmWasm projects

* Improved the "Creating a Smart Contract" section

* Update Wasm entry points

* Update Rust entry points

* Added `into_string` function to `Addr`

* Removed the final ones

* Removed all of them!!!!

* Fixed formatting

* Fixed the return type things... idk why they aren't working

* Format

* Thanks for the tip, forgot abt cargo fmt :)

* Document Minimum Supported Rust Version (MSRV)

* Turn bullet points into real sentences

* Implement exported_function_names for both Wasmer and parity

* Use exported_function_names in required_features_from_module

* Inline required_features_from_wasmer_instance

* Change Instance::required_features

* Add required_features field to AnalysisReport

* Pull out check_interface_version check

* Remove too old test contract

* Update compatibility table for CosmWasm 0.16

* Pull out INTERFACE_VERSION_PREFIX and SUPPORTED_INTERFACE_VERSION

* Remove misleading hint from error message

* Switch to loupe to estimate the module size in bytes

* Add loupe to module_size reporting

* Add clarifying comment

* Fix clippy warning

* Move module_size out of fs_cache

* Add test check_interface_version_works

* Avoid unnecessary vector when working with iterator

* Set version: 0.16.0-rc6

* Set version: 0.16.0

* Add `From` conversions for `Cow<Addr>`

* Parse contract address from instantiate event, not message event

* Fix linting error

* Rebuild ibc-reflect test contract

* fix a test for std with backtraces

* execute cargo fmt

* Run multiple clippy jobs in CI

* Use config version 2.1

* Fix needless borrow warnings

* Don't pass too long input to VM in addr_validate/addr_canonicalize

* Implement Isqrt for Uint128

* Implement Isqrt for Uint64

* Implement Uint256

* Expose Uint128::full_mul with a Uint256 result

* Add a big number test for Uint256::isqrt()

* Fix Uint256::try_from(&str) to expect dec values

* More idiomatic names for Uint256 constructors

* Simplify Uint256::Shr implementations

* Test endianness of Uint256

* Fix uint256 shr tests

* Export ConversionOverflowError

* Docs and CHANGELOG

* Implement Uint256::checked_shr

* Format .md files

* Expose Uint64::full_mul

* Implement Uint512

* Implement Uint256::full_mul

* Set version: 0.16.1

* CHANGELOG update

* Test Uint{128,256,64}::multiply_ratio with large inputs

* Implement `Decimal::from_ratio` using full multiplication

* Make Decimal hold a Uint128 internally

* Fix clippy

* style (suggestions from code review)

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Code comments

* Update CHANGELOG

* CHANGELOG update

* style fixes for Uint*

* Update CHANGELOG

* Update dependency k256 to ^0.9.6

* Use rust-optimizer 0.12.1

* Add a test for Uint* Display padding

* Fix the padding bug for Uint256 and Uint512

* Add CHANGELOG entry for OverflowOperation::Shr

* Remove extra ` from CHANGELOG

* Add Shl implementation

* Make Uint256::from_le_bytes const

* Make Uint256::from_be_bytes const

* Make Uint256::new const

* Improve Uint256::new docs

* Make FunctionDeterministic private

* Implement FunctionDeterministic::default()

* Replace Deterministic::new with ::default

* Add configurations to FunctionDeterministic

* Pull out MIDDLEWARE_NAME

* Make error message specific to floats

* Rename Deterministic -> Gatekeeper

* Add note on Gatekeeper

* Pull out GatekeeperConfig

* Rename allow_float -> allow_floats

* Implement Decimal256

* Fix some Decimal256 bugs

* Fix Decimal256 tests

* Update Decimal256 comments

* clippy

* CHANGELOG update

* Add a comment about Decimal*::sqrt algorithm

* Define DECIMAL_PLACES as a const in Decimal*

* Decimal256: 18 decimal places + const fns

* Decimal256: DECIMAL_FRACTIONAL* are now constants

* Update CHANGELOG

* Apply suggestions from code review

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Fix CHANGELOG

* Set version: 0.16.2

* CHANGELOG - new release

* fix: update voting-with-uuid

* fix: update rust version for git workflow

* chore: update reflect contract schema

* chore: formating

* chore: cargo clippy

* fix: fix crypt bench

* fix: update github workflow's rust optimizer

* feat: pin dependent uint version 0.9.1

uint version 0.9.2 or lator uses the feature of edition2021.
This cannot be used from wasmvm now.

Co-authored-by: Tomasz Kurcz <uint@lavabit.com>
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
Co-authored-by: Simon Warta <simon@warta.it>
Co-authored-by: Mauro Lacy <mauro@lacy.com.es>
Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
Co-authored-by: Giancarlos Salas <giansalex@gmail.com>
Co-authored-by: lukerhoads <pumpkineater661@gmail.com>
Co-authored-by: Bartłomiej Kuras <bart.k@confio.gmbh>
  • Loading branch information
9 people authored Feb 24, 2022
1 parent 63aabb5 commit 203d683
Show file tree
Hide file tree
Showing 168 changed files with 16,179 additions and 4,992 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.50.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-benchmarking-rust:1.50.0-{{ checksum "Cargo.lock" }}
key: cargocache-v2-benchmarking-rust:1.57.0-{{ checksum "Cargo.lock" }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Run vm benchmarks (Singlepass)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types: [closed]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -20,10 +20,10 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
override: true
- name: Get version
id: get_version
run: |
Expand All @@ -37,7 +37,6 @@ jobs:
with:
version: ${{ steps.get_version.outputs.version }}
git_tag_prefix: v

- name: Create new tag
run: |
if [ -z "${{ steps.get_version.outputs.version }}" ]; then
Expand All @@ -57,12 +56,12 @@ jobs:
- name: Build development contracts
run: |
echo "Building all contracts under ./contracts"
docker run --volumes-from with_code cosmwasm/rust-optimizer:0.11.0 ./contracts/*/
docker run --volumes-from with_code cosmwasm/rust-optimizer:0.12.1 ./contracts/*/
- name: Check development contracts
working-directory: ./
run: |
echo "Checking all contracts under ./artifacts"
docker run --volumes-from with_code rust:1.51.0 /bin/bash -e -c 'cd ./code/packages/vm; ./examples/check_contract.sh ../../artifacts/*.wasm'
docker run --volumes-from with_code rust:1.54.0 /bin/bash -e -c 'cd ./code/packages/vm; ./examples/check_contract.sh ../../artifacts/*.wasm'
docker cp with_code:/code/artifacts .
- name: Create Release
Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-package_crypto-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-package_crypto-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Build
Expand All @@ -48,15 +48,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-package_schema-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-package_schema-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Build
Expand All @@ -77,15 +77,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-package_std-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-package_std-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -130,15 +130,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-package_storage-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-package_storage-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Build library for native target
Expand All @@ -162,15 +162,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-package_vm-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-package_vm-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Build
Expand All @@ -197,15 +197,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-contract_burner-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-contract_burner-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -243,15 +243,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-contract_crypto_verify-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-contract_crypto_verify-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -289,15 +289,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-hackatom_verify-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-hackatom_verify-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -335,15 +335,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-contract_ibc_reflect-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-contract_ibc_reflect-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -381,15 +381,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-contract_ibc_reflect_send-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-contract_ibc_reflect_send-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -427,15 +427,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-contract_queue-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-contract_queue-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -473,15 +473,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-contract_reflect-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-contract_reflect-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -519,15 +519,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-contract_staking-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-contract_staking-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
Expand Down Expand Up @@ -565,15 +565,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-fmt-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-fmt-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add rustfmt component
Expand Down Expand Up @@ -611,15 +611,15 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
toolchain: 1.57.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v2
with:
path: ~/.cargo
key: cargocache-v2-clippy-rust:1.51.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-clippy-rust:1.57.0-${{ hashFiles('Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add clippy component
Expand Down
1 change: 1 addition & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pull_request_rules:
- "status-success=ci/circleci: contract_hackatom"
- "status-success=ci/circleci: contract_ibc_reflect"
- "status-success=ci/circleci: contract_ibc_reflect_send"
- "status-success=ci/circleci: contract_floaty"
- "status-success=ci/circleci: contract_queue"
- "status-success=ci/circleci: contract_reflect"
- "status-success=ci/circleci: contract_staking"
Expand Down
9 changes: 8 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"proseWrap": "always"
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "always"
}
}
]
}
Loading

0 comments on commit 203d683

Please sign in to comment.