Skip to content

Commit 6cde90c

Browse files
author
Michael Müller
authored
Release ink! 3.0.0-rc7 (#1043)
* Bump `3.0.0-rc6` ➔ `3.0.0-rc7` * Update release notes * Update release notes * Remove outdated changelog note
1 parent 71a2c38 commit 6cde90c

File tree

32 files changed

+201
-181
lines changed

32 files changed

+201
-181
lines changed

RELEASES.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,74 @@
1-
# Version 3.0-rc7 (UNRELEASED)
1+
# Version 3.0-rc7
22

33
This is the 7th release candidate for ink! 3.0.
44

5+
Since our last release candidate we implemented a number of contract size improvements.
6+
With those improvements the size of our `erc20` example has reduced significantly:
7+
8+
| | | Release Build with `cargo-contract` |
9+
|:---------|:------------|:------------------------------------|
10+
| `erc20` | `3.0.0-rc6` | 29.3 K |
11+
| `erc20` | `3.0.0-rc7` | 10.4 K |
12+
13+
The savings apply partly to our other examples; for `erc20` they are most
14+
significant since it has been migrated to use a new [`Mapping`](https://paritytech.github.io/ink/ink_storage/lazy/struct.Mapping.html)
15+
data structure, which we introduce with this release candidate.
16+
The other examples will be migrated to this new data structure as a next step.
17+
518
## Removed
619
- Removed the state rent API ‒ [#1036](https://github.com/paritytech/ink/pull/1036).
720

821
## Added
9-
- The ink! codegen now heavily relies on static type information based on traits defined in `ink_lang`.
22+
- Added support for wildcard selectors ‒ [#1020](https://github.com/paritytech/ink/pull/1020).
23+
- This enables writing upgradable smart contracts using the proxy/forward pattern.
24+
We added a new example to illustrate this ‒ the [proxy](https://github.com/paritytech/ink/tree/master/examples/proxy) example.
25+
- Annotating a wildcard selector in traits is not supported.
26+
- The ink! codegen now heavily relies on static type information based on traits defined in `ink_lang`[#665](https://github.com/paritytech/ink/pull/665).
1027
- Some of those traits and their carried information can be used for static reflection of ink!
1128
smart contracts. Those types and traits reside in the new `ink_lang::reflect` module and is
1229
publicly usable by ink! smart contract authors.
13-
- Added basic support for wildcard selectors ‒ [#1020](https://github.com/paritytech/ink/pull/1020).
14-
- This enables writing upgradable smart contracts using the proxy pattern.
15-
We added a new example illustrating this ‒ the [proxy](https://github.com/paritytech/ink/tree/master/examples/proxy) example.
16-
- Annotating a wildcard selector in traits is not supported.
1730

1831
## Changed
1932
- Upgraded to the `seal_call` v1 API ‒ [#960](https://github.com/paritytech/ink/pull/960).
2033
- This API now enables control over the behavior of cross-contract calls, e.g. to forward/clone input,
2134
enable tail calls and control reentrancy.
2235
The crate documentation contains more details on the [`CallFlags`](https://paritytech.github.io/ink/ink_env/struct.CallFlags.html).
2336
- **Note:** The default behavior of cross-contract calls now disallows reentering the calling contract.
24-
- ink! contract definitions via `#[ink::contract]`:
25-
- ink! smart contracts now generate two contract types. Given `MyContract`:
37+
- ink! contract definitions via `#[ink::contract]`[#665](https://github.com/paritytech/ink/pull/665).<br/>
38+
For ink! smart contracts we now generate two contract types. Given `MyContract`:
2639
- `MyContract` will still be the storage struct.
2740
However, it can now additionally be used as static dependency in other smart contracts.
2841
Static dependencies can be envisioned as being directly embedded into a smart contract.
2942
- `MyContractRef` is pretty much the same of what we had gotten with the old `ink-as-dependency`.
3043
It is a typed thin-wrapper around an `AccountId` that is mirroring the ink! smart contract's API
3144
and implemented traits.
32-
- ink! trait definitions via `#[ink::trait_definition]`:
45+
- ink! trait definitions via `#[ink::trait_definition]`[#665](https://github.com/paritytech/ink/pull/665).
3346
- ink! trait definitions no longer can define trait constructors.
3447
- ink! trait implementations now inherit `selector` and `payable` properties for trait messages.
3548
- Now explicitly setting `selector` or `payable` property for an implemented ink! trait method
3649
will only act as a guard that the set property is in fact the same as defined by the ink!
3750
trait definition.
38-
- Improved some ink! specific compile errors:
39-
- For example, when using ink! messages and constructors that have inputs or
40-
outputs that cannot be encoded or decoded using the SCALE codec.
41-
- Simplified selector computation for ink! trait methods.
51+
- Improved some ink! specific compile errors[#665](https://github.com/paritytech/ink/pull/665).
52+
- For example, when using ink! messages and constructors which have inputs (or
53+
outputs) that cannot be encoded (or decoded) using the SCALE codec.
54+
- Simplified selector computation for ink! trait methods[#665](https://github.com/paritytech/ink/pull/665).
4255
- Now selectors are encoded as `blake2b({namespace}::{trait_identifier}::{message_identifier})[0..4]`.
4356
If no `namespace` is set for the ink! trait definition then the formula is
4457
`blake2b({trait_identifier}::{message_identifier})[0..4]`.
4558
Where `trait_identifier` and `message_identifier` both refer to the identifiers of the ink! trait
4659
definition and ink! trait message respectively.
60+
- We switched to Rust edition 2021 ‒ [#977](https://github.com/paritytech/ink/pull/977).
61+
- Update chain extension example to show argument passing ‒ [#1029](https://github.com/paritytech/ink/pull/1029).
4762

4863
## Fixed
49-
- Contracts that are compiled as root (the default) now properly revert the transaction if a message
50-
returned `Result::Err`.
51-
- This does not apply to ink! smart contracts that are used as dependencies. Therefore it is still possible to match against a result return type for a called dependency.
64+
- Contracts now revert the transaction if an ink! message returns `Result::Err`[#975](https://github.com/paritytech/ink/pull/975), [#998](https://github.com/paritytech/ink/pull/998).
65+
- It is still possible to match against a `Result` return type for a called dependency contract
66+
‒ i.e. a sub-contract specified in the contract's `Cargo.toml`.
67+
- We implemented a number of Wasm contract size improvements:
68+
- Simple Mapping Storage Primitive ‒ [#946](https://github.com/paritytech/ink/pull/946).
69+
- Remove `always` from `inline` to allow compiler decide that to do ‒ [#1012](https://github.com/paritytech/ink/pull/1012) (thanks [@xgreenx](https://github.com/xgreenx)).
70+
- Add a way to allocate a storage facility using spread (and packed) layouts ‒ [#978](https://github.com/paritytech/ink/pull/978).
71+
- Extract non-generic part of `push_topic` to reduce code size ‒ [#1026](https://github.com/paritytech/ink/pull/1026).
5272

5373
# Version 3.0-rc6
5474

crates/allocator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_allocator"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

crates/engine/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_engine"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>", "Michael Müller <[email protected]>"]
55
edition = "2021"
66

crates/env/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_env"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_metadata = { version = "3.0.0-rc6", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
19-
ink_allocator = { version = "3.0.0-rc6", path = "../allocator/", default-features = false }
20-
ink_primitives = { version = "3.0.0-rc6", path = "../primitives/", default-features = false }
21-
ink_prelude = { version = "3.0.0-rc6", path = "../prelude/", default-features = false }
18+
ink_metadata = { version = "3.0.0-rc7", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
19+
ink_allocator = { version = "3.0.0-rc7", path = "../allocator/", default-features = false }
20+
ink_primitives = { version = "3.0.0-rc7", path = "../primitives/", default-features = false }
21+
ink_prelude = { version = "3.0.0-rc7", path = "../prelude/", default-features = false }
2222

2323
scale = { package = "parity-scale-codec", version = "2.3", default-features = false, features = ["derive", "full"] }
2424
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
@@ -32,7 +32,7 @@ static_assertions = "1.1"
3232
libsecp256k1 = { version = "0.7.0", default-features = false }
3333

3434
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
35-
ink_engine = { version = "3.0.0-rc6", path = "../engine/", default-features = false, optional = true }
35+
ink_engine = { version = "3.0.0-rc7", path = "../engine/", default-features = false, optional = true }
3636

3737
# Hashes for the off-chain environment.
3838
sha2 = { version = "0.9", optional = true }

crates/eth_compatibility/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_eth_compatibility"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_env = { version = "3.0.0-rc6", path = "../env", default-features = false }
18+
ink_env = { version = "3.0.0-rc7", path = "../env", default-features = false }
1919
libsecp256k1 = { version = "0.7.0", default-features = false }
2020

2121
[features]

crates/lang/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_env = { version = "3.0.0-rc6", path = "../env", default-features = false }
19-
ink_storage = { version = "3.0.0-rc6", path = "../storage", default-features = false }
20-
ink_primitives = { version = "3.0.0-rc6", path = "../primitives", default-features = false }
21-
ink_metadata = { version = "3.0.0-rc6", path = "../metadata", default-features = false, optional = true }
22-
ink_prelude = { version = "3.0.0-rc6", path = "../prelude", default-features = false }
23-
ink_eth_compatibility = { version = "3.0.0-rc6", path = "../eth_compatibility", default-features = false }
24-
ink_lang_macro = { version = "3.0.0-rc6", path = "macro", default-features = false }
18+
ink_env = { version = "3.0.0-rc7", path = "../env", default-features = false }
19+
ink_storage = { version = "3.0.0-rc7", path = "../storage", default-features = false }
20+
ink_primitives = { version = "3.0.0-rc7", path = "../primitives", default-features = false }
21+
ink_metadata = { version = "3.0.0-rc7", path = "../metadata", default-features = false, optional = true }
22+
ink_prelude = { version = "3.0.0-rc7", path = "../prelude", default-features = false }
23+
ink_eth_compatibility = { version = "3.0.0-rc7", path = "../eth_compatibility", default-features = false }
24+
ink_lang_macro = { version = "3.0.0-rc7", path = "macro", default-features = false }
2525

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

2929
[dev-dependencies]
30-
ink_lang_ir = { version = "3.0.0-rc6", path = "ir" }
31-
ink_metadata = { version = "3.0.0-rc6", default-features = false, path = "../metadata" }
30+
ink_lang_ir = { version = "3.0.0-rc7", path = "ir" }
31+
ink_metadata = { version = "3.0.0-rc7", default-features = false, path = "../metadata" }
3232

3333
trybuild = { version = "1.0.52", features = ["diff"] }
3434
# Required for the doctest of `env_access::EnvAccess::instantiate_contract`

crates/lang/codegen/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang_codegen"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

2020
[dependencies]
21-
ir = { version = "3.0.0-rc6", package = "ink_lang_ir", path = "../ir", default-features = false }
21+
ir = { version = "3.0.0-rc7", package = "ink_lang_ir", path = "../ir", default-features = false }
2222
quote = "1"
2323
syn = { version = "1.0", features = ["parsing", "full", "extra-traits"] }
2424
proc-macro2 = "1.0"

crates/lang/ir/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang_ir"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

crates/lang/macro/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang_macro"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_lang_ir = { version = "3.0.0-rc6", path = "../ir", default-features = false }
19-
ink_lang_codegen = { version = "3.0.0-rc6", path = "../codegen", default-features = false }
20-
ink_primitives = { version = "3.0.0-rc6", path = "../../primitives/", default-features = false }
18+
ink_lang_ir = { version = "3.0.0-rc7", path = "../ir", default-features = false }
19+
ink_lang_codegen = { version = "3.0.0-rc7", path = "../codegen", default-features = false }
20+
ink_primitives = { version = "3.0.0-rc7", path = "../../primitives/", default-features = false }
2121

2222
scale = { package = "parity-scale-codec", version = "2.3", default-features = false, features = ["derive"] }
2323
syn = "1"
2424
proc-macro2 = "1"
2525

2626
[dev-dependencies]
27-
ink_metadata = { version = "3.0.0-rc6", path = "../../metadata/" }
28-
ink_env = { version = "3.0.0-rc6", path = "../../env/" }
29-
ink_storage = { version = "3.0.0-rc6", path = "../../storage/" }
30-
ink_lang = { version = "3.0.0-rc6", path = ".." }
27+
ink_metadata = { version = "3.0.0-rc7", path = "../../metadata/" }
28+
ink_env = { version = "3.0.0-rc7", path = "../../env/" }
29+
ink_storage = { version = "3.0.0-rc7", path = "../../storage/" }
30+
ink_lang = { version = "3.0.0-rc7", path = ".." }
3131
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
3232

3333
[lib]

crates/metadata/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_metadata"
3-
version = "3.0.0-rc6"
3+
version = "3.0.0-rc7"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_prelude = { version = "3.0.0-rc6", path = "../prelude/", default-features = false }
19-
ink_primitives = { version = "3.0.0-rc6", path = "../primitives/", default-features = false }
18+
ink_prelude = { version = "3.0.0-rc7", path = "../prelude/", default-features = false }
19+
ink_primitives = { version = "3.0.0-rc7", path = "../primitives/", default-features = false }
2020

2121
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
2222
impl-serde = "0.3.1"

0 commit comments

Comments
 (0)