From 757c1078dc27a62738aac7eed718d2259afb4007 Mon Sep 17 00:00:00 2001 From: David Palm Date: Sat, 8 Feb 2020 18:26:05 +0100 Subject: [PATCH 1/5] [parity-crypto] prepare 0.5.0 --- parity-crypto/CHANGELOG.md | 14 ++++++++------ parity-crypto/Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/parity-crypto/CHANGELOG.md b/parity-crypto/CHANGELOG.md index c915ee3c9..be1a5c151 100644 --- a/parity-crypto/CHANGELOG.md +++ b/parity-crypto/CHANGELOG.md @@ -5,9 +5,11 @@ The format is based on [Keep a Changelog]. [Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ ## [Unreleased] -- Remove `inv()` from `SecretKey` (breaking) -- `Generate::generate()` does not return error -- `Secp256k1` is no longer exported -- Remove `public_is_valid()` as it is now impossible to create invalid public keys -- 0-valued `Secp::Message`s are disallowed (signatures on them are forgeable for all keys) -- updates to upstream `rust-secp256k1` at v0.17.2 + +## [0.5.0] - 2020-01-08 +- Remove `inv()` from `SecretKey` (breaking) (https://github.com/paritytech/parity-common/pull/258) +- `Generate::generate()` does not return error (https://github.com/paritytech/parity-common/pull/258) +- `Secp256k1` is no longer exported (https://github.com/paritytech/parity-common/pull/258) +- Remove `public_is_valid()` as it is now impossible to create invalid public keys (https://github.com/paritytech/parity-common/pull/258) +- 0-valued `Secp::Message`s are disallowed (signatures on them are forgeable for all keys) (https://github.com/paritytech/parity-common/pull/258) +- Switch to upstream `rust-secp256k1` at v0.17.2 (https://github.com/paritytech/parity-common/pull/258) diff --git a/parity-crypto/Cargo.toml b/parity-crypto/Cargo.toml index 5a7ea3b9b..06f534053 100644 --- a/parity-crypto/Cargo.toml +++ b/parity-crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parity-crypto" -version = "0.4.2" +version = "0.5.0" authors = ["Parity Technologies "] repository = "https://github.com/paritytech/parity-common" description = "Crypto utils used by ethstore and network." From 1fff66f8e13f802d5aca6f89a6312ef53a2ad8e9 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 8 Feb 2020 18:30:03 +0100 Subject: [PATCH 2/5] Update parity-crypto/CHANGELOG.md Co-Authored-By: Andronik Ordian --- parity-crypto/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parity-crypto/CHANGELOG.md b/parity-crypto/CHANGELOG.md index be1a5c151..05c3a147a 100644 --- a/parity-crypto/CHANGELOG.md +++ b/parity-crypto/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog]. ## [Unreleased] -## [0.5.0] - 2020-01-08 +## [0.5.0] - 2020-02-08 - Remove `inv()` from `SecretKey` (breaking) (https://github.com/paritytech/parity-common/pull/258) - `Generate::generate()` does not return error (https://github.com/paritytech/parity-common/pull/258) - `Secp256k1` is no longer exported (https://github.com/paritytech/parity-common/pull/258) From 1a39a14e28ffeca7c25b215b4d27e4c8df6a244c Mon Sep 17 00:00:00 2001 From: David Palm Date: Sat, 8 Feb 2020 19:42:36 +0100 Subject: [PATCH 3/5] Include https://github.com/paritytech/parity-common/pull/337 --- parity-crypto/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/parity-crypto/CHANGELOG.md b/parity-crypto/CHANGELOG.md index be1a5c151..d61f9ebac 100644 --- a/parity-crypto/CHANGELOG.md +++ b/parity-crypto/CHANGELOG.md @@ -13,3 +13,4 @@ The format is based on [Keep a Changelog]. - Remove `public_is_valid()` as it is now impossible to create invalid public keys (https://github.com/paritytech/parity-common/pull/258) - 0-valued `Secp::Message`s are disallowed (signatures on them are forgeable for all keys) (https://github.com/paritytech/parity-common/pull/258) - Switch to upstream `rust-secp256k1` at v0.17.2 (https://github.com/paritytech/parity-common/pull/258) +- remove unused dependency `rustc_hex` (https://github.com/paritytech/parity-common/pull/337) From 0ea11cc56188319c28b8a895cb9e61e7c1ff8026 Mon Sep 17 00:00:00 2001 From: David Palm Date: Sat, 8 Feb 2020 19:49:22 +0100 Subject: [PATCH 4/5] Sort out rustc-hex --- parity-crypto/CHANGELOG.md | 2 +- parity-crypto/Cargo.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/parity-crypto/CHANGELOG.md b/parity-crypto/CHANGELOG.md index 650f7eeec..591ee42d3 100644 --- a/parity-crypto/CHANGELOG.md +++ b/parity-crypto/CHANGELOG.md @@ -13,4 +13,4 @@ The format is based on [Keep a Changelog]. - Remove `public_is_valid()` as it is now impossible to create invalid public keys (https://github.com/paritytech/parity-common/pull/258) - 0-valued `Secp::Message`s are disallowed (signatures on them are forgeable for all keys) (https://github.com/paritytech/parity-common/pull/258) - Switch to upstream `rust-secp256k1` at v0.17.2 (https://github.com/paritytech/parity-common/pull/258) -- remove unused dependency `rustc_hex` (https://github.com/paritytech/parity-common/pull/337) +- make `rustc_hex` dependency optional (https://github.com/paritytech/parity-common/pull/337) diff --git a/parity-crypto/Cargo.toml b/parity-crypto/Cargo.toml index 4d6d6e436..aa5d7b654 100644 --- a/parity-crypto/Cargo.toml +++ b/parity-crypto/Cargo.toml @@ -30,6 +30,7 @@ pbkdf2 = "0.3.0" subtle = "2.2.1" zeroize = { version = "1.0.0", default-features = false } rand = "0.7.2" +rustc-hex = { version = "2.1.0", default-features = false, optional = true } [dev-dependencies] criterion = "0.3.0" @@ -39,4 +40,4 @@ hex-literal = "0.2.1" default = [] # public key crypto utils # moved from ethkey module in parity ethereum repository -publickey = ["secp256k1", "lazy_static", "ethereum-types"] +publickey = ["secp256k1", "lazy_static", "ethereum-types", "rustc-hex"] From 853225480b34f2ac677a2c1d3c8357b2a8189ce8 Mon Sep 17 00:00:00 2001 From: David Palm Date: Sat, 8 Feb 2020 20:49:30 +0100 Subject: [PATCH 5/5] Make sure we test parity-crypto with the publockey feature enabled --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8741dccc..bea20cf75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ script: - cargo check --all --tests - cargo check --all --benches - cargo build --all - - cargo test --all --exclude uint --exclude fixed-hash + - cargo test --all --exclude uint --exclude fixed-hash --exclude parity-crypto - if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cd contract-address/ && cargo test --features=external_doc && cd ..; fi @@ -48,6 +48,7 @@ script: - cd keccak-hash/ && cargo test --no-default-features && cd .. - cd plain_hasher/ && cargo test --no-default-features && cargo check --benches && cd .. - cd parity-bytes/ && cargo test --no-default-features && cd .. + - cd parity-crypto/ && cargo test --all-features && cd .. - cd parity-util-mem/ && cargo test --features=estimate-heapsize && cd .. - cd parity-util-mem/ && cargo test --features=jemalloc-global && cd .. - cd parity-util-mem/ && cargo test --features=mimalloc-global && cd ..