From 639afc9ac09bbf28f5adab3c67e3d02de3d451b3 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Wed, 4 Sep 2019 23:57:22 +0200 Subject: [PATCH 1/6] update rand to 0.7 (breaking change) --- contract-address/Cargo.toml | 4 ++-- ethbloom/Cargo.toml | 6 +++--- ethereum-types/Cargo.toml | 10 +++++----- fixed-hash/Cargo.toml | 7 +++++-- fixed-hash/src/hash.rs | 26 +++++++++++++------------- fixed-hash/src/lib.rs | 3 +++ fixed-hash/src/tests.rs | 3 ++- keccak-hash/Cargo.toml | 2 +- kvdb-rocksdb/Cargo.toml | 4 ++-- primitive-types/Cargo.toml | 6 +++--- primitive-types/impls/rlp/Cargo.toml | 4 ++-- rlp/Cargo.toml | 4 ++-- transaction-pool/Cargo.toml | 2 +- triehash/Cargo.toml | 6 +++--- 14 files changed, 47 insertions(+), 40 deletions(-) diff --git a/contract-address/Cargo.toml b/contract-address/Cargo.toml index 9ba26c51d..000bf4bef 100644 --- a/contract-address/Cargo.toml +++ b/contract-address/Cargo.toml @@ -11,8 +11,8 @@ edition = "2018" readme = "README.md" [dependencies] -ethereum-types = { version = "0.7", path = "../ethereum-types" } -rlp = { version = "0.4", path = "../rlp" } +ethereum-types = { version = "0.8", path = "../ethereum-types" } +rlp = { version = "0.5", path = "../rlp" } keccak-hash = { version = "0.3", path = "../keccak-hash", default-features = false } [features] diff --git a/ethbloom/Cargo.toml b/ethbloom/Cargo.toml index 5e3347991..72cef0de8 100644 --- a/ethbloom/Cargo.toml +++ b/ethbloom/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethbloom" -version = "0.7.0" +version = "0.8.0" authors = ["Parity Technologies "] description = "Ethereum bloom filter" license = "MIT" @@ -12,9 +12,9 @@ edition = "2018" [dependencies] tiny-keccak = "1.5" crunchy = { version = "0.2", default-features = false, features = ["limit_256"] } -fixed-hash = { path = "../fixed-hash", version = "0.4", default-features = false } +fixed-hash = { path = "../fixed-hash", version = "0.5", default-features = false } impl-serde = { path = "../primitive-types/impls/serde", version = "0.2", default-features = false, optional = true } -impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.2", default-features = false } +impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.3", default-features = false } [dev-dependencies] criterion = "0.3" diff --git a/ethereum-types/Cargo.toml b/ethereum-types/Cargo.toml index 97dbc2e3b..cf818f0d2 100644 --- a/ethereum-types/Cargo.toml +++ b/ethereum-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethereum-types" -version = "0.7.0" +version = "0.8.0" authors = ["Parity Technologies "] license = "MIT" homepage = "https://github.com/paritytech/parity-common" @@ -8,12 +8,12 @@ description = "Ethereum types" edition = "2018" [dependencies] -ethbloom = { path = "../ethbloom", version = "0.7", default-features = false } -fixed-hash = { path = "../fixed-hash", version = "0.4", default-features = false, features = ["byteorder", "rustc-hex"] } +ethbloom = { path = "../ethbloom", version = "0.8", default-features = false } +fixed-hash = { path = "../fixed-hash", version = "0.5", default-features = false, features = ["byteorder", "rustc-hex"] } uint-crate = { path = "../uint", package = "uint", version = "0.8", default-features = false } -primitive-types = { path = "../primitive-types", version = "0.5", features = ["rlp", "byteorder", "rustc-hex"], default-features = false } +primitive-types = { path = "../primitive-types", version = "0.6", features = ["rlp", "byteorder", "rustc-hex"], default-features = false } impl-serde = { path = "../primitive-types/impls/serde", version = "0.2", default-features = false, optional = true } -impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.2", default-features = false } +impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.3", default-features = false } [dev-dependencies] serde_json = "1.0" diff --git a/fixed-hash/Cargo.toml b/fixed-hash/Cargo.toml index 9947ceaa2..1facbf088 100644 --- a/fixed-hash/Cargo.toml +++ b/fixed-hash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fixed-hash" -version = "0.4.0" +version = "0.5.0" authors = ["Parity Technologies "] license = "MIT" homepage = "https://github.com/paritytech/parity-common" @@ -13,12 +13,15 @@ readme = "README.md" features = ["quickcheck", "api-dummy"] [dependencies] -rand = { version = "0.5", optional = true, default-features = false } +rand = { version = "0.7", optional = true, default-features = false } rustc-hex = { version = "2.0", optional = true, default-features = false } quickcheck = { version = "0.7", optional = true } byteorder = { version = "1.2", optional = true, default-features = false } static_assertions = "0.2" +[dev-dependencies] +rand_xorshift = "0.2.0" + [target.'cfg(not(target_os = "unknown"))'.dependencies] libc = { version = "0.2", optional = true, default-features = false } diff --git a/fixed-hash/src/hash.rs b/fixed-hash/src/hash.rs index 95c762848..f8ffcb426 100644 --- a/fixed-hash/src/hash.rs +++ b/fixed-hash/src/hash.rs @@ -67,7 +67,7 @@ macro_rules! construct_fixed_hash { impl<'a> From<&'a [u8; $n_bytes]> for $name { /// Constructs a hash type from the given reference - /// to the bytes array of fixed length. + /// to the bytes array of fixed length. /// /// # Note /// @@ -80,7 +80,7 @@ macro_rules! construct_fixed_hash { impl<'a> From<&'a mut [u8; $n_bytes]> for $name { /// Constructs a hash type from the given reference - /// to the mutable bytes array of fixed length. + /// to the mutable bytes array of fixed length. /// /// # Note /// @@ -328,7 +328,7 @@ macro_rules! construct_fixed_hash { } // Implementation for disabled byteorder crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -342,7 +342,7 @@ macro_rules! impl_byteorder_for_fixed_hash { } // Implementation for enabled byteorder crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -461,7 +461,7 @@ macro_rules! impl_byteorder_for_fixed_hash { } // Implementation for disabled rand crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -475,7 +475,7 @@ macro_rules! impl_rand_for_fixed_hash { } // Implementation for enabled rand crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -512,7 +512,7 @@ macro_rules! impl_rand_for_fixed_hash { /// Assign `self` to a cryptographically random value. pub fn randomize(&mut self) { - let mut rng = $crate::rand::rngs::EntropyRng::new(); + let mut rng = $crate::rand::rngs::OsRng; self.randomize_using(&mut rng); } @@ -538,7 +538,7 @@ macro_rules! impl_rand_for_fixed_hash { } // Implementation for disabled libc crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -566,7 +566,7 @@ macro_rules! impl_libc_for_fixed_hash { } // Implementation for enabled libc crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -612,7 +612,7 @@ macro_rules! impl_libc_for_fixed_hash { } // Implementation for disabled rustc-hex crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -626,7 +626,7 @@ macro_rules! impl_rustc_hex_for_fixed_hash { } // Implementation for enabled rustc-hex crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -667,7 +667,7 @@ macro_rules! impl_rustc_hex_for_fixed_hash { } // Implementation for disabled quickcheck crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks @@ -681,7 +681,7 @@ macro_rules! impl_quickcheck_for_fixed_hash { } // Implementation for enabled quickcheck crate support. -// +// // # Note // // Feature guarded macro definitions instead of feature guarded impl blocks diff --git a/fixed-hash/src/lib.rs b/fixed-hash/src/lib.rs index 061c33854..f215a771c 100644 --- a/fixed-hash/src/lib.rs +++ b/fixed-hash/src/lib.rs @@ -56,6 +56,9 @@ pub extern crate rand; #[doc(hidden)] pub extern crate quickcheck; +#[cfg(test)] +extern crate rand_xorshift; + #[macro_use] mod hash; diff --git a/fixed-hash/src/tests.rs b/fixed-hash/src/tests.rs index 66869d002..45e22927a 100644 --- a/fixed-hash/src/tests.rs +++ b/fixed-hash/src/tests.rs @@ -250,7 +250,8 @@ mod from_low_u64 { #[cfg(feature = "rand")] mod rand { use super::*; - use rand::{SeedableRng, XorShiftRng}; + use rand::SeedableRng; + use rand_xorshift::XorShiftRng; #[test] fn random() { diff --git a/keccak-hash/Cargo.toml b/keccak-hash/Cargo.toml index 6a3229fb2..3768ddfc5 100644 --- a/keccak-hash/Cargo.toml +++ b/keccak-hash/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" [dependencies] tiny-keccak = "1.4" -primitive-types = { path = "../primitive-types", version = "0.5", default-features = false } +primitive-types = { path = "../primitive-types", version = "0.6", default-features = false } [dev-dependencies] tempdir = "0.3" diff --git a/kvdb-rocksdb/Cargo.toml b/kvdb-rocksdb/Cargo.toml index 57e7e6a2b..bb2db1b34 100644 --- a/kvdb-rocksdb/Cargo.toml +++ b/kvdb-rocksdb/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kvdb-rocksdb" -version = "0.1.4" +version = "0.2.4" authors = ["Parity Technologies "] repository = "https://github.com/paritytech/parity-common" description = "kvdb implementation backed by rocksDB" @@ -19,4 +19,4 @@ parity-rocksdb = "0.5" [dev-dependencies] tempdir = "0.3" -ethereum-types = { version = "0.7", path = "../ethereum-types" } +ethereum-types = { version = "0.8", path = "../ethereum-types" } diff --git a/primitive-types/Cargo.toml b/primitive-types/Cargo.toml index cf19f7d27..ec74b02ca 100644 --- a/primitive-types/Cargo.toml +++ b/primitive-types/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "primitive-types" -version = "0.5.1" +version = "0.6.0" authors = ["Parity Technologies "] license = "Apache-2.0/MIT" homepage = "https://github.com/paritytech/parity-common" description = "Primitive types shared by Ethereum and Substrate" [dependencies] -fixed-hash = { version = "0.4", path = "../fixed-hash", default-features = false } +fixed-hash = { version = "0.5", path = "../fixed-hash", default-features = false } uint = { version = "0.8", path = "../uint", default-features = false } impl-serde = { version = "0.2.1", path = "impls/serde", default-features = false, optional = true } impl-codec = { version = "0.4.1", path = "impls/codec", default-features = false, optional = true } -impl-rlp = { version = "0.2", path = "impls/rlp", default-features = false, optional = true } +impl-rlp = { version = "0.3", path = "impls/rlp", default-features = false, optional = true } [features] default = ["std"] diff --git a/primitive-types/impls/rlp/Cargo.toml b/primitive-types/impls/rlp/Cargo.toml index 7f0ee2696..2f44aa0d1 100644 --- a/primitive-types/impls/rlp/Cargo.toml +++ b/primitive-types/impls/rlp/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "impl-rlp" -version = "0.2.0" +version = "0.3.0" authors = ["Parity Technologies "] license = "Apache-2.0/MIT" homepage = "https://github.com/paritytech/parity-common" description = "RLP serialization support for uint and fixed hash." [dependencies] -rlp = { version = "0.4", path = "../../../rlp" } +rlp = { version = "0.5", path = "../../../rlp" } diff --git a/rlp/Cargo.toml b/rlp/Cargo.toml index 8795f84ec..16bb3ae8c 100644 --- a/rlp/Cargo.toml +++ b/rlp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rlp" -version = "0.4.2" +version = "0.5.0" description = "Recursive-length prefix encoding, decoding, and compression" repository = "https://github.com/paritytech/parity-common" license = "MIT/Apache-2.0" @@ -12,4 +12,4 @@ rustc-hex = {version = "2.0", default-features = false } [dev-dependencies] hex-literal = "0.2" -primitive-types = { path = "../primitive-types", version = "0.5", features = ["impl-rlp"] } +primitive-types = { path = "../primitive-types", version = "0.6", features = ["impl-rlp"] } diff --git a/transaction-pool/Cargo.toml b/transaction-pool/Cargo.toml index 312d4f3b0..0f8885a9c 100644 --- a/transaction-pool/Cargo.toml +++ b/transaction-pool/Cargo.toml @@ -13,4 +13,4 @@ smallvec = "0.6" trace-time = { path = "../trace-time", version = "0.1" } [dev-dependencies] -ethereum-types = { version = "0.7", path = "../ethereum-types" } +ethereum-types = { version = "0.8", path = "../ethereum-types" } diff --git a/triehash/Cargo.toml b/triehash/Cargo.toml index 2d207cc4b..4323da678 100644 --- a/triehash/Cargo.toml +++ b/triehash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "triehash" -version = "0.8.0" +version = "0.9.0" authors = ["Parity Technologies "] description = "In-memory patricia trie operations" repository = "https://github.com/paritytech/parity-common" @@ -8,10 +8,10 @@ license = "GPL-3.0" [dependencies] hash-db = "0.15" -rlp = { version = "0.4", path = "../rlp" } +rlp = { version = "0.5", path = "../rlp" } [dev-dependencies] keccak-hasher = "0.15" tiny-keccak = "1.4.2" -ethereum-types = { version = "0.7", path = "../ethereum-types" } +ethereum-types = { version = "0.8", path = "../ethereum-types" } hex-literal = "0.2" From 0185271388b862667b65be118f44e43686b67b8c Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 5 Sep 2019 12:10:30 +0200 Subject: [PATCH 2/6] [kvdb-rocksdb]: revert version bump --- kvdb-rocksdb/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvdb-rocksdb/Cargo.toml b/kvdb-rocksdb/Cargo.toml index bb2db1b34..11d821f6e 100644 --- a/kvdb-rocksdb/Cargo.toml +++ b/kvdb-rocksdb/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kvdb-rocksdb" -version = "0.2.4" +version = "0.1.4" authors = ["Parity Technologies "] repository = "https://github.com/paritytech/parity-common" description = "kvdb implementation backed by rocksDB" From 0971c53ba717a72922396f5e75417753669794cd Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 5 Sep 2019 13:19:28 +0200 Subject: [PATCH 3/6] [keccak-hash]: bump version --- keccak-hash/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keccak-hash/Cargo.toml b/keccak-hash/Cargo.toml index 3768ddfc5..365ea5805 100644 --- a/keccak-hash/Cargo.toml +++ b/keccak-hash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "keccak-hash" -version = "0.3.0" +version = "0.4.0" description = "`keccak-hash` is a set of utility functions to facilitate working with Keccak hashes (256/512 bits long)." authors = ["Parity Technologies "] repository = "https://github.com/paritytech/parity-common" From 94949d725c5cc6c7e34fd9be39f5c40b9b999218 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 5 Sep 2019 13:23:39 +0200 Subject: [PATCH 4/6] [contract-address]: bump keccak-hash --- contract-address/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract-address/Cargo.toml b/contract-address/Cargo.toml index 000bf4bef..90803c590 100644 --- a/contract-address/Cargo.toml +++ b/contract-address/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" [dependencies] ethereum-types = { version = "0.8", path = "../ethereum-types" } rlp = { version = "0.5", path = "../rlp" } -keccak-hash = { version = "0.3", path = "../keccak-hash", default-features = false } +keccak-hash = { version = "0.4", path = "../keccak-hash", default-features = false } [features] default = [] From b339acfef6c894e73532f3e0f0651229705f788e Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 5 Sep 2019 15:35:15 +0200 Subject: [PATCH 5/6] [contract-address]: bump version `0.3.0` --- contract-address/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract-address/Cargo.toml b/contract-address/Cargo.toml index 90803c590..95a07471c 100644 --- a/contract-address/Cargo.toml +++ b/contract-address/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-address" -version = "0.2.0" +version = "0.3.0" authors = ["Parity Technologies "] license = "MIT" homepage = "https://github.com/paritytech/parity-common" From 0a3d2e31d68d1b2ea1eaaf5046bcc25dc61488d2 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 5 Sep 2019 17:18:45 +0200 Subject: [PATCH 6/6] [rlp]: downgrade to 0.2 --- contract-address/Cargo.toml | 2 +- ethbloom/Cargo.toml | 2 +- ethereum-types/Cargo.toml | 2 +- primitive-types/Cargo.toml | 2 +- primitive-types/impls/rlp/Cargo.toml | 4 ++-- rlp/Cargo.toml | 2 +- triehash/Cargo.toml | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contract-address/Cargo.toml b/contract-address/Cargo.toml index 95a07471c..83cd3ed13 100644 --- a/contract-address/Cargo.toml +++ b/contract-address/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" [dependencies] ethereum-types = { version = "0.8", path = "../ethereum-types" } -rlp = { version = "0.5", path = "../rlp" } +rlp = { version = "0.4", path = "../rlp" } keccak-hash = { version = "0.4", path = "../keccak-hash", default-features = false } [features] diff --git a/ethbloom/Cargo.toml b/ethbloom/Cargo.toml index 72cef0de8..829e2ac73 100644 --- a/ethbloom/Cargo.toml +++ b/ethbloom/Cargo.toml @@ -14,7 +14,7 @@ tiny-keccak = "1.5" crunchy = { version = "0.2", default-features = false, features = ["limit_256"] } fixed-hash = { path = "../fixed-hash", version = "0.5", default-features = false } impl-serde = { path = "../primitive-types/impls/serde", version = "0.2", default-features = false, optional = true } -impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.3", default-features = false } +impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.2", default-features = false } [dev-dependencies] criterion = "0.3" diff --git a/ethereum-types/Cargo.toml b/ethereum-types/Cargo.toml index cf818f0d2..ae5550d23 100644 --- a/ethereum-types/Cargo.toml +++ b/ethereum-types/Cargo.toml @@ -13,7 +13,7 @@ fixed-hash = { path = "../fixed-hash", version = "0.5", default-features = false uint-crate = { path = "../uint", package = "uint", version = "0.8", default-features = false } primitive-types = { path = "../primitive-types", version = "0.6", features = ["rlp", "byteorder", "rustc-hex"], default-features = false } impl-serde = { path = "../primitive-types/impls/serde", version = "0.2", default-features = false, optional = true } -impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.3", default-features = false } +impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.2", default-features = false } [dev-dependencies] serde_json = "1.0" diff --git a/primitive-types/Cargo.toml b/primitive-types/Cargo.toml index ec74b02ca..b1cd8ea2a 100644 --- a/primitive-types/Cargo.toml +++ b/primitive-types/Cargo.toml @@ -11,7 +11,7 @@ fixed-hash = { version = "0.5", path = "../fixed-hash", default-features = false uint = { version = "0.8", path = "../uint", default-features = false } impl-serde = { version = "0.2.1", path = "impls/serde", default-features = false, optional = true } impl-codec = { version = "0.4.1", path = "impls/codec", default-features = false, optional = true } -impl-rlp = { version = "0.3", path = "impls/rlp", default-features = false, optional = true } +impl-rlp = { version = "0.2", path = "impls/rlp", default-features = false, optional = true } [features] default = ["std"] diff --git a/primitive-types/impls/rlp/Cargo.toml b/primitive-types/impls/rlp/Cargo.toml index 2f44aa0d1..7f0ee2696 100644 --- a/primitive-types/impls/rlp/Cargo.toml +++ b/primitive-types/impls/rlp/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "impl-rlp" -version = "0.3.0" +version = "0.2.0" authors = ["Parity Technologies "] license = "Apache-2.0/MIT" homepage = "https://github.com/paritytech/parity-common" description = "RLP serialization support for uint and fixed hash." [dependencies] -rlp = { version = "0.5", path = "../../../rlp" } +rlp = { version = "0.4", path = "../../../rlp" } diff --git a/rlp/Cargo.toml b/rlp/Cargo.toml index 16bb3ae8c..6545bbbdf 100644 --- a/rlp/Cargo.toml +++ b/rlp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rlp" -version = "0.5.0" +version = "0.4.2" description = "Recursive-length prefix encoding, decoding, and compression" repository = "https://github.com/paritytech/parity-common" license = "MIT/Apache-2.0" diff --git a/triehash/Cargo.toml b/triehash/Cargo.toml index 4323da678..730d8f229 100644 --- a/triehash/Cargo.toml +++ b/triehash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "triehash" -version = "0.9.0" +version = "0.8.0" authors = ["Parity Technologies "] description = "In-memory patricia trie operations" repository = "https://github.com/paritytech/parity-common" @@ -8,7 +8,7 @@ license = "GPL-3.0" [dependencies] hash-db = "0.15" -rlp = { version = "0.5", path = "../rlp" } +rlp = { version = "0.4", path = "../rlp" } [dev-dependencies] keccak-hasher = "0.15"