diff --git a/.circleci/config.yml b/.circleci/config.yml index 6412da3308..d240236812 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -391,7 +391,7 @@ jobs: - run: name: Build with all features working_directory: ~/project/packages/vm - command: cargo build --locked --features allow_interface_version_7,iterator,staking,stargate + command: cargo build --locked --features iterator,staking,stargate - run: name: Test working_directory: ~/project/packages/vm @@ -399,7 +399,7 @@ jobs: - run: name: Test with all features working_directory: ~/project/packages/vm - command: cargo test --locked --features allow_interface_version_7,iterator,staking,stargate + command: cargo test --locked --features iterator,staking,stargate - run: name: Test multi threaded cache working_directory: ~/project/packages/vm @@ -448,7 +448,7 @@ jobs: - run: name: Test with all features working_directory: ~/project/packages/vm - command: cargo test --locked --features allow_interface_version_7,iterator,staking,stargate + command: cargo test --locked --features iterator,staking,stargate - save_cache: paths: # ".." is the easiest way to get $HOME here (pwd is $HOME\project) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fdfb4f53d..834173c5d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,8 @@ and this project adheres to `IbcReceiveResponse::new` instead. ([#1942]) - cosmwasm-vm: Remove `InstanceOptions::print_debug` flag. Set your own handler using `Instance::set_debug_handler`. ([#1953]) +- cosmwasm-vm: Remove `allow_interface_version_7` feature and all related + functionality. ([#1952]) [cw-storage-plus]: https://github.com/CosmWasm/cw-storage-plus [#1875]: https://github.com/CosmWasm/cosmwasm/pull/1875 @@ -85,6 +87,7 @@ and this project adheres to [#1896]: https://github.com/CosmWasm/cosmwasm/pull/1896 [#1936]: https://github.com/CosmWasm/cosmwasm/pull/1936 [#1942]: https://github.com/CosmWasm/cosmwasm/pull/1942 +[#1952]: https://github.com/CosmWasm/cosmwasm/pull/1952 [#1953]: https://github.com/CosmWasm/cosmwasm/pull/1953 ## [1.5.0] - 2023-10-31 diff --git a/packages/vm/Cargo.toml b/packages/vm/Cargo.toml index f3211bcf3b..469350a4e8 100644 --- a/packages/vm/Cargo.toml +++ b/packages/vm/Cargo.toml @@ -24,18 +24,13 @@ staking = ["cosmwasm-std/staking"] stargate = ["cosmwasm-std/stargate"] # Use cranelift backend instead of singlepass. This is required for development on Windows. cranelift = ["wasmer/cranelift"] -# It's a bit unclear if interface_version_7 (CosmWasm 0.16) contracts are fully compatible -# with newer hosts. If old contracts are important to you and you are willing to take the risk, -# activate this feature. -# See also https://gist.github.com/webmaster128/3cd1988680843ecaf7548050821e1e6f. -allow_interface_version_7 = [] [lib] # See https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options bench = false [dependencies] -bytes = "1.4.0" # need a higher version than the one required by Wasmer for the Bytes -> Vec implementation +bytes = "1.4.0" # need a higher version than the one required by Wasmer for the Bytes -> Vec implementation clru = "0.6.1" crc32fast = "1.3.2" # Uses the path when built locally; uses the given version from crates.io when published @@ -54,8 +49,8 @@ wasmer-middlewares = "=4.2.2" # Dependencies that we do not use ourself. We add those entries # to bump the min version of them. bytecheck = "0.6.3" # With this version the simdutf8 dependency became optional -enumset = "1.0.2" # Fixes https://github.com/Lymia/enumset/issues/17 (https://github.com/Lymia/enumset/commit/a430550cd6a3c9b1ef636d37f75dede7616f5b62) -bitflags = "1.1.0" # https://github.com/CensoredUsername/dynasm-rs/pull/74 +enumset = "1.0.2" # Fixes https://github.com/Lymia/enumset/issues/17 (https://github.com/Lymia/enumset/commit/a430550cd6a3c9b1ef636d37f75dede7616f5b62) +bitflags = "1.1.0" # https://github.com/CensoredUsername/dynasm-rs/pull/74 # Wasmer git/local (used for quick local debugging or patching) # wasmer = { git = "https://github.com/wasmerio/wasmer", rev = "877ce1f7c44fad853c", default-features = false, features = ["cranelift", "singlepass"] } @@ -64,7 +59,7 @@ bitflags = "1.1.0" # https://github.com/CensoredUsername/dynasm-rs/pull/74 # wasmer-middlewares = { path = "../../../wasmer/lib/middlewares" } [dev-dependencies] -criterion = { version = "0.4", features = [ "html_reports" ] } +criterion = { version = "0.4", features = ["html_reports"] } glob = "0.3.1" hex-literal = "0.3.1" tempfile = "3.1.0" diff --git a/packages/vm/src/compatibility.rs b/packages/vm/src/compatibility.rs index e3acab9728..b6dd6a65be 100644 --- a/packages/vm/src/compatibility.rs +++ b/packages/vm/src/compatibility.rs @@ -47,11 +47,7 @@ const REQUIRED_EXPORTS: &[&str] = &[ ]; const INTERFACE_VERSION_PREFIX: &str = "interface_version_"; -const SUPPORTED_INTERFACE_VERSIONS: &[&str] = &[ - "interface_version_8", - #[cfg(feature = "allow_interface_version_7")] - "interface_version_7", -]; +const SUPPORTED_INTERFACE_VERSIONS: &[&str] = &["interface_version_8"]; const MEMORY_LIMIT: u32 = 512; // in pages /// The upper limit for the `max` value of each table. CosmWasm contracts have @@ -443,25 +439,6 @@ mod tests { let module = ParsedWasm::parse(&wasm).unwrap(); check_interface_version(&module).unwrap(); - #[cfg(feature = "allow_interface_version_7")] - { - // valid legacy version - let wasm = wat::parse_str( - r#"(module - (type (func)) - (func (type 0) nop) - (export "add_one" (func 0)) - (export "allocate" (func 0)) - (export "interface_version_7" (func 0)) - (export "deallocate" (func 0)) - (export "instantiate" (func 0)) - )"#, - ) - .unwrap(); - let module = ParsedWasm::parse(&wasm).unwrap(); - check_interface_version(&module).unwrap(); - } - // missing let wasm = wat::parse_str( r#"(module