From 4a21f9bbfd17a1d0e740ca9e982b9ba5e721c043 Mon Sep 17 00:00:00 2001 From: Qinxuan Chen Date: Thu, 28 Nov 2019 16:55:30 +0800 Subject: [PATCH] Prune some duplicate dependencies (#4219) * Prune some duplicate dependencies * Remove ed25519-dalek 0.9.1 * Remove hex 0.3.2 * Remove parity-wasm 0.40.3 * Remove pwasm-utils 0.11.0 * Remove wasmi-validation 0.2.0 * Remove quickcheck 0.8.5 * Remove tempdir (Replace tempdir with tempfile) Signed-off-by: koushiro * Remove useless tempdir_with_prefix Signed-off-by: koushiro * Remove derive_more 0.15 Signed-off-by: koushiro --- substrate/Cargo.lock | 102 +++--------------- substrate/bin/subkey/Cargo.toml | 2 +- substrate/client/cli/Cargo.toml | 2 +- substrate/client/cli/src/lib.rs | 3 +- substrate/client/db/Cargo.toml | 2 +- substrate/client/executor/Cargo.toml | 2 +- substrate/client/keystore/Cargo.toml | 4 +- substrate/client/keystore/src/lib.rs | 12 +-- substrate/client/network/Cargo.toml | 2 +- substrate/client/network/src/config.rs | 8 +- substrate/client/service/test/Cargo.toml | 2 +- substrate/client/service/test/src/lib.rs | 14 ++- substrate/frame/contracts/Cargo.toml | 7 +- .../frame/support/procedural/tools/Cargo.toml | 2 +- substrate/primitives/core/Cargo.toml | 2 +- substrate/primitives/core/src/ed25519.rs | 6 +- .../primitives/transaction-pool/Cargo.toml | 2 +- 17 files changed, 55 insertions(+), 119 deletions(-) diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index 506c4e966b..68e86cb216 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -915,19 +915,6 @@ name = "data-encoding" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "derive_more" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "derive_more" version = "0.99.2" @@ -985,17 +972,6 @@ name = "doc-comment" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "ed25519-dalek" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ed25519-dalek" version = "1.0.0-pre.2" @@ -1805,11 +1781,6 @@ dependencies = [ "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "hex" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "hex" version = "0.4.0" @@ -3558,14 +3529,13 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "frame-support 2.0.0", "frame-system 2.0.0", - "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pallet-balances 2.0.0", "pallet-randomness-collective-flip 2.0.0", "pallet-timestamp 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)", - "pwasm-utils 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 2.0.0", "sr-primitives 2.0.0", @@ -3573,7 +3543,7 @@ dependencies = [ "sr-std 2.0.0", "substrate-primitives 2.0.0", "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi-validation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4075,11 +4045,6 @@ dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parity-wasm" -version = "0.40.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "parity-wasm" version = "0.41.0" @@ -4382,12 +4347,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pwasm-utils" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4395,17 +4360,6 @@ name = "quick-error" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "quickcheck" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "quickcheck" version = "0.9.0" @@ -5248,7 +5202,7 @@ dependencies = [ name = "sp-transaction-pool-api" version = "2.0.0" dependencies = [ - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5489,7 +5443,7 @@ version = "2.0.0" dependencies = [ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "frame-system 2.0.0", - "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 2.0.0", "node-runtime 2.0.0", @@ -5672,7 +5626,7 @@ dependencies = [ "substrate-state-machine 2.0.0", "substrate-telemetry 2.0.0", "substrate-tracing 2.0.0", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5765,7 +5719,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-blockchain 2.0.0", "sr-primitives 2.0.0", "substrate-client 2.0.0", @@ -6000,7 +5954,7 @@ dependencies = [ "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 2.0.0", "sr-version 2.0.0", @@ -6146,14 +6100,14 @@ name = "substrate-keystore" version = "2.0.0" dependencies = [ "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-application-crypto 2.0.0", "substrate-primitives 2.0.0", "subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6200,7 +6154,7 @@ dependencies = [ "substrate-test-client 2.0.0", "substrate-test-runtime 2.0.0", "substrate-test-runtime-client 2.0.0", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6287,7 +6241,7 @@ dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ed25519-dalek 1.0.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6525,7 +6479,7 @@ dependencies = [ "substrate-network 2.0.0", "substrate-primitives 2.0.0", "substrate-service 2.0.0", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -6802,15 +6756,6 @@ name = "target_info" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tempfile" version = "3.1.0" @@ -7656,14 +7601,6 @@ dependencies = [ "wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "wasmi-validation" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "wasmi-validation" version = "0.3.0" @@ -8084,7 +8021,6 @@ dependencies = [ "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" "checksum curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" -"checksum derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a141330240c921ec6d074a3e188a7c7ef95668bb95e7d44fa0e5778ec2a7afe" "checksum derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" @@ -8092,7 +8028,6 @@ dependencies = [ "checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" "checksum dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" "checksum doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" -"checksum ed25519-dalek 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d07e8b8a8386c3b89a7a4b329fdfa4cb545de2545e9e2ebbc3dd3929253e426" "checksum ed25519-dalek 1.0.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)" = "845aaacc16f01178f33349e7c992ecd0cee095aa5e577f0f4dee35971bd36455" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" @@ -8164,7 +8099,6 @@ dependencies = [ "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" -"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" "checksum hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0" "checksum hex-literal-impl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d4c5c844e2fee0bf673d54c2c177f1713b3d2af2ff6e666b49cb7572e6cf42d" @@ -8294,7 +8228,6 @@ dependencies = [ "checksum parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" "checksum parity-util-mem 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "570093f39f786beea92dcc09e45d8aae7841516ac19a50431953ac82a0e8f85c" "checksum parity-wasm 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" -"checksum parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1e39faaa292a687ea15120b1ac31899b13586446521df6c149e46f1584671e0f" "checksum parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" @@ -8330,9 +8263,8 @@ dependencies = [ "checksum prost-derive 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e7dc378b94ac374644181a2247cebf59a6ec1c88b49ac77f3a94b86b79d0e11" "checksum prost-types 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1de482a366941c8d56d19b650fac09ca08508f2a696119ee7513ad590c8bac6f" "checksum protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40361836defdd5871ff7e84096c6f6444af7fc157f8ef1789f54f147687caa20" -"checksum pwasm-utils 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d473123ba135028544926f7aa6f34058d8bc6f120c4fcd3777f84af724280b3" +"checksum pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quickcheck 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9c35d9c36a562f37eca96e79f66d5fd56eefbc22560dacc4a864cabd2d277456" "checksum quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5ca504a2fdaa08d3517f442fbbba91ac24d1ec4c51ea68688a038765e3b2662" "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" @@ -8436,7 +8368,6 @@ dependencies = [ "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" "checksum target-lexicon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f4c118a7a38378f305a9e111fcb2f7f838c0be324bfb31a77ea04f7f6e684b4" "checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" "checksum test-case 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9" @@ -8523,7 +8454,6 @@ dependencies = [ "checksum wasm-gc-api 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" "checksum wasm-timer 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aa3e01d234bb71760e685cfafa5e2c96f8ad877c161a721646356651069e26ac" "checksum wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" -"checksum wasmi-validation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6bc0356e3df56e639fc7f7d8a99741915531e27ed735d911ed83d7e1339c8188" "checksum wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" "checksum wasmparser 0.39.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5083b449454f7de0b15f131eee17de54b5a71dcb9adcf11df2b2f78fad0cd82" "checksum wasmtime-debug 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5008729ad53f75020f28fa0d682269335d6f0eac0b3ffafe31f185b2f33aca74" diff --git a/substrate/bin/subkey/Cargo.toml b/substrate/bin/subkey/Cargo.toml index 978ecc709f..c7edb4f397 100644 --- a/substrate/bin/subkey/Cargo.toml +++ b/substrate/bin/subkey/Cargo.toml @@ -14,7 +14,7 @@ clap = "2.33.0" tiny-bip39 = "0.6.2" rustc-hex = "2.0.1" substrate-bip39 = "0.3.1" -hex = "0.3.2" +hex = "0.4.0" hex-literal = "0.2.1" codec = { package = "parity-scale-codec", version = "1.0.0" } system = { package = "frame-system", path = "../../frame/system" } diff --git a/substrate/client/cli/Cargo.toml b/substrate/client/cli/Cargo.toml index ef6134822e..976242d24d 100644 --- a/substrate/client/cli/Cargo.toml +++ b/substrate/client/cli/Cargo.toml @@ -37,7 +37,7 @@ rpassword = "4.0.1" substrate-tracing = { package = "substrate-tracing", path = "../tracing" } [dev-dependencies] -tempdir = "0.3.7" +tempfile = "3.1.0" [features] wasmtime = [ diff --git a/substrate/client/cli/src/lib.rs b/substrate/client/cli/src/lib.rs index 203ca04951..3be5a50d3d 100644 --- a/substrate/client/cli/src/lib.rs +++ b/substrate/client/cli/src/lib.rs @@ -969,7 +969,6 @@ fn kill_color(s: &str) -> String { #[cfg(test)] mod tests { use super::*; - use tempdir::TempDir; use network::config::identity::ed25519; #[test] @@ -1018,7 +1017,7 @@ mod tests { fn secret_file(net_config_dir: Option) -> error::Result<()> { NodeKeyType::variants().into_iter().try_for_each(|t| { let node_key_type = NodeKeyType::from_str(t).unwrap(); - let tmp = TempDir::new("alice")?; + let tmp = tempfile::Builder::new().prefix("alice").tempdir()?; let file = tmp.path().join(format!("{}_mysecret", t)).to_path_buf(); let params = NodeKeyParams { node_key_type, diff --git a/substrate/client/db/Cargo.toml b/substrate/client/db/Cargo.toml index 67372757a6..d713212b07 100644 --- a/substrate/client/db/Cargo.toml +++ b/substrate/client/db/Cargo.toml @@ -29,7 +29,7 @@ sp-blockchain = { path = "../../primitives/blockchain" } substrate-keyring = { path = "../../primitives/keyring" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } env_logger = "0.7.0" -quickcheck = "0.8" +quickcheck = "0.9" [features] default = [] diff --git a/substrate/client/executor/Cargo.toml b/substrate/client/executor/Cargo.toml index 8c46990395..9aa201ce96 100644 --- a/substrate/client/executor/Cargo.toml +++ b/substrate/client/executor/Cargo.toml @@ -14,7 +14,7 @@ serializer = { package = "substrate-serializer", path = "../../primitives/serial runtime_version = { package = "sr-version", path = "../../primitives/sr-version" } panic-handler = { package = "substrate-panic-handler", path = "../../primitives/panic-handler" } wasmi = "0.6.2" -parity-wasm = "0.40.3" +parity-wasm = "0.41.0" lazy_static = "1.4.0" wasm-interface = { package = "substrate-wasm-interface", path = "../../primitives/wasm-interface" } runtime-interface = { package = "substrate-runtime-interface", path = "../../primitives/runtime-interface" } diff --git a/substrate/client/keystore/Cargo.toml b/substrate/client/keystore/Cargo.toml index ef788d864f..2d006b1314 100644 --- a/substrate/client/keystore/Cargo.toml +++ b/substrate/client/keystore/Cargo.toml @@ -8,11 +8,11 @@ edition = "2018" derive_more = "0.99.2" primitives = { package = "substrate-primitives", path = "../../primitives/core" } app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto" } -hex = "0.3.2" +hex = "0.4.0" rand = "0.7.2" serde_json = "1.0.41" subtle = "2.1.1" parking_lot = "0.9.0" [dev-dependencies] -tempdir = "0.3.7" +tempfile = "3.1.0" diff --git a/substrate/client/keystore/src/lib.rs b/substrate/client/keystore/src/lib.rs index c86e9f8b88..3c1dffbb81 100644 --- a/substrate/client/keystore/src/lib.rs +++ b/substrate/client/keystore/src/lib.rs @@ -317,12 +317,12 @@ impl BareCryptoStore for Store { #[cfg(test)] mod tests { use super::*; - use tempdir::TempDir; + use tempfile::TempDir; use primitives::{testing::{SR25519}, crypto::{Ss58Codec}}; #[test] fn basic_store() { - let temp_dir = TempDir::new("keystore").unwrap(); + let temp_dir = TempDir::new().unwrap(); let store = Store::open(temp_dir.path(), None).unwrap(); assert!(store.read().public_keys::().unwrap().is_empty()); @@ -337,7 +337,7 @@ mod tests { #[test] fn test_insert_ephemeral_from_seed() { - let temp_dir = TempDir::new("keystore").unwrap(); + let temp_dir = TempDir::new().unwrap(); let store = Store::open(temp_dir.path(), None).unwrap(); let pair: ed25519::AppPair = store @@ -358,7 +358,7 @@ mod tests { #[test] fn password_being_used() { let password = String::from("password"); - let temp_dir = TempDir::new("keystore").unwrap(); + let temp_dir = TempDir::new().unwrap(); let store = Store::open(temp_dir.path(), Some(password.clone().into())).unwrap(); let pair: ed25519::AppPair = store.write().generate().unwrap(); @@ -380,7 +380,7 @@ mod tests { #[test] fn public_keys_are_returned() { - let temp_dir = TempDir::new("keystore").unwrap(); + let temp_dir = TempDir::new().unwrap(); let store = Store::open(temp_dir.path(), None).unwrap(); let mut public_keys = Vec::new(); @@ -403,7 +403,7 @@ mod tests { #[test] fn store_unknown_and_extract_it() { - let temp_dir = TempDir::new("keystore").unwrap(); + let temp_dir = TempDir::new().unwrap(); let store = Store::open(temp_dir.path(), None).unwrap(); let secret_uri = "//Alice"; diff --git a/substrate/client/network/Cargo.toml b/substrate/client/network/Cargo.toml index a536623d39..1362747f71 100644 --- a/substrate/client/network/Cargo.toml +++ b/substrate/client/network/Cargo.toml @@ -57,7 +57,7 @@ quickcheck = "0.9.0" rand = "0.7.2" test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } test_runtime = { package = "substrate-test-runtime", path = "../../test/utils/runtime" } -tempdir = "0.3.7" +tempfile = "3.1.0" tokio = "0.1.22" [features] diff --git a/substrate/client/network/src/config.rs b/substrate/client/network/src/config.rs index d10345c2f3..85e3e36cf6 100644 --- a/substrate/client/network/src/config.rs +++ b/substrate/client/network/src/config.rs @@ -502,7 +502,11 @@ where #[cfg(test)] mod tests { use super::*; - use tempdir::TempDir; + use tempfile::TempDir; + + fn tempdir_with_prefix(prefix: &str) -> TempDir { + tempfile::Builder::new().prefix(prefix).tempdir().unwrap() + } fn secret_bytes(kp: &Keypair) -> Vec { match kp { @@ -514,7 +518,7 @@ mod tests { #[test] fn test_secret_file() { - let tmp = TempDir::new("x").unwrap(); + let tmp = tempdir_with_prefix("x"); std::fs::remove_dir(tmp.path()).unwrap(); // should be recreated let file = tmp.path().join("x").to_path_buf(); let kp1 = NodeKeyConfig::Ed25519(Secret::File(file.clone())).into_keypair().unwrap(); diff --git a/substrate/client/service/test/Cargo.toml b/substrate/client/service/test/Cargo.toml index 7a85966a39..fa7f834efa 100644 --- a/substrate/client/service/test/Cargo.toml +++ b/substrate/client/service/test/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -tempdir = "0.3.7" +tempfile = "3.1.0" tokio = "0.1.22" futures = "0.1.29" log = "0.4.8" diff --git a/substrate/client/service/test/src/lib.rs b/substrate/client/service/test/src/lib.rs index 3b1e3593dc..73dc551800 100644 --- a/substrate/client/service/test/src/lib.rs +++ b/substrate/client/service/test/src/lib.rs @@ -22,7 +22,7 @@ use std::net::Ipv4Addr; use std::time::Duration; use log::info; use futures::{Future, Stream, Poll}; -use tempdir::TempDir; +use tempfile::TempDir; use tokio::{runtime::Runtime, prelude::FutureExt}; use tokio::timer::Interval; use service::{ @@ -290,6 +290,10 @@ impl TestNet where } } +fn tempdir_with_prefix(prefix: &str) -> TempDir { + tempfile::Builder::new().prefix(prefix).tempdir().expect("Error creating test dir") +} + pub fn connectivity( spec: ChainSpec, full_builder: Fb, @@ -314,7 +318,7 @@ pub fn connectivity( }; { - let temp = TempDir::new("substrate-connectivity-test").expect("Error creating test dir"); + let temp = tempdir_with_prefix("substrate-connectivity-test"); let runtime = { let mut network = TestNet::new( &temp, @@ -352,7 +356,7 @@ pub fn connectivity( temp.close().expect("Error removing temp dir"); } { - let temp = TempDir::new("substrate-connectivity-test").expect("Error creating test dir"); + let temp = tempdir_with_prefix("substrate-connectivity-test"); { let mut network = TestNet::new( &temp, @@ -414,7 +418,7 @@ pub fn sync( // FIXME: BABE light client support is currently not working. const NUM_LIGHT_NODES: usize = 10; const NUM_BLOCKS: usize = 512; - let temp = TempDir::new("substrate-sync-test").expect("Error creating test dir"); + let temp = tempdir_with_prefix("substrate-sync-test"); let mut network = TestNet::new( &temp, spec.clone(), @@ -479,7 +483,7 @@ pub fn consensus( const NUM_FULL_NODES: usize = 10; const NUM_LIGHT_NODES: usize = 10; const NUM_BLOCKS: usize = 10; // 10 * 2 sec block production time = ~20 seconds - let temp = TempDir::new("substrate-conensus-test").expect("Error creating test dir"); + let temp = tempdir_with_prefix("substrate-conensus-test"); let mut network = TestNet::new( &temp, spec.clone(), diff --git a/substrate/frame/contracts/Cargo.toml b/substrate/frame/contracts/Cargo.toml index 2b4536dd8a..4a870b18e4 100644 --- a/substrate/frame/contracts/Cargo.toml +++ b/substrate/frame/contracts/Cargo.toml @@ -6,10 +6,10 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -pwasm-utils = { version = "0.11.0", default-features = false } +pwasm-utils = { version = "0.12.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -parity-wasm = { version = "0.40.3", default-features = false } -wasmi-validation = { version = "0.2.0", default-features = false } +parity-wasm = { version = "0.41.0", default-features = false } +wasmi-validation = { version = "0.3.0", default-features = false } primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } @@ -23,7 +23,6 @@ wabt = "0.9.2" assert_matches = "1.3.0" hex-literal = "0.2.1" balances = { package = "pallet-balances", path = "../balances" } -hex = "0.3.2" timestamp = { package = "pallet-timestamp", path = "../timestamp" } randomness-collective-flip = { package = "pallet-randomness-collective-flip", path = "../randomness-collective-flip" } diff --git a/substrate/frame/support/procedural/tools/Cargo.toml b/substrate/frame/support/procedural/tools/Cargo.toml index 740a6985fe..8a9f87116b 100644 --- a/substrate/frame/support/procedural/tools/Cargo.toml +++ b/substrate/frame/support/procedural/tools/Cargo.toml @@ -8,5 +8,5 @@ edition = "2018" frame-support-procedural-tools-derive = { package = "frame-support-procedural-tools-derive", path = "./derive" } proc-macro2 = "1.0.6" quote = "1.0.2" -syn = { version = "1.0.7", features = ["full"] } +syn = { version = "1.0.7", features = ["full", "visit"] } proc-macro-crate = "0.1.4" diff --git a/substrate/primitives/core/Cargo.toml b/substrate/primitives/core/Cargo.toml index 240da745f4..e15c5ac49f 100644 --- a/substrate/primitives/core/Cargo.toml +++ b/substrate/primitives/core/Cargo.toml @@ -17,7 +17,7 @@ impl-serde = { version = "0.2.3", optional = true } wasmi = { version = "0.6.2", optional = true } hash-db = { version = "0.15.2", default-features = false } hash256-std-hasher = { version = "0.15.2", default-features = false } -ed25519-dalek = { version = "0.9.1", default-features = false, features = ["u64_backend"], optional = true } +ed25519-dalek = { version = "1.0.0-pre.2", default-features = false, features = ["u64_backend"], optional = true } base58 = { version = "0.1.0", optional = true } blake2-rfc = { version = "0.2.18", default-features = false, optional = true } schnorrkel = { version = "0.8.5", features = ["preaudit_deprecated"], default-features = false, optional = true } diff --git a/substrate/primitives/core/src/ed25519.rs b/substrate/primitives/core/src/ed25519.rs index 37933ee678..34ec0d6c8d 100644 --- a/substrate/primitives/core/src/ed25519.rs +++ b/substrate/primitives/core/src/ed25519.rs @@ -445,7 +445,7 @@ impl TraitPair for Pair { fn from_seed_slice(seed_slice: &[u8]) -> Result { let secret = ed25519_dalek::SecretKey::from_bytes(seed_slice) .map_err(|_| SecretStringError::InvalidSeedLength)?; - let public = ed25519_dalek::PublicKey::from(secret.expand::()); + let public = ed25519_dalek::PublicKey::from(&secret); Ok(Pair(ed25519_dalek::Keypair { secret, public })) } @@ -474,7 +474,7 @@ impl TraitPair for Pair { /// Sign a message. fn sign(&self, message: &[u8]) -> Signature { - let r = self.0.sign::(message).to_bytes(); + let r = self.0.sign(message).to_bytes(); Signature::from_raw(r) } @@ -498,7 +498,7 @@ impl TraitPair for Pair { Err(_) => return false }; - match public_key.verify::(message.as_ref(), &sig) { + match public_key.verify(message.as_ref(), &sig) { Ok(_) => true, _ => false, } diff --git a/substrate/primitives/transaction-pool/Cargo.toml b/substrate/primitives/transaction-pool/Cargo.toml index b2ea581249..ce20c8acec 100644 --- a/substrate/primitives/transaction-pool/Cargo.toml +++ b/substrate/primitives/transaction-pool/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -derive_more = "0.15.0" +derive_more = "0.99.2" futures = "0.3.1" log = "0.4.8" serde = { version = "1.0.101", features = ["derive"] }