diff --git a/.circleci/config.yml b/.circleci/config.yml index 6a1da29f2..d376d482c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -139,7 +139,7 @@ jobs: docker: # The audit tool might use a more modern Rust version than the build jobs. See # "Tooling Rust compiler" in docs/COMPILER_VERSIONS.md - - image: cimg/rust:1.75.0 + - image: cimg/rust:1.81.0 steps: - checkout - run: @@ -152,8 +152,8 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - v3-libwasmvm_audit-rust:1.75.0-{{ checksum "libwasmvm/Cargo.lock" }} - - v3-libwasmvm_audit-rust:1.75.0- + - v3-libwasmvm_audit-rust:1.81.0-{{ checksum "libwasmvm/Cargo.lock" }} + - v3-libwasmvm_audit-rust:1.81.0- - run: name: Install cargo-audit command: cargo install --debug cargo-audit --version 0.17.6 @@ -164,7 +164,7 @@ jobs: - save_cache: paths: - ~/.cargo/registry - key: v3-libwasmvm_audit-rust:1.75.0-{{ checksum "libwasmvm/Cargo.lock" }} + key: v3-libwasmvm_audit-rust:1.81.0-{{ checksum "libwasmvm/Cargo.lock" }} format-go: docker: diff --git a/libwasmvm/Cargo.lock b/libwasmvm/Cargo.lock index c004a2215..3643bf288 100644 --- a/libwasmvm/Cargo.lock +++ b/libwasmvm/Cargo.lock @@ -437,13 +437,13 @@ dependencies = [ [[package]] name = "cosmwasm-core" -version = "2.2.0-rc.3" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0-rc.3#a6c6a3c3e050eb7cf59b2c9660667272c967e641" +version = "2.2.0" +source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0#b9a149fde2a787b7221918b0651532ca2668d761" [[package]] name = "cosmwasm-crypto" -version = "2.2.0-rc.3" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0-rc.3#a6c6a3c3e050eb7cf59b2c9660667272c967e641" +version = "2.2.0" +source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0#b9a149fde2a787b7221918b0651532ca2668d761" dependencies = [ "ark-bls12-381", "ark-ec", @@ -465,8 +465,8 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "2.2.0-rc.3" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0-rc.3#a6c6a3c3e050eb7cf59b2c9660667272c967e641" +version = "2.2.0" +source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0#b9a149fde2a787b7221918b0651532ca2668d761" dependencies = [ "proc-macro2", "quote", @@ -475,8 +475,8 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "2.2.0-rc.3" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0-rc.3#a6c6a3c3e050eb7cf59b2c9660667272c967e641" +version = "2.2.0" +source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0#b9a149fde2a787b7221918b0651532ca2668d761" dependencies = [ "base64", "bech32", @@ -498,8 +498,8 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "2.2.0-rc.3" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0-rc.3#a6c6a3c3e050eb7cf59b2c9660667272c967e641" +version = "2.2.0" +source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0#b9a149fde2a787b7221918b0651532ca2668d761" dependencies = [ "bech32", "blake2", @@ -527,8 +527,8 @@ dependencies = [ [[package]] name = "cosmwasm-vm-derive" -version = "2.2.0-rc.3" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0-rc.3#a6c6a3c3e050eb7cf59b2c9660667272c967e641" +version = "2.2.0" +source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v2.2.0#b9a149fde2a787b7221918b0651532ca2668d761" dependencies = [ "blake2", "proc-macro2", diff --git a/libwasmvm/Cargo.toml b/libwasmvm/Cargo.toml index 8e5c3cb17..dfa3a54d0 100644 --- a/libwasmvm/Cargo.toml +++ b/libwasmvm/Cargo.toml @@ -26,12 +26,12 @@ default = [] backtraces = [] [dependencies] -cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0-rc.3", features = [ +cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0", features = [ "staking", "stargate", "iterator", ] } -cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0-rc.3", features = [ +cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0", features = [ "staking", "stargate", "iterator", diff --git a/libwasmvm/src/cache.rs b/libwasmvm/src/cache.rs index 02c8d5e48..007a4d781 100644 --- a/libwasmvm/src/cache.rs +++ b/libwasmvm/src/cache.rs @@ -72,12 +72,7 @@ fn do_save_wasm( unchecked: bool, ) -> Result { let wasm = wasm.read().ok_or_else(|| Error::unset_arg(WASM_ARG))?; - let checksum = if unchecked { - cache.save_wasm_unchecked(wasm)? - } else { - cache.save_wasm(wasm)? - }; - Ok(checksum) + Ok(cache.store_code(wasm, !unchecked, true)?) } #[no_mangle] diff --git a/libwasmvm/src/tests.rs b/libwasmvm/src/tests.rs index ee5766333..5c8a7f179 100644 --- a/libwasmvm/src/tests.rs +++ b/libwasmvm/src/tests.rs @@ -29,7 +29,7 @@ fn handle_cpu_loop_with_cache() { }; // store code - let checksum = cache.save_wasm(CYBERPUNK).unwrap(); + let checksum = cache.store_code(CYBERPUNK, true, true).unwrap(); // instantiate let env = mock_env();