Skip to content

Commit

Permalink
Release 5.1.1 (#2337)
Browse files Browse the repository at this point in the history
* Bump version to 5.1.1

* Fix port passing from node process (#2336)

* Have port parsing handle comma-separated list

* Update changelog
  • Loading branch information
cmichi authored Dec 4, 2024
1 parent f46dbad commit 84d1158
Show file tree
Hide file tree
Showing 68 changed files with 146 additions and 107 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[Unreleased]

## Version 5.1.1

## Fixed
- [E2E] Have port parsing handle comma-separated list ‒ [#2336](https://github.com/use-ink/ink/pull/2336)

## Version 5.1.0

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

We also added a new page on our documentation website:
We also added a new page on our documentation website:
[https://use.ink/basics/xcm](https://use.ink/basics/xcm).

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

* [`xcm_send`](https://docs.rs/ink_env/5.1.0/ink_env/fn.xcm_send.html)
* [`xcm_execute`](https://docs.rs/ink_env/5.1.0/ink_env/fn.xcm_execute.html)
* [`xcm_send`](https://docs.rs/ink_env/5.1.1/ink_env/fn.xcm_send.html)
* [`xcm_execute`](https://docs.rs/ink_env/5.1.1/ink_env/fn.xcm_execute.html)

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

Expand Down
31 changes: 16 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ homepage = "https://use.ink"
keywords = ["wasm", "ink", "webassembly", "blockchain", "edsl"]
license = "Apache-2.0"
repository = "https://github.com/use-ink/ink"
version = "5.1.0"
version = "5.1.1"

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

# Local dependencies
ink = { version = "=5.1.0", path = "crates/ink", default-features = false }
ink_allocator = { version = "=5.1.0", path = "crates/allocator", default-features = false }
ink_codegen = { version = "=5.1.0", path = "crates/ink/codegen", default-features = false }
ink_e2e_macro = { version = "=5.1.0", path = "crates/e2e/macro", default-features = false }
ink_engine = { version = "=5.1.0", path = "crates/engine", default-features = false }
ink_env = { version = "=5.1.0", path = "crates/env", default-features = false }
ink_ir = { version = "=5.1.0", path = "crates/ink/ir", default-features = false }
ink_macro = { version = "=5.1.0", path = "crates/ink/macro", default-features = false }
ink_metadata = { version = "=5.1.0", path = "crates/metadata", default-features = false }
ink_prelude = { version = "=5.1.0", path = "crates/prelude", default-features = false }
ink_primitives = { version = "=5.1.0", path = "crates/primitives", default-features = false }
ink_storage = { version = "=5.1.0", path = "crates/storage", default-features = false }
ink_storage_traits = { version = "=5.1.0", path = "crates/storage/traits", default-features = false }
ink = { version = "=5.1.1", path = "crates/ink", default-features = false }
ink_allocator = { version = "=5.1.1", path = "crates/allocator", default-features = false }
ink_codegen = { version = "=5.1.1", path = "crates/ink/codegen", default-features = false }
ink_e2e_macro = { version = "=5.1.1", path = "crates/e2e/macro", default-features = false }
ink_engine = { version = "=5.1.1", path = "crates/engine", default-features = false }
ink_env = { version = "=5.1.1", path = "crates/env", default-features = false }
ink_ir = { version = "=5.1.1", path = "crates/ink/ir", default-features = false }
ink_macro = { version = "=5.1.1", path = "crates/ink/macro", default-features = false }
ink_metadata = { version = "=5.1.1", path = "crates/metadata", default-features = false }
ink_prelude = { version = "=5.1.1", path = "crates/prelude", default-features = false }
ink_primitives = { version = "=5.1.1", path = "crates/primitives", default-features = false }
ink_storage = { version = "=5.1.1", path = "crates/storage", default-features = false }
ink_storage_traits = { version = "=5.1.1", path = "crates/storage/traits", default-features = false }

[profile.release]
panic = "abort"
Expand Down
3 changes: 2 additions & 1 deletion crates/e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ink_primitives = { workspace = true, default-features = true }

cargo_metadata = { workspace = true }
contract-build = { workspace = true }
ink_sandbox = { version = "=5.1.0", path = "./sandbox", optional = true }
ink_sandbox = { version = "=5.1.1", path = "./sandbox", optional = true }
pallet-contracts-mock-network = { workspace = true, optional = true }
funty = { workspace = true }
impl-serde = { workspace = true }
Expand All @@ -47,6 +47,7 @@ sp-core = { workspace = true }
sp-keyring = { workspace = true }
sp-runtime = { workspace = true }
sp-weights = { workspace = true }
regex = "1.11.1"

[dev-dependencies]
# Required for the doctest of `MessageBuilder::call`
Expand Down
2 changes: 1 addition & 1 deletion crates/e2e/sandbox/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_sandbox"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>", "Cardinal Cryptography"]
edition.workspace = true
license.workspace = true
Expand Down
34 changes: 32 additions & 2 deletions crates/e2e/src/node_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,17 @@ fn find_substrate_port_from_output(r: impl Read + Send + 'static) -> u16 {
.or_else(|| line.rsplit_once("Running JSON-RPC server: addr=127.0.0.1:"))
.map(|(_, port_str)| port_str)?;

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

// expect to have a number here (the chars after '127.0.0.1:') and parse them
// into a u16.
Expand Down Expand Up @@ -269,4 +278,25 @@ mod tests {
assert!(res1.is_err());
assert!(res2.is_err());
}

#[test]
fn parse_port_from_node_output() {
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 ";
let port = find_substrate_port_from_output(log.as_bytes());
assert_eq!(port, 9944);

let log = "2024-12-04 10:57:03.893 INFO main sc_rpc_server: Running JSON-RPC server: addr=127.0.0.1:9944 ";
let port = find_substrate_port_from_output(log.as_bytes());
assert_eq!(port, 9944);

let log = r#"2024-12-04 11:02:24.637 INFO main sc_cli::runner: 👤 Role: AUTHORITY
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
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
2024-12-04 11:02:25.327 INFO main sc_rpc_server: Running JSON-RPC server: addr=127.0.0.1:9944,[::1]:9944
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
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
"#;
let port = find_substrate_port_from_output(log.as_bytes());
assert_eq!(port, 9944);
}
}
2 changes: 1 addition & 1 deletion crates/ink/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ name = "ink_codegen"

[dependencies]
ink_primitives = { workspace = true }
ir = { version = "=5.1.0", package = "ink_ir", path = "../ir", default-features = false }
ir = { version = "=5.1.1", package = "ink_ir", path = "../ir", default-features = false }
quote = { workspace = true }
syn = { workspace = true, features = ["parsing", "full", "extra-traits"] }
proc-macro2 = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "call_builder_return_value"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "e2e-runtime-only-backend"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "call_builder_delegate"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "call_builder"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "constructors_return_value"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "contract_ref"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "integration_flipper"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/internal/mother/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mother"
description = "Mother of all contracts"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/internal/sr25519-verification/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sr25519_verification"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/internal/storage-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "storage-types"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/public/call-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "call-runtime"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/public/combined-extension/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "combined_extension"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"
publish = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "conditional-compilation"
version = "5.1.0"
version = "5.1.1"
authors = ["Use Ink <[email protected]>"]
edition = "2021"

Expand Down
Loading

0 comments on commit 84d1158

Please sign in to comment.