diff --git a/cosmwasm/Cargo.lock b/cosmwasm/Cargo.lock index 421e0b6815..b1a9bbeb98 100644 --- a/cosmwasm/Cargo.lock +++ b/cosmwasm/Cargo.lock @@ -396,9 +396,9 @@ dependencies = [ [[package]] name = "parity-wasm" -version = "0.41.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking_lot" diff --git a/cosmwasm/contracts/v010/compute-tests/test-compute-contract/rust-toolchain b/cosmwasm/contracts/v010/compute-tests/test-compute-contract/rust-toolchain index 48ece897af..650b514e63 100644 --- a/cosmwasm/contracts/v010/compute-tests/test-compute-contract/rust-toolchain +++ b/cosmwasm/contracts/v010/compute-tests/test-compute-contract/rust-toolchain @@ -1 +1 @@ -1.69 \ No newline at end of file +1.71 \ No newline at end of file diff --git a/cosmwasm/contracts/v1/compute-tests/random-test/rust-toolchain b/cosmwasm/contracts/v1/compute-tests/random-test/rust-toolchain index 48ece897af..650b514e63 100644 --- a/cosmwasm/contracts/v1/compute-tests/random-test/rust-toolchain +++ b/cosmwasm/contracts/v1/compute-tests/random-test/rust-toolchain @@ -1 +1 @@ -1.69 \ No newline at end of file +1.71 \ No newline at end of file diff --git a/cosmwasm/contracts/v1/compute-tests/test-compute-contract-v2/rust-toolchain b/cosmwasm/contracts/v1/compute-tests/test-compute-contract-v2/rust-toolchain index 48ece897af..650b514e63 100644 --- a/cosmwasm/contracts/v1/compute-tests/test-compute-contract-v2/rust-toolchain +++ b/cosmwasm/contracts/v1/compute-tests/test-compute-contract-v2/rust-toolchain @@ -1 +1 @@ -1.69 \ No newline at end of file +1.71 \ No newline at end of file diff --git a/cosmwasm/contracts/v1/compute-tests/test-compute-contract/rust-toolchain b/cosmwasm/contracts/v1/compute-tests/test-compute-contract/rust-toolchain index 48ece897af..650b514e63 100644 --- a/cosmwasm/contracts/v1/compute-tests/test-compute-contract/rust-toolchain +++ b/cosmwasm/contracts/v1/compute-tests/test-compute-contract/rust-toolchain @@ -1 +1 @@ -1.69 \ No newline at end of file +1.71 \ No newline at end of file diff --git a/cosmwasm/enclaves/Cargo.lock b/cosmwasm/enclaves/Cargo.lock index 2862ff0e32..5aad4ef6c0 100644 --- a/cosmwasm/enclaves/Cargo.lock +++ b/cosmwasm/enclaves/Cargo.lock @@ -640,7 +640,7 @@ dependencies = [ "lazy_static", "log", "lru", - "parity-wasm", + "parity-wasm 0.45.0", "protobuf", "pwasm-utils", "rand_chacha", @@ -1154,6 +1154,12 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + [[package]] name = "paste" version = "1.0.11" @@ -1292,7 +1298,7 @@ checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" dependencies = [ "byteorder", "log", - "parity-wasm", + "parity-wasm 0.41.0", ] [[package]] @@ -1491,7 +1497,7 @@ dependencies = [ "lazy_static", "log", "num-bigint", - "parity-wasm", + "parity-wasm 0.45.0", "pwasm-utils", "rustls", "serde 1.0.118", @@ -2091,7 +2097,7 @@ dependencies = [ "memory_units", "num-rational", "num-traits 0.2.15", - "parity-wasm", + "parity-wasm 0.41.0", "wasmi-validation", ] @@ -2100,7 +2106,7 @@ name = "wasmi-validation" version = "0.3.0" source = "git+https://github.com/paritytech/wasmi?rev=84d2764594d80425373bf4949a58fa3df3d624c3#84d2764594d80425373bf4949a58fa3df3d624c3" dependencies = [ - "parity-wasm", + "parity-wasm 0.41.0", ] [[package]] diff --git a/cosmwasm/enclaves/execute/Cargo.toml b/cosmwasm/enclaves/execute/Cargo.toml index d128965650..5bbca306ea 100644 --- a/cosmwasm/enclaves/execute/Cargo.toml +++ b/cosmwasm/enclaves/execute/Cargo.toml @@ -69,7 +69,9 @@ serde_json = { git = "https://github.com/mesalock-linux/serde-json-sgx" } ctor = "0.1.13" derive_more = "0.99" pwasm-utils = { version = "0.12.0", default-features = false } -parity-wasm = { version = "0.41.0", default-features = false } +parity-wasm = { version = "0.45.0", default-features = false, features = [ + "sign_ext" +] } base64 = { rev = "dc7389e10817b078f289386b3b6a852ab6c4c021", git = "https://github.com/mesalock-linux/rust-base64-sgx" } # for attestation chrono = { git = "https://github.com/mesalock-linux/chrono-sgx" } diff --git a/cosmwasm/enclaves/shared/contract-engine/Cargo.toml b/cosmwasm/enclaves/shared/contract-engine/Cargo.toml index 075bf2c721..4019667f63 100644 --- a/cosmwasm/enclaves/shared/contract-engine/Cargo.toml +++ b/cosmwasm/enclaves/shared/contract-engine/Cargo.toml @@ -49,7 +49,9 @@ derive_more = "0.99" sha2 = "0.8.1" bech32 = "0.7.2" pwasm-utils = { version = "0.12.0", default-features = false, optional = true } -parity-wasm = { version = "0.41.0", default-features = false, optional = true } +parity-wasm = { version = "0.45.0", default-features = false, optional = true, features = [ + "sign_ext" +] } wasm3 = { git = "https://github.com/scrtlabs/wasm3-rs", rev = "ad1c868" } walrus = { version = "0.19.0", git = "https://github.com/scrtlabs/walrus", rev = "c5777d4" } lru = { version = "0.7", default-features = false } diff --git a/cosmwasm/enclaves/test/Cargo.lock b/cosmwasm/enclaves/test/Cargo.lock index 43e47a625f..568a7c4af4 100644 --- a/cosmwasm/enclaves/test/Cargo.lock +++ b/cosmwasm/enclaves/test/Cargo.lock @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "parity-wasm" -version = "0.41.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking_lot" @@ -451,9 +451,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.180" +version = "1.0.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "bdb30a74471f5b7a1fa299f40b4bf1be93af61116df95465b2b5fc419331e430" dependencies = [ "serde_derive", ] @@ -469,9 +469,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "6f4c2c6ea4bc09b5c419012eafcdb0fcef1d9119d626c8f3a0708a5b92d38a70" dependencies = [ "proc-macro2", "quote", diff --git a/cosmwasm/packages/sgx-vm/Cargo.toml b/cosmwasm/packages/sgx-vm/Cargo.toml index 23a4a13044..0a074b7865 100644 --- a/cosmwasm/packages/sgx-vm/Cargo.toml +++ b/cosmwasm/packages/sgx-vm/Cargo.toml @@ -53,7 +53,7 @@ snafu = { version = "0.6.3" } sha2 = "0.10.7" hex = "0.4" memmap = "0.7" -parity-wasm = "0.41" +parity-wasm = { version = "0.45", features = ["sign_ext"] } # requirements specific to Secret Network lazy_static = "1.4" enclave-ffi-types = { path = "../../enclaves/ffi-types", features = [ diff --git a/deployment/dockerfiles/base-images/secret-contract-optimizer.Dockerfile b/deployment/dockerfiles/base-images/secret-contract-optimizer.Dockerfile index 343db9ea38..96af523df6 100644 --- a/deployment/dockerfiles/base-images/secret-contract-optimizer.Dockerfile +++ b/deployment/dockerfiles/base-images/secret-contract-optimizer.Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.69.0-slim-bullseye +FROM rust:1.71.0-slim-bullseye RUN rustup target add wasm32-unknown-unknown RUN apt update && apt install -y binaryen clang && rm -rf /var/lib/apt/lists/* diff --git a/go-cosmwasm/Cargo.lock b/go-cosmwasm/Cargo.lock index 70d9fcd7dd..99baca5065 100644 --- a/go-cosmwasm/Cargo.lock +++ b/go-cosmwasm/Cargo.lock @@ -408,9 +408,9 @@ checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "parity-wasm" -version = "0.41.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking_lot" @@ -582,9 +582,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.180" +version = "1.0.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "bdb30a74471f5b7a1fa299f40b4bf1be93af61116df95465b2b5fc419331e430" dependencies = [ "serde_derive", ] @@ -600,9 +600,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "6f4c2c6ea4bc09b5c419012eafcdb0fcef1d9119d626c8f3a0708a5b92d38a70" dependencies = [ "proc-macro2", "quote", diff --git a/scripts/install-wasm-tools.sh b/scripts/install-wasm-tools.sh index 75d9dcf6d2..c83f5361e6 100755 --- a/scripts/install-wasm-tools.sh +++ b/scripts/install-wasm-tools.sh @@ -81,34 +81,24 @@ cargo install pwasm-utils-cli --bin wasm-prune --force if [[ "$OSTYPE" == "linux-gnu" ]]; then set -e - BUILD_NUM=`curl -s https://storage.googleapis.com/wasm-llvm/builds/linux/lkgr.json | jq -r '.build'` - if [ -z ${BUILD_NUM+x} ]; then - echo "Could not fetch the latest build number."; - exit 1; - fi - tmp=`mktemp -d` pushd $tmp > /dev/null - echo "Downloading wasm-binaries.tbz2"; - curl -L -o wasm-binaries.tbz2 https://storage.googleapis.com/wasm-llvm/builds/linux/$BUILD_NUM/wasm-binaries.tbz2 + + echo "Downloading wabt-1.0.33-ubuntu.tar.gz"; + wget https://github.com/WebAssembly/wabt/releases/download/1.0.33/wabt-1.0.33-ubuntu.tar.gz - declare -a binaries=("wasm2wat" "wat2wasm") # Default binaries - if [ "$#" -ne 0 ]; then - echo "Installing selected binaries."; - binaries=("$@"); - else - echo "Installing default binaries."; - fi + tar --strip-components=2 -xf wabt-1.0.33-ubuntu.tar.gz wabt-1.0.33/bin/wasm2wat wabt-1.0.33/bin/wat2wasm + + echo "Installing wasm2wat & wat2wasm into ~/.cargo/bin" + cp -f wasm2wat ~/.cargo/bin/ + cp -f wat2wasm ~/.cargo/bin/ - for bin in "${binaries[@]}" - do - echo "Installing $bin into ~/.cargo/bin" - tar -xvjf wasm-binaries.tbz2 wasm-install/bin/$bin > /dev/null - cp -f wasm-install/bin/$bin ~/.cargo/bin/ - done popd > /dev/null fi echo "" echo "Run source ~/.cargo/env now to update environment." echo "" + +source ~/.cargo/env +wasm2wat --version diff --git a/x/compute/internal/keeper/testdata/contract.wasm b/x/compute/internal/keeper/testdata/contract.wasm index 9df3c2fde0..a32511b683 100755 Binary files a/x/compute/internal/keeper/testdata/contract.wasm and b/x/compute/internal/keeper/testdata/contract.wasm differ diff --git a/x/compute/internal/keeper/testdata/contract_with_floats.wasm b/x/compute/internal/keeper/testdata/contract_with_floats.wasm index 7b7bfcd0fe..de9dad8471 100755 Binary files a/x/compute/internal/keeper/testdata/contract_with_floats.wasm and b/x/compute/internal/keeper/testdata/contract_with_floats.wasm differ diff --git a/x/compute/internal/keeper/testdata/static-too-high-initial-memory.wasm b/x/compute/internal/keeper/testdata/static-too-high-initial-memory.wasm index 8dc84a5c52..16a1b0c577 100644 Binary files a/x/compute/internal/keeper/testdata/static-too-high-initial-memory.wasm and b/x/compute/internal/keeper/testdata/static-too-high-initial-memory.wasm differ diff --git a/x/compute/internal/keeper/testdata/too-high-initial-memory.wasm b/x/compute/internal/keeper/testdata/too-high-initial-memory.wasm index c317eaf58f..3329559dd1 100644 Binary files a/x/compute/internal/keeper/testdata/too-high-initial-memory.wasm and b/x/compute/internal/keeper/testdata/too-high-initial-memory.wasm differ diff --git a/x/compute/internal/keeper/testdata/v1-contract-v2.wasm b/x/compute/internal/keeper/testdata/v1-contract-v2.wasm index b2ac2b9d66..e75fac50e5 100755 Binary files a/x/compute/internal/keeper/testdata/v1-contract-v2.wasm and b/x/compute/internal/keeper/testdata/v1-contract-v2.wasm differ diff --git a/x/compute/internal/keeper/testdata/v1-contract.wasm b/x/compute/internal/keeper/testdata/v1-contract.wasm index f49f874b0f..39eac401bc 100755 Binary files a/x/compute/internal/keeper/testdata/v1-contract.wasm and b/x/compute/internal/keeper/testdata/v1-contract.wasm differ diff --git a/x/compute/internal/keeper/testdata/v1_random_test.wasm b/x/compute/internal/keeper/testdata/v1_random_test.wasm index b606b23fd0..382a9b48d2 100755 Binary files a/x/compute/internal/keeper/testdata/v1_random_test.wasm and b/x/compute/internal/keeper/testdata/v1_random_test.wasm differ