From 86ef1a7d44f9937e1734c6bc0dffa4043ca76e0c Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 26 Jul 2023 09:20:38 +0100 Subject: [PATCH 1/6] CHANGELOG --- CHANGELOG.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40ad19d50..ef4f63d92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,18 +4,36 @@ 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] +## [3.1.0] + +**Notable changes:** + - Verifiable builds inside a docker container - [#1148](https://github.com/paritytech/cargo-contract/pull/1148) + - Extrinsics extracted to separate crate - [#1181](https://github.com/paritytech/cargo-contract/pull/1181) + - Fix building contracts with Rust >= 1.70: enable `sign_ext` Wasm opcode - [#1189](https://github.com/paritytech/cargo-contract/pull/1189) ### Added - Standardised verifiable builds - [#1148](https://github.com/paritytech/cargo-contract/pull/1148) +- Enable Wasm sign_ext [#1189](https://github.com/paritytech/cargo-contract/pull/1189) +- Expose extrinsics operations as a library - [#1181](https://github.com/paritytech/cargo-contract/pull/1181) +- Suggest valid message or constructor name, when misspelled - [#1162](https://github.com/paritytech/cargo-contract/pull/1162) +- Add flag -y as a shortcut for --skip-confirm - [#1127](https://github.com/paritytech/cargo-contract/pull/1127) +- Add command line argument --max-memory-pages - [#1128](https://github.com/paritytech/cargo-contract/pull/1128) +- Show Gas consumption by default for dry-runs - [#1121](https://github.com/paritytech/cargo-contract/pull/1121) ### Changed - Dry-run result output improvements - [1123](https://github.com/paritytech/cargo-contract/pull/1123) -- Display build progress with --output-json, print to stderr [1211](https://github.com/paritytech/cargo-contract/pull/1211) +- Display build progress with --output-json, print to stderr - [1211](https://github.com/paritytech/cargo-contract/pull/1211) +- Update `subxt` to `0.30.1` with new `subxt-signer` crate - [#1236](https://github.com/paritytech/cargo-contract/pull/1236) +- Upgrade wasm-opt to 0.113 - [#1188](https://github.com/paritytech/cargo-contract/pull/1188) +- Update substrate dependencies - [#1149](https://github.com/paritytech/cargo-contract/pull/1149) +- Make output format of cargo contract info consistent with other subcommands - [#1120](https://github.com/paritytech/cargo-contract/pull/1120) ### Fixed -- Configure tty output correctly - [#1209]((https://github.com/paritytech/cargo-contract/pull/1209)) - +- Configure tty output correctly - [#1209](https://github.com/paritytech/cargo-contract/pull/1209) +- Set `lto = "thin"` for metadata build to fix `linkme` on macOS - [#1200](https://github.com/paritytech/cargo-contract/pull/1200) +- fix(build): An error when running with `--lint` - [#1174](https://github.com/paritytech/cargo-contract/pull/1174) +- Dry-run result output improvements - [#1123](https://github.com/paritytech/cargo-contract/pull/1123) +- feat: use `CARGO_ENCODED_RUSTFLAGS` instead of `RUSTFLAGS` - [#1124](https://github.com/paritytech/cargo-contract/pull/1124) ## [3.0.1] From 8d42eb8498a8d989ad9c2efa8e46d13c114085cf Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 26 Jul 2023 09:21:34 +0100 Subject: [PATCH 2/6] Bump version --- crates/build/Cargo.toml | 4 ++-- crates/cargo-contract/Cargo.toml | 8 ++++---- crates/extrinsics/Cargo.toml | 8 ++++---- crates/metadata/Cargo.toml | 2 +- crates/transcode/Cargo.toml | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/build/Cargo.toml b/crates/build/Cargo.toml index c3a74b6a1..c4b845b63 100644 --- a/crates/build/Cargo.toml +++ b/crates/build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-build" -version = "3.0.1" +version = "3.1.0" authors = ["Parity Technologies "] edition = "2021" @@ -44,7 +44,7 @@ tokio-stream = "0.1" bollard = "0.14" crossterm = "0.26.1" -contract-metadata = { version = "3.0.1", path = "../metadata" } +contract-metadata = { version = "3.1.0", path = "../metadata" } [target.'cfg(unix)'.dependencies] users = "0.11" diff --git a/crates/cargo-contract/Cargo.toml b/crates/cargo-contract/Cargo.toml index 21966d5a0..feaba5e49 100644 --- a/crates/cargo-contract/Cargo.toml +++ b/crates/cargo-contract/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-contract" -version = "3.0.1" +version = "3.1.0" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" @@ -18,9 +18,9 @@ include = [ ] [dependencies] -contract-build = { version = "3.0.1", path = "../build" } -contract-extrinsics = { version = "3.0.1", path = "../extrinsics" } -contract-transcode = { version = "3.0.1", path = "../transcode" } +contract-build = { version = "3.1.0", path = "../build" } +contract-extrinsics = { version = "3.1.0", path = "../extrinsics" } +contract-transcode = { version = "3.1.0", path = "../transcode" } anyhow = "1.0.72" clap = { version = "4.3.19", features = ["derive", "env"] } diff --git a/crates/extrinsics/Cargo.toml b/crates/extrinsics/Cargo.toml index 4f1d15a84..04eab2bb3 100644 --- a/crates/extrinsics/Cargo.toml +++ b/crates/extrinsics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-extrinsics" -version = "3.0.1" +version = "3.1.0" authors = ["Parity Technologies "] edition = "2021" @@ -14,9 +14,9 @@ keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"] include = ["Cargo.toml", "*.rs", "LICENSE"] [dependencies] -contract-build = { version = "3.0.1", path = "../build" } -contract-metadata = { version = "3.0.1", path = "../metadata" } -contract-transcode = { version = "3.0.1", path = "../transcode" } +contract-build = { version = "3.1.0", path = "../build" } +contract-metadata = { version = "3.1.0", path = "../metadata" } +contract-transcode = { version = "3.1.0", path = "../transcode" } anyhow = "1.0.72" clap = { version = "4.3.19", features = ["derive", "env"] } diff --git a/crates/metadata/Cargo.toml b/crates/metadata/Cargo.toml index 08d34b78b..dc3b8005e 100644 --- a/crates/metadata/Cargo.toml +++ b/crates/metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-metadata" -version = "3.0.1" +version = "3.1.0" authors = ["Parity Technologies "] edition = "2021" diff --git a/crates/transcode/Cargo.toml b/crates/transcode/Cargo.toml index cb8f5e795..eb60aef62 100644 --- a/crates/transcode/Cargo.toml +++ b/crates/transcode/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-transcode" -version = "3.0.1" +version = "3.1.0" authors = ["Parity Technologies "] edition = "2021" @@ -20,7 +20,7 @@ path = "src/lib.rs" anyhow = "1.0.72" base58 = { version = "0.2.0" } blake2 = { version = "0.10.4", default-features = false } -contract-metadata = { version = "3.0.1", path = "../metadata" } +contract-metadata = { version = "3.1.0", path = "../metadata" } escape8259 = "0.5.2" hex = "0.4.3" indexmap = "2.0.0" From 36c08405c64ee949da2b490b31b0a14dfcd102bd Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 26 Jul 2023 09:23:39 +0100 Subject: [PATCH 3/6] Update publish steps --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3342b6b42..b6de6572f 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ In order to publish a new version of `cargo-contract`: - Bump all crate versions, we move them in lockstep. - Make sure your PR is approved by one or more core developers. -- Publish `metadata` ➜ `transcode` ➜ `build` ➜ `cargo-contract`. +- Publish `metadata` ➜ `transcode` ➜ `extrinsics` ➜ `build` ➜ `cargo-contract`. - Merge you PR and push a tag `vX.X` with your version number. - Create a GitHub release with the changelog entries. From a7e1e75b0dca8a68bf3d3bad8284ec8a37bcda42 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 26 Jul 2023 09:46:40 +0100 Subject: [PATCH 4/6] Update Dockerfile --- build-image/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build-image/Dockerfile b/build-image/Dockerfile index 94e8b4eba..1f2541039 100644 --- a/build-image/Dockerfile +++ b/build-image/Dockerfile @@ -1,11 +1,9 @@ FROM docker.io/bitnami/minideb:bullseye-amd64 as slimmed-rust # The rust version to use -# The 1.69 toolchain is temporarily required to build ink! contracts because of -# https://github.com/paritytech/cargo-contract/issues/1139 -ARG RUST_VERSION=1.69 +ARG RUST_VERSION=stable # The cargo contract version to use -ARG CARGO_CONTRACT_VERSION=3.0.1 +ARG CARGO_CONTRACT_VERSION=3.1.0 # Url to the cargo-contract repository to install from ARG CARGO_CONTRACT_GIT # Branch to use in git repository From 21b0506b8af5ed1203e464c15c881020169ea6c8 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 26 Jul 2023 13:04:06 +0100 Subject: [PATCH 5/6] Update publish steps order --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b6de6572f..31bca03a1 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ In order to publish a new version of `cargo-contract`: - Bump all crate versions, we move them in lockstep. - Make sure your PR is approved by one or more core developers. -- Publish `metadata` ➜ `transcode` ➜ `extrinsics` ➜ `build` ➜ `cargo-contract`. +- Publish `metadata` ➜ `transcode` ➜ `build` ➜ `extrinsics` ➜ `cargo-contract`. - Merge you PR and push a tag `vX.X` with your version number. - Create a GitHub release with the changelog entries. From f093403a66de5b2981b990bf6d1f8fa3f1397162 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 26 Jul 2023 13:07:07 +0100 Subject: [PATCH 6/6] Include scale subxt metadata files --- crates/cargo-contract/Cargo.toml | 2 +- crates/extrinsics/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cargo-contract/Cargo.toml b/crates/cargo-contract/Cargo.toml index feaba5e49..9fdc5d25a 100644 --- a/crates/cargo-contract/Cargo.toml +++ b/crates/cargo-contract/Cargo.toml @@ -14,7 +14,7 @@ description = "Setup and deployment tool for developing Wasm based smart contrac keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"] categories = ["command-line-utilities", "development-tools::build-utils", "development-tools::cargo-plugins"] include = [ - "Cargo.toml", "src/**/*.rs", "README.md", "LICENSE", "build.rs", "src/**/*.scale", + "Cargo.toml", "src/**/*.rs", "README.md", "LICENSE", "build.rs", ] [dependencies] diff --git a/crates/extrinsics/Cargo.toml b/crates/extrinsics/Cargo.toml index 04eab2bb3..fe098770a 100644 --- a/crates/extrinsics/Cargo.toml +++ b/crates/extrinsics/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/contract-extrinsics" homepage = "https://www.substrate.io/" description = "Library defining extrinsics for smart contracts on substrate" keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"] -include = ["Cargo.toml", "*.rs", "LICENSE"] +include = ["Cargo.toml", "*.rs", "LICENSE", "src/**/*.scale",] [dependencies] contract-build = { version = "3.1.0", path = "../build" }