Skip to content

Commit 888552a

Browse files
authored
Merge pull request #1952 from CosmWasm/remove-allow-interface-7
Remove interface version 7 support
2 parents 4caa9f0 + 58791c5 commit 888552a

File tree

4 files changed

+11
-36
lines changed

4 files changed

+11
-36
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,15 +391,15 @@ jobs:
391391
- run:
392392
name: Build with all features
393393
working_directory: ~/project/packages/vm
394-
command: cargo build --locked --features allow_interface_version_7,iterator,staking,stargate
394+
command: cargo build --locked --features iterator,staking,stargate
395395
- run:
396396
name: Test
397397
working_directory: ~/project/packages/vm
398398
command: cargo test --locked
399399
- run:
400400
name: Test with all features
401401
working_directory: ~/project/packages/vm
402-
command: cargo test --locked --features allow_interface_version_7,iterator,staking,stargate
402+
command: cargo test --locked --features iterator,staking,stargate
403403
- run:
404404
name: Test multi threaded cache
405405
working_directory: ~/project/packages/vm
@@ -448,7 +448,7 @@ jobs:
448448
- run:
449449
name: Test with all features
450450
working_directory: ~/project/packages/vm
451-
command: cargo test --locked --features allow_interface_version_7,iterator,staking,stargate
451+
command: cargo test --locked --features iterator,staking,stargate
452452
- save_cache:
453453
paths:
454454
# ".." is the easiest way to get $HOME here (pwd is $HOME\project)

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,16 @@ and this project adheres to
7878
`IbcReceiveResponse::new` instead. ([#1942])
7979
- cosmwasm-vm: Remove `InstanceOptions::print_debug` flag. Set your own handler
8080
using `Instance::set_debug_handler`. ([#1953])
81+
- cosmwasm-vm: Remove `allow_interface_version_7` feature and all related
82+
functionality. ([#1952])
8183

8284
[cw-storage-plus]: https://github.com/CosmWasm/cw-storage-plus
8385
[#1875]: https://github.com/CosmWasm/cosmwasm/pull/1875
8486
[#1890]: https://github.com/CosmWasm/cosmwasm/pull/1890
8587
[#1896]: https://github.com/CosmWasm/cosmwasm/pull/1896
8688
[#1936]: https://github.com/CosmWasm/cosmwasm/pull/1936
8789
[#1942]: https://github.com/CosmWasm/cosmwasm/pull/1942
90+
[#1952]: https://github.com/CosmWasm/cosmwasm/pull/1952
8891
[#1953]: https://github.com/CosmWasm/cosmwasm/pull/1953
8992

9093
## [1.5.0] - 2023-10-31

packages/vm/Cargo.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,13 @@ staking = ["cosmwasm-std/staking"]
2424
stargate = ["cosmwasm-std/stargate"]
2525
# Use cranelift backend instead of singlepass. This is required for development on Windows.
2626
cranelift = ["wasmer/cranelift"]
27-
# It's a bit unclear if interface_version_7 (CosmWasm 0.16) contracts are fully compatible
28-
# with newer hosts. If old contracts are important to you and you are willing to take the risk,
29-
# activate this feature.
30-
# See also https://gist.github.com/webmaster128/3cd1988680843ecaf7548050821e1e6f.
31-
allow_interface_version_7 = []
3227

3328
[lib]
3429
# See https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
3530
bench = false
3631

3732
[dependencies]
38-
bytes = "1.4.0" # need a higher version than the one required by Wasmer for the Bytes -> Vec<u8> implementation
33+
bytes = "1.4.0" # need a higher version than the one required by Wasmer for the Bytes -> Vec<u8> implementation
3934
clru = "0.6.1"
4035
crc32fast = "1.3.2"
4136
# Uses the path when built locally; uses the given version from crates.io when published
@@ -54,8 +49,8 @@ wasmer-middlewares = "=4.2.2"
5449
# Dependencies that we do not use ourself. We add those entries
5550
# to bump the min version of them.
5651
bytecheck = "0.6.3" # With this version the simdutf8 dependency became optional
57-
enumset = "1.0.2" # Fixes https://github.com/Lymia/enumset/issues/17 (https://github.com/Lymia/enumset/commit/a430550cd6a3c9b1ef636d37f75dede7616f5b62)
58-
bitflags = "1.1.0" # https://github.com/CensoredUsername/dynasm-rs/pull/74
52+
enumset = "1.0.2" # Fixes https://github.com/Lymia/enumset/issues/17 (https://github.com/Lymia/enumset/commit/a430550cd6a3c9b1ef636d37f75dede7616f5b62)
53+
bitflags = "1.1.0" # https://github.com/CensoredUsername/dynasm-rs/pull/74
5954

6055
# Wasmer git/local (used for quick local debugging or patching)
6156
# 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
6459
# wasmer-middlewares = { path = "../../../wasmer/lib/middlewares" }
6560

6661
[dev-dependencies]
67-
criterion = { version = "0.4", features = [ "html_reports" ] }
62+
criterion = { version = "0.4", features = ["html_reports"] }
6863
glob = "0.3.1"
6964
hex-literal = "0.3.1"
7065
tempfile = "3.1.0"

packages/vm/src/compatibility.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ const REQUIRED_EXPORTS: &[&str] = &[
4747
];
4848

4949
const INTERFACE_VERSION_PREFIX: &str = "interface_version_";
50-
const SUPPORTED_INTERFACE_VERSIONS: &[&str] = &[
51-
"interface_version_8",
52-
#[cfg(feature = "allow_interface_version_7")]
53-
"interface_version_7",
54-
];
50+
const SUPPORTED_INTERFACE_VERSIONS: &[&str] = &["interface_version_8"];
5551

5652
const MEMORY_LIMIT: u32 = 512; // in pages
5753
/// The upper limit for the `max` value of each table. CosmWasm contracts have
@@ -443,25 +439,6 @@ mod tests {
443439
let module = ParsedWasm::parse(&wasm).unwrap();
444440
check_interface_version(&module).unwrap();
445441

446-
#[cfg(feature = "allow_interface_version_7")]
447-
{
448-
// valid legacy version
449-
let wasm = wat::parse_str(
450-
r#"(module
451-
(type (func))
452-
(func (type 0) nop)
453-
(export "add_one" (func 0))
454-
(export "allocate" (func 0))
455-
(export "interface_version_7" (func 0))
456-
(export "deallocate" (func 0))
457-
(export "instantiate" (func 0))
458-
)"#,
459-
)
460-
.unwrap();
461-
let module = ParsedWasm::parse(&wasm).unwrap();
462-
check_interface_version(&module).unwrap();
463-
}
464-
465442
// missing
466443
let wasm = wat::parse_str(
467444
r#"(module

0 commit comments

Comments
 (0)