Skip to content

Commit 84d1158

Browse files
authored
Release 5.1.1 (#2337)
* Bump version to 5.1.1 * Fix port passing from node process (#2336) * Have port parsing handle comma-separated list * Update changelog
1 parent f46dbad commit 84d1158

File tree

68 files changed

+146
-107
lines changed

Some content is hidden

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

68 files changed

+146
-107
lines changed

CHANGELOG.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
[Unreleased]
8+
9+
## Version 5.1.1
10+
11+
## Fixed
12+
- [E2E] Have port parsing handle comma-separated list ‒ [#2336](https://github.com/use-ink/ink/pull/2336)
13+
714
## Version 5.1.0
815

916
This is the first ink! release outside of Parity. ink! was started at Parity and
@@ -32,13 +39,13 @@ to cross-contract calls, but can now execute cross-parachain calls.
3239
We added a contract example that demonstrates the usage:
3340
[`contract-xcm`](https://github.com/use-ink/ink-examples/tree/main/contract-xcm)
3441

35-
We also added a new page on our documentation website:
42+
We also added a new page on our documentation website:
3643
[https://use.ink/basics/xcm](https://use.ink/basics/xcm).
3744

3845
You can view the Rust docs of the two functions here:
3946

40-
* [`xcm_send`](https://docs.rs/ink_env/5.1.0/ink_env/fn.xcm_send.html)
41-
* [`xcm_execute`](https://docs.rs/ink_env/5.1.0/ink_env/fn.xcm_execute.html)
47+
* [`xcm_send`](https://docs.rs/ink_env/5.1.1/ink_env/fn.xcm_send.html)
48+
* [`xcm_execute`](https://docs.rs/ink_env/5.1.1/ink_env/fn.xcm_execute.html)
4249

4350
#### (2) Call an ink! contract from a `polkadot-sdk` runtime
4451

Cargo.lock

+16-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+14-14
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ homepage = "https://use.ink"
3030
keywords = ["wasm", "ink", "webassembly", "blockchain", "edsl"]
3131
license = "Apache-2.0"
3232
repository = "https://github.com/use-ink/ink"
33-
version = "5.1.0"
33+
version = "5.1.1"
3434

3535
[workspace.dependencies]
3636
arrayref = { version = "0.3" }
@@ -102,19 +102,19 @@ sp-weights = { version = "31.0.0", default-features = false }
102102
xcm = { package = "staging-xcm", version = "11.0.0", default-features = false }
103103

104104
# Local dependencies
105-
ink = { version = "=5.1.0", path = "crates/ink", default-features = false }
106-
ink_allocator = { version = "=5.1.0", path = "crates/allocator", default-features = false }
107-
ink_codegen = { version = "=5.1.0", path = "crates/ink/codegen", default-features = false }
108-
ink_e2e_macro = { version = "=5.1.0", path = "crates/e2e/macro", default-features = false }
109-
ink_engine = { version = "=5.1.0", path = "crates/engine", default-features = false }
110-
ink_env = { version = "=5.1.0", path = "crates/env", default-features = false }
111-
ink_ir = { version = "=5.1.0", path = "crates/ink/ir", default-features = false }
112-
ink_macro = { version = "=5.1.0", path = "crates/ink/macro", default-features = false }
113-
ink_metadata = { version = "=5.1.0", path = "crates/metadata", default-features = false }
114-
ink_prelude = { version = "=5.1.0", path = "crates/prelude", default-features = false }
115-
ink_primitives = { version = "=5.1.0", path = "crates/primitives", default-features = false }
116-
ink_storage = { version = "=5.1.0", path = "crates/storage", default-features = false }
117-
ink_storage_traits = { version = "=5.1.0", path = "crates/storage/traits", default-features = false }
105+
ink = { version = "=5.1.1", path = "crates/ink", default-features = false }
106+
ink_allocator = { version = "=5.1.1", path = "crates/allocator", default-features = false }
107+
ink_codegen = { version = "=5.1.1", path = "crates/ink/codegen", default-features = false }
108+
ink_e2e_macro = { version = "=5.1.1", path = "crates/e2e/macro", default-features = false }
109+
ink_engine = { version = "=5.1.1", path = "crates/engine", default-features = false }
110+
ink_env = { version = "=5.1.1", path = "crates/env", default-features = false }
111+
ink_ir = { version = "=5.1.1", path = "crates/ink/ir", default-features = false }
112+
ink_macro = { version = "=5.1.1", path = "crates/ink/macro", default-features = false }
113+
ink_metadata = { version = "=5.1.1", path = "crates/metadata", default-features = false }
114+
ink_prelude = { version = "=5.1.1", path = "crates/prelude", default-features = false }
115+
ink_primitives = { version = "=5.1.1", path = "crates/primitives", default-features = false }
116+
ink_storage = { version = "=5.1.1", path = "crates/storage", default-features = false }
117+
ink_storage_traits = { version = "=5.1.1", path = "crates/storage/traits", default-features = false }
118118

119119
[profile.release]
120120
panic = "abort"

crates/e2e/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ink_primitives = { workspace = true, default-features = true }
2222

2323
cargo_metadata = { workspace = true }
2424
contract-build = { workspace = true }
25-
ink_sandbox = { version = "=5.1.0", path = "./sandbox", optional = true }
25+
ink_sandbox = { version = "=5.1.1", path = "./sandbox", optional = true }
2626
pallet-contracts-mock-network = { workspace = true, optional = true }
2727
funty = { workspace = true }
2828
impl-serde = { workspace = true }
@@ -47,6 +47,7 @@ sp-core = { workspace = true }
4747
sp-keyring = { workspace = true }
4848
sp-runtime = { workspace = true }
4949
sp-weights = { workspace = true }
50+
regex = "1.11.1"
5051

5152
[dev-dependencies]
5253
# Required for the doctest of `MessageBuilder::call`

crates/e2e/sandbox/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_sandbox"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>", "Cardinal Cryptography"]
55
edition.workspace = true
66
license.workspace = true

crates/e2e/src/node_proc.rs

+32-2
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,17 @@ fn find_substrate_port_from_output(r: impl Read + Send + 'static) -> u16 {
212212
.or_else(|| line.rsplit_once("Running JSON-RPC server: addr=127.0.0.1:"))
213213
.map(|(_, port_str)| port_str)?;
214214

215-
// trim non-numeric chars from the end of the port part of the line.
216-
let port_str = line_end.trim_end_matches(|b: char| !b.is_ascii_digit());
215+
// match the first group of digits
216+
let re = regex::Regex::new(r"^\d+").expect("regex creation failed");
217+
let port_capture = re
218+
.captures(line_end)
219+
.unwrap_or_else(|| panic!("unable to extract port from '{}'", line_end));
220+
assert!(
221+
port_capture.len() == 1,
222+
"captured more than one port from '{}'",
223+
line_end
224+
);
225+
let port_str = &port_capture[0];
217226

218227
// expect to have a number here (the chars after '127.0.0.1:') and parse them
219228
// into a u16.
@@ -269,4 +278,25 @@ mod tests {
269278
assert!(res1.is_err());
270279
assert!(res2.is_err());
271280
}
281+
282+
#[test]
283+
fn parse_port_from_node_output() {
284+
let log = "2024-12-04 10:57:03.893 INFO main sc_rpc_server: Running JSON-RPC server: addr=127.0.0.1:9944,[::1]:9944 ";
285+
let port = find_substrate_port_from_output(log.as_bytes());
286+
assert_eq!(port, 9944);
287+
288+
let log = "2024-12-04 10:57:03.893 INFO main sc_rpc_server: Running JSON-RPC server: addr=127.0.0.1:9944 ";
289+
let port = find_substrate_port_from_output(log.as_bytes());
290+
assert_eq!(port, 9944);
291+
292+
let log = r#"2024-12-04 11:02:24.637 INFO main sc_cli::runner: 👤 Role: AUTHORITY
293+
2024-12-04 11:02:24.637 INFO main sc_cli::runner: 💾 Database: RocksDb at /var/folders/s5/5gcp8ck95k39z006fj059_0c0000gn/T/substrateHZoRbb/chains/dev/db/full
294+
2024-12-04 11:02:25.324 WARN main sc_service::config: Using default protocol ID "sup" because none is configured in the chain specs
295+
2024-12-04 11:02:25.327 INFO main sc_rpc_server: Running JSON-RPC server: addr=127.0.0.1:9944,[::1]:9944
296+
2024-12-04 11:02:24.637 INFO main sc_cli::runner: 💾 Database: RocksDb at /var/folders/s5/5gcp8ck95k39z006fj059_0c0000gn/T/substrateHZoRbb/chains/dev/db/full
297+
2024-12-04 11:02:24.637 INFO main sc_cli::runner: 💾 Database: RocksDb at /var/folders/s5/5gcp8ck95k39z006fj059_0c0000gn/T/substrateHZoRbb/chains/dev/db/full
298+
"#;
299+
let port = find_substrate_port_from_output(log.as_bytes());
300+
assert_eq!(port, 9944);
301+
}
272302
}

crates/ink/codegen/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ name = "ink_codegen"
1919

2020
[dependencies]
2121
ink_primitives = { workspace = true }
22-
ir = { version = "=5.1.0", package = "ink_ir", path = "../ir", default-features = false }
22+
ir = { version = "=5.1.1", package = "ink_ir", path = "../ir", default-features = false }
2323
quote = { workspace = true }
2424
syn = { workspace = true, features = ["parsing", "full", "extra-traits"] }
2525
proc-macro2 = { workspace = true }

integration-tests/internal/call-builder-return-value/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "call_builder_return_value"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/internal/e2e-runtime-only-backend/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "e2e-runtime-only-backend"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/internal/lang-err/call-builder-delegate/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "call_builder_delegate"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/internal/lang-err/call-builder/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "call_builder"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/internal/lang-err/constructors-return-value/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "constructors_return_value"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/internal/lang-err/contract-ref/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contract_ref"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66

integration-tests/internal/lang-err/integration-flipper/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "integration_flipper"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/internal/mother/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "mother"
33
description = "Mother of all contracts"
4-
version = "5.1.0"
4+
version = "5.1.1"
55
authors = ["Use Ink <[email protected]>"]
66
edition = "2021"
77
publish = false

integration-tests/internal/sr25519-verification/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sr25519_verification"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/internal/storage-types/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "storage-types"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/public/call-runtime/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "call-runtime"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/public/combined-extension/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "combined_extension"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66
publish = false

integration-tests/public/conditional-compilation/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "conditional-compilation"
3-
version = "5.1.0"
3+
version = "5.1.1"
44
authors = ["Use Ink <[email protected]>"]
55
edition = "2021"
66

0 commit comments

Comments
 (0)