From 9b1125872278e943e800cd3812c0a08e8d84ccad Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 5 Sep 2023 00:20:40 +0200 Subject: [PATCH 01/13] Require cosmwasm-vm and cosmwasm-std to match cosmwasm-check version --- CHANGELOG.md | 12 ++++++++++++ packages/check/Cargo.toml | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4123a67dd..1011c1a908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ and this project adheres to ## [Unreleased] +### Changed + +- cosmwasm-check: Use "=" for pinning the versions of cosmwasm-vm and + cosmwasm-std dependencies. This ensures that you can use an older version of + cosmwasm-check together with the VM of the same version by doing + `cargo install cosmwasm-check@1.4.1`. A typical use case would be to check a + contract with CosmWasm 1.4, 1.5 and 2.0. Note that other dependencies are + still upgraded when using `cargo install` which may lead to API, behavioural + or compiler incompatibilities. The + [--locked](https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile) + feature allows you use the versions locked when the release was created. + ## [1.4.0] - 2023-09-04 ### Added diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index eb12f16401..507eceb8cb 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -11,8 +11,8 @@ license = "Apache-2.0" anyhow = "1.0.57" clap = "4" colored = "2" -cosmwasm-vm = { path = "../vm", version = "1.4.0" } -cosmwasm-std = { path = "../std", version = "1.4.0" } +cosmwasm-vm = { path = "../vm", version = "=1.4.0" } +cosmwasm-std = { path = "../std", version = "=1.4.0" } [dev-dependencies] assert_cmd = "=2.0.10" # 2.0.11+ requires Rust 1.65.0 which we currently don't want to make the minimum if possible From 3579e839e6e0c9cee6fa9119dbbd38ed5ea4d1bc Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 5 Oct 2023 17:28:32 +0300 Subject: [PATCH 02/13] Fix test comments init -> instantiate --- packages/vm/src/cache.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index 7d853affa0..5a1546065a 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -854,7 +854,7 @@ mod tests { assert_eq!(cache.stats().hits_fs_cache, 1); assert_eq!(cache.stats().misses, 0); - // init + // instantiate let info = mock_info("creator", &coins(1000, "earth")); let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; let res = @@ -873,7 +873,7 @@ mod tests { assert_eq!(cache.stats().hits_fs_cache, 1); assert_eq!(cache.stats().misses, 0); - // init + // instantiate let info = mock_info("creator", &coins(1000, "earth")); let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; let res = @@ -894,7 +894,7 @@ mod tests { assert_eq!(cache.stats().hits_fs_cache, 2); assert_eq!(cache.stats().misses, 0); - // init + // instantiate let info = mock_info("creator", &coins(1000, "earth")); let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; let res = @@ -919,7 +919,7 @@ mod tests { assert_eq!(cache.stats().hits_fs_cache, 1); assert_eq!(cache.stats().misses, 0); - // init + // instantiate let info = mock_info("creator", &coins(1000, "earth")); let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; let response = @@ -947,7 +947,7 @@ mod tests { assert_eq!(cache.stats().hits_fs_cache, 1); assert_eq!(cache.stats().misses, 0); - // init + // instantiate let info = mock_info("creator", &coins(1000, "earth")); let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; let response = @@ -977,7 +977,7 @@ mod tests { assert_eq!(cache.stats().hits_fs_cache, 2); assert_eq!(cache.stats().misses, 0); - // init + // instantiate let info = mock_info("creator", &coins(1000, "earth")); let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; let response = @@ -1005,7 +1005,7 @@ mod tests { let backend1 = mock_backend(&[]); let backend2 = mock_backend(&[]); - // init instance 1 + // instantiate instance 1 let mut instance = cache .get_instance(&checksum, backend1, TESTING_OPTIONS) .unwrap(); @@ -1017,7 +1017,7 @@ mod tests { assert_eq!(msgs.len(), 0); let backend1 = instance.recycle().unwrap(); - // init instance 2 + // instantiate instance 2 let mut instance = cache .get_instance(&checksum, backend2, TESTING_OPTIONS) .unwrap(); From a440660a9b915bdf56d729afa2f58cfc3177bfaa Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 5 Oct 2023 16:54:14 +0300 Subject: [PATCH 03/13] Add test reproducing the issue --- packages/vm/src/cache.rs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index 5a1546065a..070b624cf3 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -996,6 +996,42 @@ mod tests { } } + #[test] + fn call_execute_on_recompiled_contract() { + let options = make_testing_options(); + let cache = unsafe { Cache::new(options.clone()).unwrap() }; + let checksum = cache.save_wasm(CONTRACT).unwrap(); + + // Remove compiled module from disk + remove_dir_all(options.base_dir.join(CACHE_DIR).join(MODULES_DIR)).unwrap(); + + // Recompiles the Wasm (miss on all caches) + let backend = mock_backend(&[]); + let mut instance = cache + .get_instance(&checksum, backend, TESTING_OPTIONS) + .unwrap(); + assert_eq!(cache.stats().hits_pinned_memory_cache, 0); + assert_eq!(cache.stats().hits_memory_cache, 0); + assert_eq!(cache.stats().hits_fs_cache, 0); + assert_eq!(cache.stats().misses, 1); + + // instantiate + let info = mock_info("creator", &coins(1000, "earth")); + let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; + let response = call_instantiate::<_, _, _, Empty>(&mut instance, &mock_env(), &info, msg) + .unwrap() + .unwrap(); + assert_eq!(response.messages.len(), 0); + + // execute + let info = mock_info("verifies", &coins(15, "earth")); + let msg = br#"{"release":{}}"#; + let response = call_execute::<_, _, _, Empty>(&mut instance, &mock_env(), &info, msg) + .unwrap() + .unwrap(); + assert_eq!(response.messages.len(), 1); + } + #[test] fn use_multiple_cached_instances_of_same_contract() { let cache = unsafe { Cache::new(make_testing_options()).unwrap() }; From d9e05924d660a4914c29e707299865603563e7d2 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 5 Oct 2023 16:57:34 +0300 Subject: [PATCH 04/13] Fix misuse of Module Before this fix, the compiling engine was attached to the Module instance (indirectly via the artifact). However, the Store used was created from a different engine. --- packages/vm/src/cache.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index 070b624cf3..dd62d96c3a 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -377,11 +377,22 @@ where // stored the old module format. let wasm = self.load_wasm_with_path(&cache.wasm_path, checksum)?; cache.stats.misses = cache.stats.misses.saturating_add(1); - // Module will run with a different engine, so we can set memory limit to None - let engine = make_compiling_engine(None); - let module = compile(&engine, &wasm)?; - let module_size = cache.fs_cache.store(checksum, &module)?; + { + // Module will run with a different engine, so we can set memory limit to None + let compiling_engine = make_compiling_engine(None); + // Note that module cannot be used directly as it was not created with the + // runtime engine. + let module = compile(&compiling_engine, &wasm)?; + cache.fs_cache.store(checksum, &module)?; + } + // This time we'll hit the file-system cache. + let Some((module, module_size)) = cache.fs_cache.load(checksum, &cache.runtime_engine)? + else { + return Err(VmError::generic_err( + "Can't load module from file system cache after storing it to file system cache", + )); + }; cache .memory_cache .store(checksum, module.clone(), module_size)?; From 949d82b267b220d9e9626f52a78aef359488c98d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 6 Oct 2023 11:57:46 +0300 Subject: [PATCH 05/13] Pull out test_hackatom_instance_execution --- packages/vm/src/cache.rs | 41 ++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index dd62d96c3a..d04c88d854 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -543,6 +543,30 @@ mod tests { } } + /// Takes an instance and executes it + fn test_hackatom_instance_execution(instance: &mut Instance) + where + A: BackendApi + 'static, + S: Storage + 'static, + Q: Querier + 'static, + { + // instantiate + let info = mock_info("creator", &coins(1000, "earth")); + let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; + let response = call_instantiate::<_, _, _, Empty>(instance, &mock_env(), &info, msg) + .unwrap() + .unwrap(); + assert_eq!(response.messages.len(), 0); + + // execute + let info = mock_info("verifies", &coins(15, "earth")); + let msg = br#"{"release":{}}"#; + let response = call_execute::<_, _, _, Empty>(instance, &mock_env(), &info, msg) + .unwrap() + .unwrap(); + assert_eq!(response.messages.len(), 1); + } + #[test] fn new_base_dir_will_be_created() { let my_base_dir = TempDir::new() @@ -1025,22 +1049,7 @@ mod tests { assert_eq!(cache.stats().hits_memory_cache, 0); assert_eq!(cache.stats().hits_fs_cache, 0); assert_eq!(cache.stats().misses, 1); - - // instantiate - let info = mock_info("creator", &coins(1000, "earth")); - let msg = br#"{"verifier": "verifies", "beneficiary": "benefits"}"#; - let response = call_instantiate::<_, _, _, Empty>(&mut instance, &mock_env(), &info, msg) - .unwrap() - .unwrap(); - assert_eq!(response.messages.len(), 0); - - // execute - let info = mock_info("verifies", &coins(15, "earth")); - let msg = br#"{"release":{}}"#; - let response = call_execute::<_, _, _, Empty>(&mut instance, &mock_env(), &info, msg) - .unwrap() - .unwrap(); - assert_eq!(response.messages.len(), 1); + test_hackatom_instance_execution(&mut instance); } #[test] From 85201719fb61776389cd2b47fc59e6bfce819025 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 6 Oct 2023 12:01:24 +0300 Subject: [PATCH 06/13] Execute instances in pin_unpin_works test --- packages/vm/src/cache.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index d04c88d854..57ee769c67 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -1286,13 +1286,14 @@ mod tests { // check not pinned let backend = mock_backend(&[]); - let _instance = cache + let mut instance = cache .get_instance(&checksum, backend, TESTING_OPTIONS) .unwrap(); assert_eq!(cache.stats().hits_pinned_memory_cache, 0); assert_eq!(cache.stats().hits_memory_cache, 0); assert_eq!(cache.stats().hits_fs_cache, 1); assert_eq!(cache.stats().misses, 0); + test_hackatom_instance_execution(&mut instance); // first pin hits file system cache cache.pin(&checksum).unwrap(); @@ -1310,26 +1311,28 @@ mod tests { // check pinned let backend = mock_backend(&[]); - let _instance = cache + let mut instance = cache .get_instance(&checksum, backend, TESTING_OPTIONS) .unwrap(); assert_eq!(cache.stats().hits_pinned_memory_cache, 1); assert_eq!(cache.stats().hits_memory_cache, 0); assert_eq!(cache.stats().hits_fs_cache, 2); assert_eq!(cache.stats().misses, 0); + test_hackatom_instance_execution(&mut instance); // unpin cache.unpin(&checksum).unwrap(); // verify unpinned let backend = mock_backend(&[]); - let _instance = cache + let mut instance = cache .get_instance(&checksum, backend, TESTING_OPTIONS) .unwrap(); assert_eq!(cache.stats().hits_pinned_memory_cache, 1); assert_eq!(cache.stats().hits_memory_cache, 1); assert_eq!(cache.stats().hits_fs_cache, 2); assert_eq!(cache.stats().misses, 0); + test_hackatom_instance_execution(&mut instance); // unpin again has no effect cache.unpin(&checksum).unwrap(); From 7c7b93d9c6a401ed36742d9f3da2e03f5adebc75 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 6 Oct 2023 12:03:38 +0300 Subject: [PATCH 07/13] Reproduce bug in pin implementation --- packages/vm/src/cache.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index 57ee769c67..69ac065d19 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -1361,13 +1361,14 @@ mod tests { // After the compilation in pin, the module can be used from pinned memory cache let backend = mock_backend(&[]); - let _ = cache + let mut instance = cache .get_instance(&checksum, backend, TESTING_OPTIONS) .unwrap(); assert_eq!(cache.stats().hits_pinned_memory_cache, 1); assert_eq!(cache.stats().hits_memory_cache, 0); assert_eq!(cache.stats().hits_fs_cache, 0); assert_eq!(cache.stats().misses, 1); + test_hackatom_instance_execution(&mut instance); } #[test] From b76c1e5bcb578da5359caa11b0cf114e0d086aca Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 6 Oct 2023 12:09:38 +0300 Subject: [PATCH 08/13] Annotate compiled module consistenly --- packages/vm/src/cache.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index 69ac065d19..779fdc374f 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -202,6 +202,7 @@ where pub fn save_wasm_unchecked(&self, wasm: &[u8]) -> VmResult { // We need a new engine for each Wasm -> module compilation due to the metering middleware. let compiling_engine = make_compiling_engine(None); + // This module cannot be executed directly as it was not created with the runtime engine let module = compile(&compiling_engine, wasm)?; let mut cache = self.inner.lock().unwrap(); @@ -292,8 +293,9 @@ where let wasm = self.load_wasm_with_path(&cache.wasm_path, checksum)?; cache.stats.misses = cache.stats.misses.saturating_add(1); // Module will run with a different engine, so we can set memory limit to None - let engine = make_compiling_engine(None); - let module = compile(&engine, &wasm)?; + let compiling_engine = make_compiling_engine(None); + // This module cannot be executed directly as it was not created with the runtime engine + let module = compile(&compiling_engine, &wasm)?; // Store into the fs cache too let module_size = cache.fs_cache.store(checksum, &module)?; cache @@ -380,8 +382,7 @@ where { // Module will run with a different engine, so we can set memory limit to None let compiling_engine = make_compiling_engine(None); - // Note that module cannot be used directly as it was not created with the - // runtime engine. + // This module cannot be executed directly as it was not created with the runtime engine let module = compile(&compiling_engine, &wasm)?; cache.fs_cache.store(checksum, &module)?; } From e99425bdbd7f00b856e4841888ded7937f8056f0 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 6 Oct 2023 12:18:23 +0300 Subject: [PATCH 09/13] Fix bug for the pin implementation --- packages/vm/src/cache.rs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/vm/src/cache.rs b/packages/vm/src/cache.rs index 779fdc374f..7bf893bef2 100644 --- a/packages/vm/src/cache.rs +++ b/packages/vm/src/cache.rs @@ -292,12 +292,22 @@ where // Re-compile from original Wasm bytecode let wasm = self.load_wasm_with_path(&cache.wasm_path, checksum)?; cache.stats.misses = cache.stats.misses.saturating_add(1); - // Module will run with a different engine, so we can set memory limit to None - let compiling_engine = make_compiling_engine(None); - // This module cannot be executed directly as it was not created with the runtime engine - let module = compile(&compiling_engine, &wasm)?; - // Store into the fs cache too - let module_size = cache.fs_cache.store(checksum, &module)?; + { + // Module will run with a different engine, so we can set memory limit to None + let compiling_engine = make_compiling_engine(None); + // This module cannot be executed directly as it was not created with the runtime engine + let module = compile(&compiling_engine, &wasm)?; + cache.fs_cache.store(checksum, &module)?; + } + + // This time we'll hit the file-system cache. + let Some((module, module_size)) = cache.fs_cache.load(checksum, &cache.runtime_engine)? + else { + return Err(VmError::generic_err( + "Can't load module from file system cache after storing it to file system cache (pin)", + )); + }; + cache .pinned_memory_cache .store(checksum, module, module_size) @@ -391,7 +401,7 @@ where let Some((module, module_size)) = cache.fs_cache.load(checksum, &cache.runtime_engine)? else { return Err(VmError::generic_err( - "Can't load module from file system cache after storing it to file system cache", + "Can't load module from file system cache after storing it to file system cache (get_module)", )); }; cache From 7774c748e18c5dddf646f99240ba40e5bfcd60d0 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sat, 7 Oct 2023 14:01:46 +0300 Subject: [PATCH 10/13] Add CHANGELOG entry for Wasmer engine regression fix --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1011c1a908..12280bdc57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ and this project adheres to ## [Unreleased] +## Fixed + +- cosmwasm-vm: Fix a 1.3.x -> 1.4.0 regression bug leading to a _Wasmer runtime + error: RuntimeError: out of bounds memory access_ in cases when the Wasm file + is re-compiled and used right away. ([#1907]) + +[#1907]: https://github.com/CosmWasm/cosmwasm/pull/1907 + ### Changed - cosmwasm-check: Use "=" for pinning the versions of cosmwasm-vm and From dc2eca73c53d5ab27c85910f109fd790ee2527fe Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Mon, 9 Oct 2023 09:24:44 +0200 Subject: [PATCH 11/13] Set version: 1.4.1 --- Cargo.lock | 16 ++++++++-------- contracts/burner/Cargo.lock | 12 ++++++------ contracts/crypto-verify/Cargo.lock | 12 ++++++------ contracts/cyberpunk/Cargo.lock | 12 ++++++------ contracts/floaty/Cargo.lock | 12 ++++++------ contracts/hackatom/Cargo.lock | 12 ++++++------ contracts/ibc-reflect-send/Cargo.lock | 12 ++++++------ contracts/ibc-reflect/Cargo.lock | 12 ++++++------ contracts/queue/Cargo.lock | 12 ++++++------ contracts/reflect/Cargo.lock | 12 ++++++------ contracts/staking/Cargo.lock | 12 ++++++------ contracts/virus/Cargo.lock | 12 ++++++------ packages/check/Cargo.toml | 6 +++--- packages/crypto/Cargo.toml | 2 +- packages/derive/Cargo.toml | 2 +- packages/go-gen/Cargo.toml | 4 ++-- packages/schema-derive/Cargo.toml | 2 +- packages/schema/Cargo.toml | 6 +++--- packages/std/Cargo.toml | 6 +++--- packages/storage/Cargo.toml | 4 ++-- packages/vm/Cargo.toml | 6 +++--- 21 files changed, 93 insertions(+), 93 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7468e3988c..fec4e20bcd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -427,7 +427,7 @@ dependencies = [ [[package]] name = "cosmwasm-check" -version = "1.4.0" +version = "1.4.1" dependencies = [ "anyhow", "assert_cmd", @@ -440,7 +440,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "criterion", "digest 0.10.6", @@ -458,7 +458,7 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-std", "syn 1.0.109", @@ -466,7 +466,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "anyhow", "cosmwasm-schema-derive", @@ -481,7 +481,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -490,7 +490,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -513,7 +513,7 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-std", "serde", @@ -521,7 +521,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/burner/Cargo.lock b/contracts/burner/Cargo.lock index 07242e93c8..fccfa120b3 100644 --- a/contracts/burner/Cargo.lock +++ b/contracts/burner/Cargo.lock @@ -193,7 +193,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -204,14 +204,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -222,7 +222,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -231,7 +231,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -249,7 +249,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/crypto-verify/Cargo.lock b/contracts/crypto-verify/Cargo.lock index 57f3c4eb5b..58aadb3fba 100644 --- a/contracts/crypto-verify/Cargo.lock +++ b/contracts/crypto-verify/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/cyberpunk/Cargo.lock b/contracts/cyberpunk/Cargo.lock index 402cce654b..f7ccb63e8f 100644 --- a/contracts/cyberpunk/Cargo.lock +++ b/contracts/cyberpunk/Cargo.lock @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -228,14 +228,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64 0.21.2", "bnum", @@ -273,7 +273,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/floaty/Cargo.lock b/contracts/floaty/Cargo.lock index f0469fa3c6..35f5084311 100644 --- a/contracts/floaty/Cargo.lock +++ b/contracts/floaty/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/hackatom/Cargo.lock b/contracts/hackatom/Cargo.lock index a3523bb6c8..157b4b85d6 100644 --- a/contracts/hackatom/Cargo.lock +++ b/contracts/hackatom/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/ibc-reflect-send/Cargo.lock b/contracts/ibc-reflect-send/Cargo.lock index f41393259d..b070200db9 100644 --- a/contracts/ibc-reflect-send/Cargo.lock +++ b/contracts/ibc-reflect-send/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/ibc-reflect/Cargo.lock b/contracts/ibc-reflect/Cargo.lock index 553ee55464..9d35637259 100644 --- a/contracts/ibc-reflect/Cargo.lock +++ b/contracts/ibc-reflect/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/queue/Cargo.lock b/contracts/queue/Cargo.lock index a4c45020ee..c5ab6b09c5 100644 --- a/contracts/queue/Cargo.lock +++ b/contracts/queue/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/reflect/Cargo.lock b/contracts/reflect/Cargo.lock index 42c8d1a249..3cd127ac90 100644 --- a/contracts/reflect/Cargo.lock +++ b/contracts/reflect/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/staking/Cargo.lock b/contracts/staking/Cargo.lock index 798cd9cfa1..c21de83d3f 100644 --- a/contracts/staking/Cargo.lock +++ b/contracts/staking/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/contracts/virus/Cargo.lock b/contracts/virus/Cargo.lock index bb24cd92a7..10c29655e2 100644 --- a/contracts/virus/Cargo.lock +++ b/contracts/virus/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -193,14 +193,14 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" dependencies = [ "proc-macro2", "quote", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64", "bnum", @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" dependencies = [ "bitflags", "bytecheck", diff --git a/packages/check/Cargo.toml b/packages/check/Cargo.toml index 507eceb8cb..1a4c3c55c0 100644 --- a/packages/check/Cargo.toml +++ b/packages/check/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-check" -version = "1.4.0" +version = "1.4.1" authors = ["Mauro Lacy "] edition = "2021" description = "A CLI tool for verifying CosmWasm smart contracts" @@ -11,8 +11,8 @@ license = "Apache-2.0" anyhow = "1.0.57" clap = "4" colored = "2" -cosmwasm-vm = { path = "../vm", version = "=1.4.0" } -cosmwasm-std = { path = "../std", version = "=1.4.0" } +cosmwasm-vm = { path = "../vm", version = "=1.4.1" } +cosmwasm-std = { path = "../std", version = "=1.4.1" } [dev-dependencies] assert_cmd = "=2.0.10" # 2.0.11+ requires Rust 1.65.0 which we currently don't want to make the minimum if possible diff --git a/packages/crypto/Cargo.toml b/packages/crypto/Cargo.toml index 8bbb5c4e42..517c020c48 100644 --- a/packages/crypto/Cargo.toml +++ b/packages/crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-crypto" -version = "1.4.0" +version = "1.4.1" authors = ["Mauro Lacy "] edition = "2021" description = "Crypto bindings for cosmwasm contracts" diff --git a/packages/derive/Cargo.toml b/packages/derive/Cargo.toml index cc426c01a8..b663b7f53e 100644 --- a/packages/derive/Cargo.toml +++ b/packages/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-derive" -version = "1.4.0" +version = "1.4.1" authors = ["Simon Warta "] edition = "2021" description = "A package for auto-generated code used for CosmWasm contract development. This is shipped as part of cosmwasm-std. Do not use directly." diff --git a/packages/go-gen/Cargo.toml b/packages/go-gen/Cargo.toml index 99693a0c37..5ffc95d9d1 100644 --- a/packages/go-gen/Cargo.toml +++ b/packages/go-gen/Cargo.toml @@ -9,8 +9,8 @@ publish = false [dependencies] schemars = "0.8.3" -cosmwasm-std = { path = "../std", version = "1.4.0", features = ["cosmwasm_1_4", "staking", "stargate", "ibc3"] } -cosmwasm-schema = { path = "../schema", version = "1.4.0" } +cosmwasm-std = { path = "../std", version = "1.4.1", features = ["cosmwasm_1_4", "staking", "stargate", "ibc3"] } +cosmwasm-schema = { path = "../schema", version = "1.4.1" } anyhow = "1" Inflector = "0.11.4" indenter = "0.3.3" diff --git a/packages/schema-derive/Cargo.toml b/packages/schema-derive/Cargo.toml index ba106b1a9c..e4d227cbff 100644 --- a/packages/schema-derive/Cargo.toml +++ b/packages/schema-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema-derive" -version = "1.4.0" +version = "1.4.1" authors = ["Tomasz Kurcz "] edition = "2021" description = "Derive macros for cosmwasm-schema" diff --git a/packages/schema/Cargo.toml b/packages/schema/Cargo.toml index b473ee6a99..163123ec1b 100644 --- a/packages/schema/Cargo.toml +++ b/packages/schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-schema" -version = "1.4.0" +version = "1.4.1" authors = ["Simon Warta ", "Ethan Frey "] edition = "2021" description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files." @@ -8,7 +8,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema" license = "Apache-2.0" [dependencies] -cosmwasm-schema-derive = { version = "=1.4.0", path = "../schema-derive" } +cosmwasm-schema-derive = { version = "=1.4.1", path = "../schema-derive" } schemars = "0.8.3" serde = "1.0" serde_json = "1.0.40" @@ -16,6 +16,6 @@ thiserror = "1.0.26" [dev-dependencies] anyhow = "1.0.57" -cosmwasm-std = { version = "1.4.0", path = "../std" } +cosmwasm-std = { version = "1.4.1", path = "../std" } semver = "1" tempfile = "3" diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 13b12083f3..d95922b704 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-std" -version = "1.4.0" +version = "1.4.1" authors = ["Ethan Frey "] edition = "2021" description = "Standard library for Wasm based smart contracts on Cosmos blockchains" @@ -51,7 +51,7 @@ cosmwasm_1_4 = ["cosmwasm_1_3"] [dependencies] base64 = "0.21.0" -cosmwasm-derive = { path = "../derive", version = "1.4.0" } +cosmwasm-derive = { path = "../derive", version = "1.4.1" } derivative = "2" forward_ref = "1" hex = "0.4" @@ -63,7 +63,7 @@ thiserror = "1.0.26" bnum = "0.8.0" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosmwasm-crypto = { path = "../crypto", version = "1.4.0" } +cosmwasm-crypto = { path = "../crypto", version = "1.4.1" } [dev-dependencies] cosmwasm-schema = { path = "../schema" } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index c32c37a0e5..8719aa6e19 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-storage" -version = "1.4.0" +version = "1.4.1" authors = ["Ethan Frey "] edition = "2021" description = "CosmWasm library with useful helpers for Storage patterns" @@ -16,5 +16,5 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.4.0", default-features = false } +cosmwasm-std = { path = "../std", version = "1.4.1", default-features = false } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] } diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index 51a1bfd459..1bf020bc00 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmwasm-vm" -version = "1.4.0" +version = "1.4.1" authors = ["Ethan Frey "] edition = "2021" description = "VM bindings to run cosmwams contracts" @@ -39,8 +39,8 @@ bytes = "1.4.0" # need a higher version than the one required by Wasmer for the clru = "0.4.0" crc32fast = "1.3.2" # Uses the path when built locally; uses the given version from crates.io when published -cosmwasm-std = { path = "../std", version = "1.4.0", default-features = false } -cosmwasm-crypto = { path = "../crypto", version = "1.4.0" } +cosmwasm-std = { path = "../std", version = "1.4.1", default-features = false } +cosmwasm-crypto = { path = "../crypto", version = "1.4.1" } derivative = "2" hex = "0.4" schemars = "0.8.3" From 3f93174efce688e4517721d536f7819480b6442d Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Mon, 9 Oct 2023 09:29:04 +0200 Subject: [PATCH 12/13] Update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12280bdc57..fbd90b7398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to ## [Unreleased] +## [1.4.1] - 2023-10-09 + ## Fixed - cosmwasm-vm: Fix a 1.3.x -> 1.4.0 regression bug leading to a _Wasmer runtime @@ -1877,7 +1879,8 @@ Some main points: All future Changelog entries will reference this base -[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.4.0...HEAD +[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.4.1...HEAD +[1.4.1]: https://github.com/CosmWasm/cosmwasm/compare/v1.4.0...1.4.1 [1.4.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.3.3...v1.4.0 [1.3.3]: https://github.com/CosmWasm/cosmwasm/compare/v1.3.2...v1.3.3 [1.3.2]: https://github.com/CosmWasm/cosmwasm/compare/v1.3.1...v1.3.2 From 9410fa2f76e576d3eaa2a0a53036d4a97e2705fe Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Mon, 9 Oct 2023 09:31:35 +0200 Subject: [PATCH 13/13] Fix docs.rs features --- packages/std/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index d95922b704..3161b9a5a1 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" readme = "README.md" [package.metadata.docs.rs] -features = ["abort", "stargate", "staking", "ibc3", "cosmwasm_1_3"] +features = ["abort", "stargate", "staking", "ibc3", "cosmwasm_1_4"] [features] default = ["iterator", "abort"]