Skip to content

Commit 96ef338

Browse files
HCastanocmichi
andauthored
Release v4.0.0-alpha.1 (#1363)
* Add release notes for `v4.0.0-alpha.1` * Mention breaking changes in changelog * Bump version to `4.0.0-alpha.1` * Fix header levels after merge * Fix some formatting * Add some notes about the breaking changes * Add links to PRs * Add note about linting move * Bump `ink_linting` crate to `4.0.0-alpha.1` * Remove `nightly` usage from delegator build script * Use dashes instead of minus signs Co-authored-by: Michael Müller <mich@elmueller.net> * Beef up description of linter PR Co-authored-by: Michael Müller <mich@elmueller.net> * Move compatibility section to top of release notes * Explicitly use `stable` channel Our Docker images still default to `nightly` * Build contracts with `stable` toolchain * Install `rust-src` component before building examples * Run the rest of the CI stages again Co-authored-by: Michael Müller <mich@elmueller.net>
1 parent 147e04b commit 96ef338

File tree

41 files changed

+114
-93
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+114
-93
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,19 +354,20 @@ examples-contract-build:
354354
<<: *docker-env
355355
<<: *test-refs
356356
script:
357+
- rustup component add rust-src --toolchain stable
357358
- cargo install --git https://github.com/paritytech/cargo-contract.git --branch hc-versioned-metadata --force
358359
- cargo contract -V
359360
- for example in examples/*/; do
360361
if [ "$example" = "examples/upgradeable-contracts/" ]; then continue; fi;
361362
pushd $example &&
362-
cargo contract build &&
363+
cargo +stable contract build &&
363364
popd;
364365
done
365366
- pushd ./examples/delegator/ && ./build-all.sh && popd
366367
- for contract in ${UPGRADEABLE_CONTRACTS}; do
367-
cargo contract build --manifest-path ./examples/upgradeable-contracts/${contract}/Cargo.toml;
368+
cargo +stable contract build --manifest-path ./examples/upgradeable-contracts/${contract}/Cargo.toml;
368369
done
369-
- cargo contract build --manifest-path ./examples/upgradeable-contracts/delegate-calls/upgradeable-flipper/Cargo.toml
370+
- cargo +stable contract build --manifest-path ./examples/upgradeable-contracts/delegate-calls/upgradeable-flipper/Cargo.toml
370371

371372
examples-docs:
372373
stage: examples

CHANGELOG.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
There are a number of backwards incompatible changes which are on the `master` branch
10-
waiting to be released. These are:
11-
12-
- Add Mapping::contains(key) and Mapping::insert_return_size(key, val) ‒ [#1224](https://github.com/paritytech/ink/pull/1224)
13-
- Optimise deny_payment. Use everywhere semantic of deny ‒ [#1267](https://github.com/paritytech/ink/pull/1267)
14-
- Implement ecdsa_to_eth_address() and remove eth_compatibility crate ‒ [#1233](https://github.com/paritytech/ink/pull/1233)
15-
- The `rand-extension` example has been adapted to an updated version of the `ChainExtension` API ‒ [#1356](https://github.com/paritytech/ink/pull/1356)
9+
## Version 4.0.0-alpha.1
1610

1711
### Compatibility
18-
1912
We recommend using a version of the [`pallet-contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts)
2013
later than [6b85535](https://github.com/paritytech/substrate/tree/6b8553511112afd5ae7e8e6877dc2f467850f155)
2114
(Aug 12, 2022) in your node.
2215

2316
The compatibility issues will be with `ChainExtension`'s and the functions mentioned above.
2417

18+
### Breaking Changes
19+
This release contains a few breaking changes. These are indicated with the :x: emoji.
20+
Most of these were intitially introduced in `v3.1.0` and `v3.2.0` releases but
21+
compatibility was restored in `v3.3.0`.
22+
23+
- As part of [#1224](https://github.com/paritytech/ink/pull/1224) the return type of `ink_env::set_contract_storage()` was changed to
24+
return an `Option<u32>` instead of `()`.
25+
- As part of [#1233](https://github.com/paritytech/ink/pull/1233) the `eth_compatibility` crate was removed. The
26+
`ecdsa_to_eth_address()` function from it can now be found in the `ink_env` crate.
27+
- As part of [#1267](https://github.com/paritytech/ink/pull/1267) an argument to `ink_lang::codegen::execute_constructor()` (which is
28+
used internally by the ink! macros) was removed.
29+
- As part of [#1313](https://github.com/paritytech/ink/pull/1313) the ink! ABI was changed so that the version was specified using a
30+
dedicated `version` key instead of an implicit key which wrapped the entire ABI.
31+
32+
### Added
33+
- :x: Add `Mapping::contains(key)` and `Mapping::insert_return_size(key, val)`[#1224](https://github.com/paritytech/ink/pull/1224)
34+
- Add [`payment-channel`](https://github.com/paritytech/ink/tree/master/examples/payment-channel) example ‒ [#1248](https://github.com/paritytech/ink/pull/1248)
35+
- :x: Add `version` field to ink! metadata ‒ [#1313](https://github.com/paritytech/ink/pull/1313)
36+
- The `rand-extension` example has been adapted to an updated version of the `ChainExtension` API ‒ [#1356](https://github.com/paritytech/ink/pull/1356)
37+
38+
### Changed
39+
- :x: Contract size optimization in case contract doesn't accept payment ‒ [#1267](https://github.com/paritytech/ink/pull/1267) (thanks [@xgreenx](https://github.com/xgreenx)).
40+
- Move ink! linter into `ink` repository ‒ [#1361](https://github.com/paritytech/ink/pull/1267)
41+
42+
### Removed
43+
- :x: Implement ecdsa_to_eth_address() and remove eth_compatibility crate ‒ [#1233](https://github.com/paritytech/ink/pull/1233)
44+
2545
## Version 3.3.1
2646

2747
At the moment teams which use both Substrate and ink! in the same codebase are

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 = "4.0.0"
3+
version = "4.0.0-alpha.1"
44
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
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 = "4.0.0"
3+
version = "4.0.0-alpha.1"
44
authors = ["Parity Technologies <admin@parity.io>", "Michael Müller <michi@parity.io>"]
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 = "4.0.0"
3+
version = "4.0.0-alpha.1"
44
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
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 = "4.0.0", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
19-
ink_allocator = { version = "4.0.0", path = "../allocator/", default-features = false }
20-
ink_primitives = { version = "4.0.0", path = "../primitives/", default-features = false }
21-
ink_prelude = { version = "4.0.0", path = "../prelude/", default-features = false }
18+
ink_metadata = { version = "4.0.0-alpha.1", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
19+
ink_allocator = { version = "4.0.0-alpha.1", path = "../allocator/", default-features = false }
20+
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives/", default-features = false }
21+
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude/", default-features = false }
2222

2323
scale = { package = "parity-scale-codec", version = "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
rlibc = "1"
3333

3434
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
35-
ink_engine = { version = "4.0.0", path = "../engine/", optional = true }
35+
ink_engine = { version = "4.0.0-alpha.1", path = "../engine/", optional = true }
3636

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

crates/lang/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang"
3-
version = "4.0.0"
3+
version = "4.0.0-alpha.1"
44
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
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_env = { version = "4.0.0", path = "../env", default-features = false }
19-
ink_storage = { version = "4.0.0", path = "../storage", default-features = false }
20-
ink_primitives = { version = "4.0.0", path = "../primitives", default-features = false }
21-
ink_metadata = { version = "4.0.0", path = "../metadata", default-features = false, optional = true }
22-
ink_prelude = { version = "4.0.0", path = "../prelude", default-features = false }
23-
ink_lang_macro = { version = "4.0.0", path = "macro", default-features = false }
18+
ink_env = { version = "4.0.0-alpha.1", path = "../env", default-features = false }
19+
ink_storage = { version = "4.0.0-alpha.1", path = "../storage", default-features = false }
20+
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives", default-features = false }
21+
ink_metadata = { version = "4.0.0-alpha.1", path = "../metadata", default-features = false, optional = true }
22+
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude", default-features = false }
23+
ink_lang_macro = { version = "4.0.0-alpha.1", path = "macro", default-features = false }
2424

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

2828
[dev-dependencies]
29-
ink_lang_ir = { version = "4.0.0", path = "ir" }
30-
ink_metadata = { version = "4.0.0", default-features = false, path = "../metadata" }
29+
ink_lang_ir = { version = "4.0.0-alpha.1", path = "ir" }
30+
ink_metadata = { version = "4.0.0-alpha.1", default-features = false, path = "../metadata" }
3131

3232
trybuild = { version = "1.0.60", features = ["diff"] }
3333
# 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 = "4.0.0"
3+
version = "4.0.0-alpha.1"
44
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
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 = "4.0.0", package = "ink_lang_ir", path = "../ir", default-features = false }
21+
ir = { version = "4.0.0-alpha.1", 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 = "4.0.0"
3+
version = "4.0.0-alpha.1"
44
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
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 = "4.0.0"
3+
version = "4.0.0-alpha.1"
44
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
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 = "4.0.0", path = "../ir", default-features = false }
19-
ink_lang_codegen = { version = "4.0.0", path = "../codegen", default-features = false }
20-
ink_primitives = { version = "4.0.0", path = "../../primitives/", default-features = false }
18+
ink_lang_ir = { version = "4.0.0-alpha.1", path = "../ir", default-features = false }
19+
ink_lang_codegen = { version = "4.0.0-alpha.1", path = "../codegen", default-features = false }
20+
ink_primitives = { version = "4.0.0-alpha.1", path = "../../primitives/", default-features = false }
2121

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

2626
[dev-dependencies]
27-
ink_metadata = { version = "4.0.0", path = "../../metadata/" }
28-
ink_env = { version = "4.0.0", path = "../../env/" }
29-
ink_storage = { version = "4.0.0", path = "../../storage/" }
30-
ink_lang = { version = "4.0.0", path = ".." }
27+
ink_metadata = { version = "4.0.0-alpha.1", path = "../../metadata/" }
28+
ink_env = { version = "4.0.0-alpha.1", path = "../../env/" }
29+
ink_storage = { version = "4.0.0-alpha.1", path = "../../storage/" }
30+
ink_lang = { version = "4.0.0-alpha.1", path = ".." }
3131
scale-info = { version = "2", 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 = "4.0.0"
3+
version = "4.0.0-alpha.1"
44
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
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 = "4.0.0", path = "../prelude/", default-features = false }
19-
ink_primitives = { version = "4.0.0", path = "../primitives/", default-features = false }
18+
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude/", default-features = false }
19+
ink_primitives = { version = "4.0.0-alpha.1", 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)