Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump interface_version to 9 #1368

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ and this project adheres to
- cosmwasm-std: Implement `saturating_add`/`sub`/`mul` for
`Decimal`/`Decimal256`.
- cosmwasm-std: Implement `MIN` const value for all `Uint` and `Decimal` types
- cosmwasm-vm: Add support for contracts with `interface_version_9`.
`interface_version_8` is still supported as well.
- cosmwasm-std: Bump the interface version to `interface_version_9`. Contracts
built on `cosmwasm-std 1.1` will only work with `cosmwasm-vm ^1.1`

[#1334]: https://github.com/CosmWasm/cosmwasm/pull/1334

Expand Down
2 changes: 1 addition & 1 deletion packages/std/src/exports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extern "C" fn requires_stargate() -> () {}
/// They can be checked by cosmwasm_vm.
/// Update this whenever the Wasm VM interface breaks.
#[no_mangle]
extern "C" fn interface_version_8() -> () {}
extern "C" fn interface_version_9() -> () {}

/// allocate reserves the given number of bytes in wasm memory and returns a pointer
/// to a Region defining this data. This space is managed by the calling process
Expand Down
25 changes: 13 additions & 12 deletions packages/vm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ A VM can support one or more contract-VM interface versions. The interface
version is communicated by the contract via a Wasm import. This is the current
compatibility list:

| cosmwasm-vm | Supported interface versions | cosmwasm-std |
| ----------- | ---------------------------- | ------------ |
| 1.0 | `interface_version_8` | 1.0 |
| 0.16 | `interface_version_7` | 0.16 |
| 0.15 | `interface_version_6` | 0.15 |
| 0.14 | `interface_version_5` | 0.14 |
| 0.13 | `cosmwasm_vm_version_4` | 0.11-0.13 |
| 0.12 | `cosmwasm_vm_version_4` | 0.11-0.13 |
| 0.11 | `cosmwasm_vm_version_4` | 0.11-0.13 |
| 0.10 | `cosmwasm_vm_version_3` | 0.10 |
| 0.9 | `cosmwasm_vm_version_2` | 0.9 |
| 0.8 | `cosmwasm_vm_version_1` | 0.8 |
| cosmwasm-vm | Supported interface versions | cosmwasm-std |
| ----------- | -------------------------------------------- | ------------ |
| 1.1 | `interface_version_9`, `interface_version_8` | 1.0-1.1 |
| 1.0 | `interface_version_8` | 1.0 |
| 0.16 | `interface_version_7` | 0.16 |
| 0.15 | `interface_version_6` | 0.15 |
| 0.14 | `interface_version_5` | 0.14 |
| 0.13 | `cosmwasm_vm_version_4` | 0.11-0.13 |
| 0.12 | `cosmwasm_vm_version_4` | 0.11-0.13 |
| 0.11 | `cosmwasm_vm_version_4` | 0.11-0.13 |
| 0.10 | `cosmwasm_vm_version_3` | 0.10 |
| 0.9 | `cosmwasm_vm_version_2` | 0.9 |
| 0.8 | `cosmwasm_vm_version_1` | 0.8 |

### Changes between interface versions

Expand Down
1 change: 1 addition & 0 deletions packages/vm/src/compatibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const REQUIRED_EXPORTS: &[&str] = &[

const INTERFACE_VERSION_PREFIX: &str = "interface_version_";
const SUPPORTED_INTERFACE_VERSIONS: &[&str] = &[
"interface_version_9",
"interface_version_8",
#[cfg(feature = "allow_interface_version_7")]
"interface_version_7",
Expand Down