Unverified Commit ac501b24 authored by Hero Bird's avatar Hero Bird Committed by GitHub
Browse files

ink! 3.0-rc3 pre-release changes and adjustments (#713)

* adjust rustfmt.toml

* add ink-fizz-tests feature guard to some test API

* update ink! crates to version 3.0.0-rc3

* write release notes for ink! 3.0-rc3

* apply formatting to imports_granularity
parent 2b3d47c7
Pipeline #126540 passed with stages
in 10 minutes and 13 seconds
......@@ -19,7 +19,7 @@ fn_single_line = false
where_single_line = false
imports_indent = "Block"
imports_layout = "Vertical" # changed
merge_imports = true # changed
imports_granularity = "Crate" # changed
reorder_imports = true
reorder_modules = true
reorder_impl_items = false
......
# Version 3.0-rc3 (2021-03-02)
This is the 3rd release candidate for ink! 3.0.
The list below shows the additions, changes and fixes that are visible to users of ink!.
## Compatibility
ink! 3.0-rc3 is compatible with
- The `cargo-contract` CLI tool version `0.9.1` or newer.
- Install newest version using `cargo install --force cargo-contract`.
- Substrate version `3.0` including the `contracts-pallet` version `3.0`.
## Added
- Implemented chain extensions feature for ink!.
- ink!'s official documentation portal: https://paritytech.github.io/ink-docs/
- It is now possible to pass a `salt` argument to contract instantiations.
- Implemented fuzz testing for the ink! codebase.
## Changed
- Migrate `ink_storage::SmallVec` and `ink_storage::lazy::SmallLazyArray` to use `min_const_generics`.
- The `min_const_generics` feature is going to be stabilized in Rust 1.51. For now it was put behind
the `ink-unstable` crate feature of the `ink_storage` crate.
- Improve error reporting for conflicting ink! attributes.
- Improve error reporting for invalid constructor or message selector. (https://github.com/paritytech/ink/pull/561)
- Remove `iter_mut` for `ink_storage::BinaryHeap` data structure.
- Add documented demonstration how to properly mock `transferred_balance` calls: https://github.com/paritytech/ink/pull/555
- Add contract example which uses `ext_transfer` and `ext_terminate`: https://github.com/paritytech/ink/pull/554
- Improve documentation of `transfer` and `minimum_balance` APIs: https://github.com/paritytech/ink/pull/540
## Fixed
- The Delegator example contract now compiles properly using the `build-all.sh` bash script.
- Update crate dependencies:
- `scale-info 0.6`
- `parity-scale-codec 2.0`
- `rand 0.8`
- `itertools 0.10`
- Remove unused `tiny-keccak` dependency from `ink_primitives`.
- Changed the default `BlockNumber` type to `u32`. This is a fix since it now properly mirrors Substrate's default `BlockNumber` type.
- Ensure topics are unique: https://github.com/paritytech/ink/pull/594
- Several fixes for `ink_storage` data structures, including:
- `Drop` implementation for `Pack` now works properly. (https://github.com/paritytech/ink/pull/600)
- `Drop` implementation for `Lazy` now always properly clean up storage. (https://github.com/paritytech/ink/pull/597)
- Nested `Lazy` now properly clears storage data. (https://github.com/paritytech/ink/pull/583)
- `Option` fields now properly clean up nested storage data. (https://github.com/paritytech/ink/pull/570)
# Version 3.0-rc2 (2020-10-22)
This is the 2nd release candidate for ink! 3.0.
......
[package]
name = "ink_allocator"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......
[package]
name = "ink_env"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......@@ -15,10 +15,10 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
[dependencies]
ink_metadata = { version = "3.0.0-rc2", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "3.0.0-rc2", path = "../allocator/", default-features = false }
ink_primitives = { version = "3.0.0-rc2", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc2", path = "../prelude/", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "3.0.0-rc3", path = "../allocator/", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc3", path = "../prelude/", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
......
[package]
name = "ink_lang"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......@@ -15,12 +15,12 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
[dependencies]
ink_env = { version = "3.0.0-rc2", path = "../env", default-features = false }
ink_storage = { version = "3.0.0-rc2", path = "../storage", default-features = false }
ink_primitives = { version = "3.0.0-rc2", path = "../primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc2", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "3.0.0-rc2", path = "../prelude/", default-features = false }
ink_lang_macro = { version = "3.0.0-rc2", path = "macro", default-features = false }
ink_env = { version = "3.0.0-rc3", path = "../env", default-features = false }
ink_storage = { version = "3.0.0-rc3", path = "../storage", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "3.0.0-rc3", path = "../prelude/", default-features = false }
ink_lang_macro = { version = "3.0.0-rc3", path = "macro", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from"] }
......
[package]
name = "ink_lang_codegen"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......@@ -18,7 +18,7 @@ include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
name = "ink_lang_codegen"
[dependencies]
ir = { version = "3.0.0-rc2", package = "ink_lang_ir", path = "../ir", default-features = false }
ir = { version = "3.0.0-rc3", package = "ink_lang_ir", path = "../ir", default-features = false }
quote = "1"
syn = { version = "1.0", features = ["parsing", "full", "extra-traits"] }
proc-macro2 = "1.0"
......
[package]
name = "ink_lang_ir"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......
[package]
name = "ink_lang_macro"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......@@ -15,9 +15,9 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
[dependencies]
ink_lang_ir = { version = "3.0.0-rc2", path = "../ir", default-features = false }
ink_lang_codegen = { version = "3.0.0-rc2", path = "../codegen", default-features = false }
ink_primitives = { version = "3.0.0-rc2", path = "../../primitives/", default-features = false }
ink_lang_ir = { version = "3.0.0-rc3", path = "../ir", default-features = false }
ink_lang_codegen = { version = "3.0.0-rc3", path = "../codegen", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../../primitives/", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] }
syn = "1"
......@@ -27,10 +27,10 @@ proc-macro2 = "1"
funty = "=1.1.0"
[dev-dependencies]
ink_metadata = { version = "3.0.0-rc2", path = "../../metadata/" }
ink_env = { version = "3.0.0-rc2", path = "../../env/" }
ink_storage = { version = "3.0.0-rc2", path = "../../storage/" }
ink_lang = { version = "3.0.0-rc2", path = ".." }
ink_metadata = { version = "3.0.0-rc3", path = "../../metadata/" }
ink_env = { version = "3.0.0-rc3", path = "../../env/" }
ink_storage = { version = "3.0.0-rc3", path = "../../storage/" }
ink_lang = { version = "3.0.0-rc3", path = ".." }
trybuild = "1.0.24"
scale-info = { version = "0.6", default-features = false, features = ["derive"] }
......
[package]
name = "ink_metadata"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......@@ -15,8 +15,8 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
[dependencies]
ink_prelude = { version = "3.0.0-rc2", path = "../prelude/", default-features = false }
ink_primitives = { version = "3.0.0-rc2", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc3", path = "../prelude/", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../primitives/", default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
impl-serde = "0.3.1"
......
[package]
name = "ink_prelude"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......
[package]
name = "ink_primitives"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......@@ -15,7 +15,7 @@ categories = ["no-std", "embedded"]
include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]
[dependencies]
ink_prelude = { version = "3.0.0-rc2", path = "../prelude/", default-features = false }
ink_prelude = { version = "3.0.0-rc3", path = "../prelude/", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive", "full"] }
scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true }
......
[package]
name = "ink_storage"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......@@ -15,11 +15,11 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
[dependencies]
ink_env = { version = "3.0.0-rc2", path = "../env/", default-features = false }
ink_metadata = { version = "3.0.0-rc2", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "3.0.0-rc2", path = "../primitives/", default-features = false }
ink_storage_derive = { version = "3.0.0-rc2", path = "derive", default-features = false }
ink_prelude = { version = "3.0.0-rc2", path = "../prelude/", default-features = false }
ink_env = { version = "3.0.0-rc3", path = "../env/", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "3.0.0-rc3", path = "../primitives/", default-features = false }
ink_storage_derive = { version = "3.0.0-rc3", path = "derive", default-features = false }
ink_prelude = { version = "3.0.0-rc3", path = "../prelude/", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
......
[package]
name = "ink_storage_derive"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2018"
......@@ -24,6 +24,6 @@ proc-macro2 = "1.0"
synstructure = "0.12.4"
[dev-dependencies]
ink_primitives = { version = "3.0.0-rc2", path = "../../primitives" }
ink_metadata = { version = "3.0.0-rc2", path = "../../metadata" }
ink_storage = { version = "3.0.0-rc2", path = ".." }
ink_primitives = { version = "3.0.0-rc3", path = "../../primitives" }
ink_metadata = { version = "3.0.0-rc3", path = "../../metadata" }
ink_storage = { version = "3.0.0-rc3", path = ".." }
......@@ -200,7 +200,7 @@ macro_rules! fuzz_storage {
}
/// Asserts that the storage is empty, without any leftovers.
#[cfg(test)]
#[cfg(all(test, feature = "ink-fuzz-tests"))]
pub fn assert_storage_clean() {
let contract_id =
ink_env::test::get_current_contract_account_id::<ink_env::DefaultEnvironment>()
......
[package]
name = "contract_terminate"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
ink_primitives = { version = "3.0.0-rc2", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc2", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc2", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc3", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc3", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc3", path = "../../crates/lang", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] }
scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true }
......
[package]
name = "contract_transfer"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
ink_primitives = { version = "3.0.0-rc2", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc2", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc2", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc3", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc3", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc3", path = "../../crates/lang", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] }
scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true }
......
[package]
name = "delegator"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
ink_primitives = { version = "3.0.0-rc2", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc2", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc2", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc2", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc2", path = "../../crates/lang", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc3", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc3", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc3", path = "../../crates/lang", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] }
adder = { version = "3.0.0-rc2", path = "adder", default-features = false, features = ["ink-as-dependency"] }
subber = { version = "3.0.0-rc2", path = "subber", default-features = false, features = ["ink-as-dependency"] }
accumulator = { version = "3.0.0-rc2", path = "accumulator", default-features = false, features = ["ink-as-dependency"] }
adder = { version = "3.0.0-rc3", path = "adder", default-features = false, features = ["ink-as-dependency"] }
subber = { version = "3.0.0-rc3", path = "subber", default-features = false, features = ["ink-as-dependency"] }
accumulator = { version = "3.0.0-rc3", path = "accumulator", default-features = false, features = ["ink-as-dependency"] }
scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true }
# Should be removed once bitvecto-rs/bitvec#105 is resolved
......
[package]
name = "accumulator"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
ink_primitives = { version = "3.0.0-rc2", path = "../../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc2", path = "../../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc2", path = "../../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc2", path = "../../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc2", path = "../../../crates/lang", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc3", path = "../../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc3", path = "../../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc3", path = "../../../crates/lang", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] }
scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true }
......
[package]
name = "adder"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
ink_primitives = { version = "3.0.0-rc2", path = "../../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc2", path = "../../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc2", path = "../../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc2", path = "../../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc2", path = "../../../crates/lang", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc3", path = "../../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc3", path = "../../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc3", path = "../../../crates/lang", default-features = false }
accumulator = { version = "3.0.0-rc2", path = "../accumulator", default-features = false, features = ["ink-as-dependency"] }
accumulator = { version = "3.0.0-rc3", path = "../accumulator", default-features = false, features = ["ink-as-dependency"] }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] }
scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true }
......
[package]
name = "subber"
version = "3.0.0-rc2"
version = "3.0.0-rc3"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
ink_primitives = { version = "3.0.0-rc2", path = "../../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc2", path = "../../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc2", path = "../../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc2", path = "../../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc2", path = "../../../crates/lang", default-features = false }
ink_primitives = { version = "3.0.0-rc3", path = "../../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc3", path = "../../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc3", path = "../../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc3", path = "../../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc3", path = "../../../crates/lang", default-features = false }
accumulator = { version = "3.0.0-rc2", path = "../accumulator", default-features = false, features = ["ink-as-dependency"] }
accumulator = { version = "3.0.0-rc3", path = "../accumulator", default-features = false, features = ["ink-as-dependency"] }
scale = { package = "parity-scale-codec", version = "2.0", default-features = false, features = ["derive"] }
scale-info = { version = "0.6", default-features = false, features = ["derive"], optional = true }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment