Skip to content

Commit

Permalink
Merge pull request #578 from CosmWasm/cp/update-cosmwasm-2.2
Browse files Browse the repository at this point in the history
Update to cosmwasm 2.2
  • Loading branch information
chipshort authored Dec 17, 2024
2 parents 8a26f8d + a5c3a79 commit 5dfac8d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
24 changes: 12 additions & 12 deletions libwasmvm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions libwasmvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 1 addition & 6 deletions libwasmvm/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,7 @@ fn do_save_wasm(
unchecked: bool,
) -> Result<Checksum, Error> {
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]
Expand Down
2 changes: 1 addition & 1 deletion libwasmvm/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 5dfac8d

Please sign in to comment.