Skip to content

Commit

Permalink
Release ink! 3.0.0 (#1160)
Browse files Browse the repository at this point in the history
* Bump version

* Add release notes

* Update readme

* Update release notes

* Update release notes

* Update release notes to reflect stabilized `seal_delegate_call`
  • Loading branch information
cmichi authored Mar 17, 2022
1 parent a35e159 commit 159e7db
Show file tree
Hide file tree
Showing 34 changed files with 253 additions and 175 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ the relevant links:

| Crate | Docs | Description |
|:--|:--|:--|
`ink_lang` | [![][j1]][j2] | Language features expose by ink!. See [here](https://paritytech.github.io/ink/ink_lang/attr.contract.html) for a detailed description of attributes which you can use in an `#[ink::contract]`. |
`ink_lang` | [![][j1]][j2] | Language features exposed by ink!. See [here](https://paritytech.github.io/ink/ink_lang/attr.contract.html) for a detailed description of attributes which you can use in an `#[ink::contract]`. |
`ink_storage` | [![][f1]][f2] | Data structures available in ink!. |
`ink_env` | [![][g1]][g2] | Low-level interface for interacting with the smart contract Wasm executor. |
`ink_env` | [![][g1]][g2] | Low-level interface for interacting with the smart contract Wasm executor. Contains [the off-chain testing API](https://paritytech.github.io/ink/ink_env/test/index.html) as well. |
`ink_prelude` | [![][i1]][i2] | Common API for no_std and std to access alloc crate types. |


Expand Down
78 changes: 78 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
# Version 3.0.0

This is the stable release for ink! 3.0.

It took us a while to get here and going forward we want to do
smaller releases more often.

*Please note that ink! has not been audited.*

## Compatibility
We recommend using a version of the `contracts` pallet later than
[cc282f84ba53ed2a08374d2a655dc8f08cbc5e86](https://github.com/paritytech/substrate/tree/cc282f84ba53ed2a08374d2a655dc8f08cbc5e86)
(March 15, 2022) in your node.

This is the case in the latest release of the `substrate-contracts-node`:
[v0.10.0](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.10.0).

## Breaking Changes
### We replaced the default off-chain testing environment
The off-chain testing environment can be used to write unit tests
for your smart contract with a simulated chain.
We've now replaced the existing off-chain environment with a new
one, which has a bit of a different API.

The major changes are that there is no longer any notion of "execution
context" ‒ so no more `push_execution_context` or `pop_execution_context`.
You can achieve all the same things with the new API, see [here](https://paritytech.github.io/ink/ink_env/test/index.html)
for the API documentation.

We've also switched all our examples to this new environment, you
can find more "template use-cases" there (e.g. for
[chain extension testing](https://github.com/paritytech/ink/tree/master/examples/rand-extension))

### We removed the dynamic storage allocator
More details on the reasoning behind this can be found in [#1148](https://github.com/paritytech/ink/pull/1148).

### `CallBuilder` API changed to support `delegate` calls
The `CallBuilder` API changed to now support two types of calls:

* `Call`: a cross-contract call.<br/>
This was the default until this new API change.
* `DelegateCall`: a delegated call.<br/>
This enables writing upgradeable contracts using
the `delegate` pattern. An example has been added to demonstrate this:
[`upgradeable-contract`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contract).
Please note that this is an _unstable_ API for now.
You have to enable the feature `pallet-contracts/unstable-interface` in the target runtime.
For `substrate-contracts-node` this is done by default [here](https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/Cargo.toml).

This is a breaking change, users must now specify the `call_type` to the builder manually.

_If you want to keep existing behavior you just need to specify the type `Call` now._

More details on this change can be found in [#1133](https://github.com/paritytech/ink/pull/1133).

### Unify `ink_env::{eval_contract, invoke_contract}`

The API for `eval_contract` and `invoke_contract` changed. You can read more
about the change in [#1165](https://github.com/paritytech/ink/pull/1165).

## Added
- Added `keep_attr` to `#[ink::contract]` and `#[ink::trait_definition]`[#1145](https://github.com/paritytech/ink/pull/1145) (thanks [@xgreenx](https://github.com/xgreenx))..
- Implemented the `seal_is_contract` and `seal_caller_is_origin` API ‒ [#1129](https://github.com/paritytech/ink/pull/1129) [#1166](https://github.com/paritytech/ink/pull/1166).
- Add tests in experimental off-chain env for `trait-erc20`[#1158](https://github.com/paritytech/ink/pull/1158).
- Add tests in experimental off-chain env for `erc721`[#1157](https://github.com/paritytech/ink/pull/1157).
- Add tests in experimental off-chain env for `multisig`[#1159](https://github.com/paritytech/ink/pull/1159).
- Add tests in experimental off-chain env for `dns`[#1156](https://github.com/paritytech/ink/pull/1156).
- Implemented chain extension testing in experimental off-chain env ‒ [#1152](https://github.com/paritytech/ink/pull/1152).

## Changed
- Replaced default off-chain testing engine with experimental one ‒ [#1144](https://github.com/paritytech/ink/pull/1144).
- Changed `CallBuilder` API to now support delegate calls ‒ [#1133](https://github.com/paritytech/ink/pull/1133) (thanks [@VargSupercolony](https://github.com/VargSupercolony) and [@xgreenx](https://github.com/xgreenx)).
- Unify `ink_env::{eval_contract, invoke_contract}`[#1165](https://github.com/paritytech/ink/pull/1165).

## Removed
- Removed the dynamic storage allocator ‒ [#1148](https://github.com/paritytech/ink/pull/1148).
- Removed `compile_as_dependency` config option ‒ [#1168](https://github.com/paritytech/ink/pull/1168).

# Version 3.0-rc9

This is the 9th release candidate for ink! 3.0.
Expand Down
2 changes: 1 addition & 1 deletion crates/allocator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_allocator"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion crates/engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_engine"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Michael Müller <[email protected]>"]
edition = "2021"

Expand Down
12 changes: 6 additions & 6 deletions crates/env/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_env"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand All @@ -15,10 +15,10 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_metadata = { version = "3.0.0-rc9", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "3.0.0-rc9", path = "../allocator/", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
ink_metadata = { version = "3.0.0", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "3.0.0", path = "../allocator/", default-features = false }
ink_primitives = { version = "3.0.0", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0", path = "../prelude/", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
Expand All @@ -32,7 +32,7 @@ static_assertions = "1.1"
rlibc = "1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ink_engine = { version = "3.0.0-rc9", path = "../engine/", optional = true }
ink_engine = { version = "3.0.0", path = "../engine/", optional = true }

# Hashes for the off-chain environment.
sha2 = { version = "0.10", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/eth_compatibility/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_eth_compatibility"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"

Expand All @@ -15,7 +15,7 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]

[dependencies]
ink_env = { version = "3.0.0-rc9", path = "../env", default-features = false }
ink_env = { version = "3.0.0", path = "../env", default-features = false }

[target.'cfg(not(target_os = "windows"))'.dependencies]
# We do not include `libsecp256k1` on Windows, since it's incompatible.
Expand Down
20 changes: 10 additions & 10 deletions crates/lang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_lang"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand All @@ -15,20 +15,20 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_env = { version = "3.0.0-rc9", path = "../env", default-features = false }
ink_storage = { version = "3.0.0-rc9", path = "../storage", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc9", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "3.0.0-rc9", path = "../prelude", default-features = false }
ink_eth_compatibility = { version = "3.0.0-rc9", path = "../eth_compatibility", default-features = false }
ink_lang_macro = { version = "3.0.0-rc9", path = "macro", default-features = false }
ink_env = { version = "3.0.0", path = "../env", default-features = false }
ink_storage = { version = "3.0.0", path = "../storage", default-features = false }
ink_primitives = { version = "3.0.0", path = "../primitives", default-features = false }
ink_metadata = { version = "3.0.0", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "3.0.0", path = "../prelude", default-features = false }
ink_eth_compatibility = { version = "3.0.0", path = "../eth_compatibility", default-features = false }
ink_lang_macro = { version = "3.0.0", path = "macro", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from"] }

[dev-dependencies]
ink_lang_ir = { version = "3.0.0-rc9", path = "ir" }
ink_metadata = { version = "3.0.0-rc9", default-features = false, path = "../metadata" }
ink_lang_ir = { version = "3.0.0", path = "ir" }
ink_metadata = { version = "3.0.0", default-features = false, path = "../metadata" }

trybuild = { version = "1.0.52", features = ["diff"] }
# Required for the doctest of `env_access::EnvAccess::instantiate_contract`
Expand Down
4 changes: 2 additions & 2 deletions crates/lang/codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_lang_codegen"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand All @@ -18,7 +18,7 @@ include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
name = "ink_lang_codegen"

[dependencies]
ir = { version = "3.0.0-rc9", package = "ink_lang_ir", path = "../ir", default-features = false }
ir = { version = "3.0.0", package = "ink_lang_ir", path = "../ir", default-features = false }
quote = "1"
syn = { version = "1.0", features = ["parsing", "full", "extra-traits"] }
proc-macro2 = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/lang/ir/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_lang_ir"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand Down
16 changes: 8 additions & 8 deletions crates/lang/macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_lang_macro"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand All @@ -15,19 +15,19 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_lang_ir = { version = "3.0.0-rc9", path = "../ir", default-features = false }
ink_lang_codegen = { version = "3.0.0-rc9", path = "../codegen", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../../primitives/", default-features = false }
ink_lang_ir = { version = "3.0.0", path = "../ir", default-features = false }
ink_lang_codegen = { version = "3.0.0", path = "../codegen", default-features = false }
ink_primitives = { version = "3.0.0", path = "../../primitives/", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
syn = "1"
proc-macro2 = "1"

[dev-dependencies]
ink_metadata = { version = "3.0.0-rc9", path = "../../metadata/" }
ink_env = { version = "3.0.0-rc9", path = "../../env/" }
ink_storage = { version = "3.0.0-rc9", path = "../../storage/" }
ink_lang = { version = "3.0.0-rc9", path = ".." }
ink_metadata = { version = "3.0.0", path = "../../metadata/" }
ink_env = { version = "3.0.0", path = "../../env/" }
ink_storage = { version = "3.0.0", path = "../../storage/" }
ink_lang = { version = "3.0.0", path = ".." }
scale-info = { version = "2", default-features = false, features = ["derive"] }

[lib]
Expand Down
6 changes: 3 additions & 3 deletions crates/metadata/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_metadata"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand All @@ -15,8 +15,8 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0", path = "../prelude/", default-features = false }
ink_primitives = { version = "3.0.0", path = "../primitives/", default-features = false }

serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
impl-serde = "0.3.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/prelude/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_prelude"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_primitives"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand All @@ -15,7 +15,7 @@ categories = ["no-std", "embedded"]
include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]

[dependencies]
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
ink_prelude = { version = "3.0.0", path = "../prelude/", default-features = false }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
cfg-if = "1"
Expand Down
14 changes: 7 additions & 7 deletions crates/storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_storage"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand All @@ -15,11 +15,11 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_env = { version = "3.0.0-rc9", path = "../env/", default-features = false }
ink_metadata = { version = "3.0.0-rc9", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }
ink_storage_derive = { version = "3.0.0-rc9", path = "derive", default-features = false }
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
ink_env = { version = "3.0.0", path = "../env/", default-features = false }
ink_metadata = { version = "3.0.0", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "3.0.0", path = "../primitives/", default-features = false }
ink_storage_derive = { version = "3.0.0", path = "derive", default-features = false }
ink_prelude = { version = "3.0.0", path = "../prelude/", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
Expand All @@ -33,7 +33,7 @@ quickcheck_macros = "1.0"
itertools = "0.10"
paste = "1.0"

ink_lang = { version = "3.0.0-rc9", path = "../lang/", default-features = false }
ink_lang = { version = "3.0.0", path = "../lang/", default-features = false }

[features]
default = ["std"]
Expand Down
12 changes: 6 additions & 6 deletions crates/storage/derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_storage_derive"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
edition = "2021"

Expand All @@ -25,8 +25,8 @@ synstructure = "0.12.4"

[dev-dependencies]
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
ink_env = { version = "3.0.0-rc9", path = "../../env" }
ink_primitives = { version = "3.0.0-rc9", path = "../../primitives" }
ink_metadata = { version = "3.0.0-rc9", path = "../../metadata" }
ink_prelude = { version = "3.0.0-rc9", path = "../../prelude/" }
ink_storage = { version = "3.0.0-rc9", path = ".." }
ink_env = { version = "3.0.0", path = "../../env" }
ink_primitives = { version = "3.0.0", path = "../../primitives" }
ink_metadata = { version = "3.0.0", path = "../../metadata" }
ink_prelude = { version = "3.0.0", path = "../../prelude/" }
ink_storage = { version = "3.0.0", path = ".." }
12 changes: 6 additions & 6 deletions examples/contract-terminate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "contract_terminate"
version = "3.0.0-rc9"
version = "3.0.0"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"

[dependencies]
ink_primitives = { version = "3.0.0-rc9", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc9", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc9", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc9", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc9", path = "../../crates/lang", default-features = false }
ink_primitives = { version = "3.0.0", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0", path = "../../crates/lang", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
Expand Down
Loading

0 comments on commit 159e7db

Please sign in to comment.