Skip to content

Commit

Permalink
Release v4.2.1 (use-ink#1808)
Browse files Browse the repository at this point in the history
* Merge pull request from GHSA-853p-5678-hv8f

* Handle `LangError` from `DelegateCall`

* Add basic delegate E2E test

* Get test working with integration flipper

* Use `incrementer` for test instead

* Add tests to make sure that `LangError`s can be handled

* Get rid of references to the interation Flipper

* Bump version numbers to `4.2.1`

* Add `CHANGELOG` entry

Add more info to the `CHANGELOG`

* Fix doc test related to delegate call (use-ink#1809)

* Mention extra `Result` return type

* Try using old CI image

* Bump codec version in UI tests

* Add German's CHANGELOG suggestion
  • Loading branch information
HCastano authored and goastler committed Aug 31, 2023
1 parent 77044d2 commit bc3d921
Show file tree
Hide file tree
Showing 54 changed files with 185 additions and 126 deletions.
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ variables:
GIT_DEPTH: 100
CARGO_INCREMENTAL: 0
CARGO_TARGET_DIR: "/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
CI_IMAGE: "paritytech/ci-unified:bullseye-1.71.0-2023-05-23"
# CI_IMAGE is changed to "-:staging" when the CI image gets rebuilt
# read more https://github.com/paritytech/scripts/pull/244
CI_IMAGE: "paritytech/ink-ci-linux:a1f03f4b-20230420"
PURELY_STD_CRATES: "ink/codegen metadata engine e2e e2e/macro ink/ir"
ALSO_WASM_CRATES: "env storage storage/traits allocator prelude primitives ink ink/macro"
ALL_CRATES: "${PURELY_STD_CRATES} ${ALSO_WASM_CRATES}"
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- E2E: improve call API, remove `build_message` + callback - [#1782](https://github.com/paritytech/ink/pull/1782)

## Version 4.2.1

This release contains a low-severity security related fix. Users of the `4.x` series of
releases are advised to update.

Note that this release contains a breaking change since the API of
`ink_env::invoke_contract_delegate` and `CallBuilder::try_invoke` now return an extra
`ink_primitives::MessageResult` which must be handled.

We decided to release this breaking change as a `PATCH` release to ensure that affected
users are upgrading to the fixed API.

See the [published advisory](https://github.com/paritytech/ink/security/advisories/GHSA-853p-5678-hv8f)
for more info.

### Fixed
- Handle `LangError` from `DelegateCall`

## Version 4.2.0

### Added
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.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true

Expand Down
14 changes: 7 additions & 7 deletions crates/e2e/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "ink_e2e"
version.workspace = true
authors.workspace = true
edition.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

license.workspace = true
readme = "README.md"
Expand All @@ -15,10 +15,10 @@ categories.workspace = true
include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]

[dependencies]
ink_e2e_macro = { workspace = true, default-features = true }
ink = { workspace = true, default-features = true }
ink_env = { workspace = true, default-features = true }
ink_primitives = { workspace = true, default-features = true }
ink_e2e_macro = { version = "4.2.1", path = "./macro" }
ink = { version = "4.2.1", path = "../ink" }
ink_env = { version = "4.2.1", path = "../env" }
ink_primitives = { version = "4.2.1", path = "../primitives" }

funty = { workspace = true }
impl-serde = { workspace = true }
Expand Down
27 changes: 14 additions & 13 deletions crates/e2e/macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "ink_e2e_macro"
version.workspace = true
authors.workspace = true
edition.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

license.workspace = true
readme = "../README.md"
Expand All @@ -19,13 +19,14 @@ name = "ink_e2e_macro"
proc-macro = true

[dependencies]
ink_ir = { workspace = true, default-features = true }
cargo_metadata = { workspace = true }
contract-build = { workspace = true }
derive_more = { workspace = true, default-features = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
serde_json = { workspace = true }
syn = { workspace = true }
proc-macro2 = { workspace = true }
quote = { workspace = true }
which = { workspace = true }
ink_ir = { version = "4.2.1", path = "../../ink/ir" }
cargo_metadata = "0.15.3"
contract-build = "2.0.2"
derive_more = "0.99.17"
env_logger = "0.10.0"
log = "0.4.17"
serde_json = "1.0.89"
syn = "2"
proc-macro2 = "1"
quote = "1"
which = "4.4.0"
8 changes: 4 additions & 4 deletions crates/engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_engine"
version.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Michael Müller <michi@parity.io>"]
edition.workspace = true

Expand All @@ -15,9 +15,9 @@ categories.workspace = true
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_primitives = { workspace = true }
scale = { package = "parity-scale-codec", workspace = true }
derive_more = { workspace = true, features = ["from", "display"] }
ink_primitives = { version = "4.2.1", path = "../../crates/primitives", default-features = false }
scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }

sha2 = { workspace = true }
sha3 = { workspace = true }
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.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true
rust-version = "1.68"
Expand All @@ -16,10 +16,10 @@ categories.workspace = true
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_allocator = { workspace = true }
ink_storage_traits = { workspace = true }
ink_prelude = { workspace = true }
ink_primitives = { workspace = true }
ink_allocator = { version = "4.2.1", path = "../allocator", default-features = false }
ink_storage_traits = { version = "4.2.1", path = "../storage/traits", default-features = false }
ink_prelude = { version = "4.2.1", path = "../prelude", default-features = false }
ink_primitives = { version = "4.2.1", path = "../primitives", default-features = false }

scale = { package = "parity-scale-codec", workspace = true }
derive_more = { workspace = true, features = ["from", "display"] }
Expand All @@ -33,7 +33,7 @@ static_assertions = { workspace = true }
rlibc = "1"

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

# Hashes for the off-chain environment.
sha2 = { workspace = true, optional = true }
Expand Down
14 changes: 7 additions & 7 deletions crates/ink/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink"
version.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true
rust-version = "1.63"
Expand All @@ -16,12 +16,12 @@ categories.workspace = true
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_env = { workspace = true }
ink_storage = { workspace = true }
ink_primitives = { workspace = true }
ink_metadata = { workspace = true, optional = true }
ink_prelude = { workspace = true }
ink_macro = { workspace = true }
ink_env = { version = "4.2.1", path = "../env", default-features = false }
ink_storage = { version = "4.2.1", path = "../storage", default-features = false }
ink_primitives = { version = "4.2.1", path = "../primitives", default-features = false }
ink_metadata = { version = "4.2.1", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "4.2.1", path = "../prelude", default-features = false }
ink_macro = { version = "4.2.1", path = "macro", default-features = false }

scale = { package = "parity-scale-codec", workspace = true }
derive_more = { workspace = true, features = ["from"] }
Expand Down
26 changes: 13 additions & 13 deletions crates/ink/codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_codegen"
version.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true

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

[dependencies]
ink_primitives = { workspace = true }
ir = { version = "=4.2.0", package = "ink_ir", path = "../ir", default-features = false }
quote = { workspace = true }
syn = { workspace = true, features = ["parsing", "full", "extra-traits"] }
proc-macro2 = { workspace = true }
derive_more = { workspace = true, features = ["from"] }
itertools = { workspace = true }
either = { workspace = true }
blake2 = { workspace = true }
heck = { workspace = true }
scale = { package = "parity-scale-codec", workspace = true }
impl-serde = { workspace = true, default-features = true }
ink_primitives = { version = "4.2.1", path = "../../primitives" }
ir = { version = "4.2.1", package = "ink_ir", path = "../ir", default-features = false }
quote = "1"
syn = { version = "2.0", features = ["parsing", "full", "extra-traits"] }
proc-macro2 = "1.0"
derive_more = { version = "0.99", default-features = false, features = ["from"] }
itertools = "0.10"
either = { version = "1.5", default-features = false }
blake2 = "0.10"
heck = "0.4.0"
scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] }
impl-serde = "0.4.0"

serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/ink/ir/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_ir"
version.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true

Expand Down
8 changes: 4 additions & 4 deletions crates/ink/macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_macro"
version.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true

Expand All @@ -15,9 +15,9 @@ categories.workspace = true
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_ir = { workspace = true }
ink_codegen = { workspace = true }
ink_primitives = { workspace = true }
ink_ir = { version = "4.2.1", path = "../ir", default-features = false }
ink_codegen = { version = "4.2.1", path = "../codegen", default-features = false }
ink_primitives = { version = "4.2.1", path = "../../primitives/", default-features = false }

scale = { package = "parity-scale-codec", workspace = true }
syn = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ error[E0599]: the method `try_invoke` exists for struct `CallBuilder<DefaultEnvi
= note: the following trait bounds were not satisfied:
`NonCodecType: parity_scale_codec::Decode`
note: the trait `parity_scale_codec::Decode` must be implemented
--> $CARGO/parity-scale-codec-3.6.4/src/codec.rs
--> $CARGO/parity-scale-codec-3.5.0/src/codec.rs
|
| pub trait Decode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ error[E0599]: the method `try_invoke` exists for struct `CallBuilder<E, Set<Call
= note: the following trait bounds were not satisfied:
`NonCodec: parity_scale_codec::Decode`
note: the trait `parity_scale_codec::Decode` must be implemented
--> $CARGO/parity-scale-codec-3.6.4/src/codec.rs
--> $CARGO/parity-scale-codec-3.5.0/src/codec.rs
|
| pub trait Decode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^
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.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true

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

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

serde = { workspace = true, features = ["derive", "alloc"] }
impl-serde = { workspace = true, default-features = true }
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.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true

Expand Down
16 changes: 8 additions & 8 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_primitives"
version.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true

Expand All @@ -15,13 +15,13 @@ categories.workspace = true
include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]

[dependencies]
derive_more = { workspace = true, features = ["from", "display"] }
ink_prelude = { workspace = true }
scale = { package = "parity-scale-codec", workspace = true }
scale-decode = { workspace = true, features = ["derive"], optional = true }
scale-encode = { workspace = true, features = ["derive"], optional = true }
scale-info = { workspace = true, features = ["derive"], optional = true }
xxhash-rust = { workspace = true, features = ["const_xxh32"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
ink_prelude = { version = "4.2.1", path = "../prelude/", default-features = false }
scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] }
scale-decode = { version = "0.5.0", default-features = false, features = ["derive"], optional = true }
scale-encode = { version = "0.1.0", default-features = false, features = ["derive"], optional = true }
scale-info = { version = "2.5", default-features = false, features = ["derive"], optional = true }
xxhash-rust = { version = "0.8", features = ["const_xxh32"] }

[features]
default = ["std"]
Expand Down
12 changes: 6 additions & 6 deletions crates/storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_storage"
version.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition.workspace = true

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

[dependencies]
ink_env = { workspace = true }
ink_metadata = { workspace = true, optional = true }
ink_primitives = { workspace = true }
ink_storage_traits = { workspace = true }
ink_prelude = { workspace = true }
ink_env = { version = "4.2.1", path = "../env/", default-features = false }
ink_metadata = { version = "4.2.1", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "4.2.1", path = "../primitives/", default-features = false }
ink_storage_traits = { version = "4.2.1", path = "traits", default-features = false }
ink_prelude = { version = "4.2.1", path = "../prelude/", default-features = false }

scale = { package = "parity-scale-codec", workspace = true }
derive_more = { workspace = true, features = ["from", "display"] }
Expand Down
16 changes: 8 additions & 8 deletions crates/storage/traits/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "ink_storage_traits"
version.workspace = true
authors.workspace = true
edition.workspace = true
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

license.workspace = true
readme = "../README.md"
Expand All @@ -15,11 +15,11 @@ categories.workspace = true
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_metadata = { workspace = true, features = ["derive"], optional = true }
ink_primitives = { workspace = true }
ink_prelude = { workspace = true }
scale = { package = "parity-scale-codec", workspace = true }
scale-info = { workspace = true, features = ["derive"], optional = true }
ink_metadata = { version = "4.2.1", path = "../../metadata", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "4.2.1", path = "../../primitives", default-features = false }
ink_prelude = { version = "4.2.1", path = "../../prelude", default-features = false }
scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] }
scale-info = { version = "2.5", default-features = false, features = ["derive"], optional = true }

[dev-dependencies]
paste = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/basic-contract-caller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "basic-contract-caller"
version = "4.2.0"
name = "basic_contract_caller"
version = "4.2.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
Loading

0 comments on commit bc3d921

Please sign in to comment.