Move import lock onto backend (#2797)

* Drop import_lock from client, move it into backend, impl default version via static mutex

* still need to allow depcretion because of client.backend

* additional docs

* Remove default impl of get_import_lock, impl on instances

* Bump parking_lot to 0.8.0 accross the board
This commit is contained in:
Benjamin Kampmann
2019-06-05 15:46:01 +02:00
committed by Bastian Köcher
parent 4f888f34d3
commit eaa0ab014a
37 changed files with 101 additions and 97 deletions
+39 -39
View File
@@ -677,7 +677,7 @@ dependencies = [
[[package]]
name = "curve25519-dalek"
version = "1.1.4"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -739,7 +739,7 @@ version = "1.0.0-pre.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.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"curve25519-dalek 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1009,7 +1009,7 @@ dependencies = [
[[package]]
name = "h2"
version = "0.1.22"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1195,7 +1195,7 @@ dependencies = [
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"h2 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
"h2 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
"http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
"http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1517,7 +1517,7 @@ dependencies = [
"libp2p-websocket 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-yamux 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multihash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1543,7 +1543,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"multistream-select 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multihash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"protobuf 2.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1648,7 +1648,7 @@ dependencies = [
"libp2p-core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multihash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"protobuf 2.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1704,7 +1704,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
"curve25519-dalek 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"curve25519-dalek 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p-core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2271,7 +2271,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"node-template-runtime 2.0.0",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0",
"substrate-basic-authorship 2.0.0",
"substrate-cli 2.0.0",
@@ -2476,7 +2476,7 @@ dependencies = [
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
"data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-multihash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2485,7 +2485,7 @@ dependencies = [
[[package]]
name = "parity-multihash"
version = "0.1.1"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"blake2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3083,7 +3083,7 @@ version = "0.1.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.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"curve25519-dalek 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"merlin 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3448,7 +3448,7 @@ version = "2.0.0"
dependencies = [
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0",
"sr-primitives 2.0.0",
@@ -3470,7 +3470,7 @@ dependencies = [
"hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0",
"sr-primitives 2.0.0",
@@ -3613,7 +3613,7 @@ version = "2.0.0"
dependencies = [
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0",
"sr-primitives 2.0.0",
@@ -4008,7 +4008,7 @@ dependencies = [
"kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-api-macros 2.0.0",
"sr-primitives 2.0.0",
"sr-std 2.0.0",
@@ -4036,7 +4036,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
"substrate-client 2.0.0",
"substrate-consensus-common 2.0.0",
@@ -4057,7 +4057,7 @@ dependencies = [
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0",
"sr-primitives 2.0.0",
"sr-version 2.0.0",
@@ -4112,7 +4112,7 @@ dependencies = [
"merlin 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0",
@@ -4157,7 +4157,7 @@ dependencies = [
"libp2p 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
"sr-std 2.0.0",
"sr-version 2.0.0",
@@ -4176,7 +4176,7 @@ dependencies = [
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rhododendron 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0",
"sr-primitives 2.0.0",
@@ -4199,7 +4199,7 @@ dependencies = [
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
"substrate-client 2.0.0",
"substrate-consensus-common 2.0.0",
@@ -4221,7 +4221,7 @@ dependencies = [
"libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0",
"sr-version 2.0.0",
"substrate-panic-handler 2.0.0",
@@ -4244,7 +4244,7 @@ dependencies = [
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
@@ -4278,7 +4278,7 @@ name = "substrate-inherents"
version = "2.0.0"
dependencies = [
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
"sr-std 2.0.0",
]
@@ -4321,7 +4321,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
@@ -4349,7 +4349,7 @@ dependencies = [
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libp2p 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4374,7 +4374,7 @@ dependencies = [
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
"substrate-client 2.0.0",
"substrate-consensus-common 2.0.0",
@@ -4460,7 +4460,7 @@ dependencies = [
"jsonrpc-pubsub 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4513,7 +4513,7 @@ dependencies = [
"node-primitives 2.0.0",
"node-runtime 2.0.0",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4561,7 +4561,7 @@ dependencies = [
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"substrate-primitives 2.0.0",
]
@@ -4574,7 +4574,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"substrate-panic-handler 2.0.0",
"substrate-primitives 2.0.0",
"substrate-trie 2.0.0",
@@ -4588,7 +4588,7 @@ version = "2.0.0"
dependencies = [
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4655,7 +4655,7 @@ dependencies = [
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
"substrate-primitives 2.0.0",
@@ -4670,7 +4670,7 @@ dependencies = [
"futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 2.0.0",
"substrate-client 2.0.0",
"substrate-keyring 2.0.0",
@@ -5631,7 +5631,7 @@ version = "0.5.2"
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.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"curve25519-dalek 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -5781,7 +5781,7 @@ dependencies = [
"checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736"
"checksum ctrlc 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5531b7f0698d9220b4729f8811931dbe0e91a05be2f7b3245fdc50dd856bae26"
"checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f"
"checksum curve25519-dalek 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "750226d75fc2f5a8daec6e7477624e258674023eb73d8d647f63b943ca182a4a"
"checksum curve25519-dalek 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4440b7acc6264fde2eee18bae135625129c88ff244f3ded035e3caa585a6bf0a"
"checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97"
"checksum derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d944ac6003ed268757ef1ee686753b57efc5fcf0ebe7b64c9fc81e7e32ff839"
"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
@@ -5820,7 +5820,7 @@ dependencies = [
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
"checksum globset 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef4feaabe24a0a658fd9cf4a9acf6ed284f045c77df0f49020ba3245cfb7b454"
"checksum h2 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "09ae3ecbdc15e379c7356430d7c0c6a44d3a937324999429dcf89e970297e54f"
"checksum h2 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "1e42e3daed5a7e17b12a0c23b5b2fbff23a925a570938ebee4baca1a9a1a2240"
"checksum hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba7fb417e5c470acdd61068c79767d0e65962e70836cf6c9dfd2409f06345ce0"
"checksum hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f8b2027c19ec91eb304999abae7307d225cf93be42af53b0039f76e98ed5af86"
"checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da"
@@ -5940,7 +5940,7 @@ dependencies = [
"checksum parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb43c05fb71c03b4ea7327bf15694da1e0f23f19d5b1e95bab6c6d74097e336"
"checksum parity-codec-derive 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00a486fd383382ddcb2de928364b1f82571c1e48274fc43b7667a4738ee4056c"
"checksum parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7"
"checksum parity-multihash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05d6a68e07ab34a9e87bd8dd4936f6bb5be21e4f6dbcdbaf04d8e854eba0af01"
"checksum parity-multihash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eb83358a0c05e52c44d658981fec2d146d3516d1adffd9e553684f8c8e9e8fa5"
"checksum parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f"
"checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc"
"checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac"
+1 -1
View File
@@ -8,7 +8,7 @@ edition = "2018"
derive_more = { version = "0.14.0", optional = true }
fnv = { version = "1.0", optional = true }
log = { version = "0.4", optional = true }
parking_lot = { version = "0.7.1", optional = true }
parking_lot = { version = "0.8.0", optional = true }
hex = { package = "hex-literal", version = "0.1", optional = true }
futures = { version = "0.1.17", optional = true }
consensus = { package = "substrate-consensus-common", path = "../consensus/common", optional = true }
+1 -1
View File
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
parking_lot = "0.7.1"
parking_lot = "0.8"
log = "0.4"
kvdb = { git = "https://github.com/paritytech/parity-common", rev="b0317f649ab2c665b7987b8475878fc4d2e1f81d" }
# FIXME replace with release as soon as our rocksdb changes are released upstream https://github.com/paritytech/parity-common/issues/88
+6
View File
@@ -656,6 +656,7 @@ pub struct Backend<Block: BlockT> {
blockchain: BlockchainDb<Block>,
canonicalization_delay: u64,
shared_cache: SharedCache<Block, Blake2Hasher>,
import_lock: Mutex<()>,
}
impl<Block: BlockT<Hash=H256>> Backend<Block> {
@@ -722,6 +723,7 @@ impl<Block: BlockT<Hash=H256>> Backend<Block> {
blockchain,
canonicalization_delay,
shared_cache: new_shared_cache(state_cache_size),
import_lock: Default::default(),
})
}
@@ -1350,6 +1352,10 @@ impl<Block> client::backend::Backend<Block, Blake2Hasher> for Backend<Block> whe
}
Ok(())
}
fn get_import_lock(&self) -> &Mutex<()> {
&self.import_lock
}
}
impl<Block> client::backend::LocalBackend<Block, Blake2Hasher> for Backend<Block>
+8
View File
@@ -26,6 +26,7 @@ use state_machine::ChangesTrieStorage as StateChangesTrieStorage;
use consensus::well_known_cache_keys;
use hash_db::Hasher;
use trie::MemoryDB;
use parking_lot::Mutex;
/// State of a new block.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -174,6 +175,13 @@ pub trait Backend<Block, H>: AuxStore + Send + Sync where
fn get_aux(&self, key: &[u8]) -> error::Result<Option<Vec<u8>>> {
AuxStore::get_aux(self, key)
}
/// Gain access to the import lock around this backend.
/// _Note_ Backend isn't expected to acquire the lock by itself ever. Rather
/// the using components should acquire and hold the lock whenever they do
/// something that the import of a block would interfere with, e.g. importing
/// a new block or calculating the best head.
fn get_import_lock(&self) -> &Mutex<()>;
}
/// Changes trie storage that supports pruning.
+3 -18
View File
@@ -124,7 +124,6 @@ pub struct Client<B, E, Block, RA> where Block: BlockT {
storage_notifications: Mutex<StorageNotifications<Block>>,
import_notification_sinks: Mutex<Vec<mpsc::UnboundedSender<BlockImportNotification<Block>>>>,
finality_notification_sinks: Mutex<Vec<mpsc::UnboundedSender<FinalityNotification<Block>>>>,
import_lock: Arc<Mutex<()>>,
// holds the block hash currently being imported. TODO: replace this with block queue
importing_block: RwLock<Option<Block::Hash>>,
execution_strategies: ExecutionStrategies,
@@ -318,7 +317,6 @@ impl<B, E, Block, RA> Client<B, E, Block, RA> where
storage_notifications: Default::default(),
import_notification_sinks: Default::default(),
finality_notification_sinks: Default::default(),
import_lock: Default::default(),
importing_block: Default::default(),
execution_strategies,
_phantom: Default::default(),
@@ -344,15 +342,6 @@ impl<B, E, Block, RA> Client<B, E, Block, RA> where
&self.backend
}
/// Expose reference to import lock
#[doc(hidden)]
#[deprecated(note="Rather than relying on `client` to provide this, access \
to the backend should be handled at setup only - see #1134. This function \
will be removed once that is in place.")]
pub fn import_lock(&self) -> Arc<Mutex<()>> {
self.import_lock.clone()
}
/// Given a `BlockId` and a key prefix, return the matching child storage keys in that block.
pub fn storage_keys(&self, id: &BlockId<Block>, key_prefix: &StorageKey) -> error::Result<Vec<StorageKey>> {
let keys = self.state_at(id)?.keys(&key_prefix.0).into_iter().map(StorageKey).collect();
@@ -744,7 +733,7 @@ impl<B, E, Block, RA> Client<B, E, Block, RA> where
Err: From<error::Error>,
{
let inner = || {
let _import_lock = self.import_lock.lock();
let _import_lock = self.backend.get_import_lock().lock();
let mut op = ClientImportOperation {
op: self.backend.begin_operation()?,
@@ -1493,17 +1482,14 @@ where
/// where 'longest' is defined as the highest number of blocks
pub struct LongestChain<B, Block> {
backend: Arc<B>,
import_lock: Arc<Mutex<()>>,
_phantom: PhantomData<Block>
}
impl<B, Block> Clone for LongestChain<B, Block> {
fn clone(&self) -> Self {
let backend = self.backend.clone();
let import_lock = self.import_lock.clone();
LongestChain {
backend,
import_lock,
_phantom: Default::default()
}
}
@@ -1515,10 +1501,9 @@ where
Block: BlockT<Hash=H256>,
{
/// Instantiate a new LongestChain for Backend B
pub fn new(backend: Arc<B>, import_lock: Arc<Mutex<()>>) -> Self {
pub fn new(backend: Arc<B>) -> Self {
LongestChain {
backend,
import_lock,
_phantom: Default::default()
}
}
@@ -1564,7 +1549,7 @@ where
// ensure no blocks are imported during this code block.
// an import could trigger a reorg which could change the canonical chain.
// we depend on the canonical chain staying the same during this code block.
let _import_lock = self.import_lock.lock();
let _import_lock = self.backend.get_import_lock().lock();
let info = self.backend.blockchain().info();
+7 -1
View File
@@ -18,7 +18,7 @@
use std::collections::HashMap;
use std::sync::Arc;
use parking_lot::RwLock;
use parking_lot::{RwLock, Mutex};
use primitives::{ChangesTrieConfiguration, storage::well_known_keys};
use runtime_primitives::generic::BlockId;
use runtime_primitives::traits::{
@@ -541,6 +541,7 @@ where
states: RwLock<HashMap<Block::Hash, InMemory<H>>>,
changes_trie_storage: ChangesTrieStorage<Block, H>,
blockchain: Blockchain<Block>,
import_lock: Mutex<()>,
}
impl<Block, H> Backend<Block, H>
@@ -555,6 +556,7 @@ where
states: RwLock::new(HashMap::new()),
changes_trie_storage: ChangesTrieStorage(InMemoryChangesTrieStorage::new()),
blockchain: Blockchain::new(),
import_lock: Default::default(),
}
}
}
@@ -684,6 +686,10 @@ where
fn revert(&self, _n: NumberFor<Block>) -> error::Result<NumberFor<Block>> {
Ok(Zero::zero())
}
fn get_import_lock(&self) -> &Mutex<()> {
&self.import_lock
}
}
impl<Block, H> backend::LocalBackend<Block, H> for Backend<Block, H>
+7 -1
View File
@@ -20,7 +20,7 @@
use std::collections::HashMap;
use std::sync::{Arc, Weak};
use futures::{Future, IntoFuture};
use parking_lot::RwLock;
use parking_lot::{RwLock, Mutex};
use runtime_primitives::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay};
use state_machine::{Backend as StateBackend, TrieBackend, backend::InMemory as InMemoryState};
@@ -41,6 +41,7 @@ const IN_MEMORY_EXPECT_PROOF: &str = "InMemory state backend has Void error type
pub struct Backend<S, F, H: Hasher> {
blockchain: Arc<Blockchain<S, F>>,
genesis_state: RwLock<Option<InMemoryState<H>>>,
import_lock: Mutex<()>,
}
/// Light block (header and justification) import operation.
@@ -77,6 +78,7 @@ impl<S, F, H: Hasher> Backend<S, F, H> {
Self {
blockchain,
genesis_state: RwLock::new(None),
import_lock: Default::default(),
}
}
@@ -213,6 +215,10 @@ impl<S, F, Block, H> ClientBackend<Block, H> for Backend<S, F, H> where
fn revert(&self, _n: NumberFor<Block>) -> ClientResult<NumberFor<Block>> {
Err(ClientError::NotAvailableOnLightClient.into())
}
fn get_import_lock(&self) -> &Mutex<()> {
&self.import_lock
}
}
impl<S, F, Block, H> RemoteBackend<Block, H> for Backend<S, F, H>
+1 -1
View File
@@ -23,7 +23,7 @@ authorities = { package = "substrate-consensus-authorities", path = "../authorit
runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" }
futures = "0.1.17"
tokio = "0.1.7"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
log = "0.4"
[dev-dependencies]
-1
View File
@@ -886,7 +886,6 @@ mod tests {
#[allow(deprecated)]
let select_chain = LongestChain::new(
client.backend().clone(),
client.import_lock().clone(),
);
let environ = Arc::new(DummyFactory(client.clone()));
import_notifications.push(
+1 -1
View File
@@ -24,7 +24,7 @@ slots = { package = "substrate-consensus-slots", path = "../slots" }
runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" }
futures = "0.1.26"
tokio = "0.1.18"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
log = "0.4.6"
schnorrkel = "0.1.1"
rand = "0.6.5"
+1 -1
View File
@@ -975,7 +975,7 @@ mod tests {
#[allow(deprecated)]
let select_chain = LongestChain::new(client.backend().clone(), client.import_lock().clone());
let select_chain = LongestChain::new(client.backend().clone());
let babe = start_babe(BabeParams {
config,
+1 -1
View File
@@ -18,7 +18,7 @@ runtime_version = { package = "sr-version", path = "../../sr-version" }
runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" }
tokio-timer = "0.2"
parity-codec = { version = "3.3", features = ["derive"] }
parking_lot = "0.7.1"
parking_lot = "0.8.0"
[dev-dependencies]
test_client = { package = "substrate-test-client", path = "../../test-client" }
+1 -1
View File
@@ -20,7 +20,7 @@ runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" }
runtime_version = { package = "sr-version", path = "../../sr-version" }
runtime_io = { package = "sr-io", path = "../../sr-io" }
tokio = "0.1.7"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
log = "0.4"
rhododendron = { version = "0.5.0", features = ["codec"] }
exit-future = "0.1"
+1 -1
View File
@@ -14,7 +14,7 @@ consensus_common = { package = "substrate-consensus-common", path = "../common"
inherents = { package = "substrate-inherents", path = "../../inherents" }
futures = "0.1.17"
tokio = "0.1.7"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
log = "0.4"
[dev-dependencies]
+1 -1
View File
@@ -17,7 +17,7 @@ panic-handler = { package = "substrate-panic-handler", path = "../panic-handler"
wasmi = { version = "0.4.3" }
byteorder = "1.1"
lazy_static = "1.0"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
log = "0.4"
libsecp256k1 = "0.2.1"
tiny-keccak = "1.4.2"
+1 -1
View File
@@ -8,7 +8,7 @@ edition = "2018"
fork-tree = { path = "../../core/util/fork-tree" }
futures = "0.1"
log = "0.4"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
tokio = "0.1.7"
rand = "0.6"
parity-codec = { version = "3.3", features = ["derive"] }
+1 -2
View File
@@ -121,8 +121,7 @@ impl TestNetFactory for GrandpaTestNet {
PeersClient::Full(ref client) => {
#[allow(deprecated)]
let select_chain = LongestChain::new(
client.backend().clone(),
client.import_lock().clone()
client.backend().clone()
);
let (import, link) = block_import(
client.clone(),
+1 -1
View File
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
parking_lot = { version = "0.7", optional = true }
parking_lot = { version = "0.8.0", optional = true }
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
runtime_primitives = { package = "sr-primitives", path = "../sr-primitives", default-features = false }
+1 -1
View File
@@ -13,7 +13,7 @@ bytes = "0.4"
fnv = "1.0"
futures = "0.1"
libp2p = { version = "0.9.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] }
parking_lot = "0.7.1"
parking_lot = "0.8.0"
lazy_static = "1.2"
log = "0.4"
rand = "0.6"
+1 -1
View File
@@ -11,7 +11,7 @@ edition = "2018"
[dependencies]
derive_more = "0.14.0"
log = "0.4"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
bitflags = "1.0"
futures = "0.1.17"
linked-hash-map = "0.5"
+1 -1
View File
@@ -13,7 +13,7 @@ futures = "0.1.25"
log = "0.4"
offchain-primitives = { package = "substrate-offchain-primitives", path = "./primitives" }
parity-codec = { version = "3.3", features = ["derive"] }
parking_lot = "0.7.1"
parking_lot = "0.8.0"
primitives = { package = "substrate-primitives", path = "../../core/primitives" }
runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitives" }
tokio = "0.1.7"
+1 -1
View File
@@ -11,7 +11,7 @@ jsonrpc-core-client = "12.0.0"
jsonrpc-pubsub = "12.0.0"
jsonrpc-derive = "12.0.0"
log = "0.4"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
parity-codec = "3.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
derive_more = "0.14.0"
futures = "0.1.17"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
lazy_static = "1.0"
log = "0.4"
slog = {version = "^2", features = ["nested-values"]}
+2 -1
View File
@@ -622,7 +622,8 @@ impl<C: Components> network::TransactionPool<ComponentExHash<C>, ComponentBlock<
/// { |_, client| Ok(BasicQueue::new(Arc::new(MyVerifier), client, None, None, None)) },
/// SelectChain = LongestChain<FullBackend<Self>, Self::Block>
/// { |config: &FactoryFullConfiguration<Self>, client: Arc<FullClient<Self>>| {
/// Ok(LongestChain::new(client.backend().clone(), client.import_lock()))
/// #[allow(deprecated)]
/// Ok(LongestChain::new(client.backend().clone()))
/// }},
/// FinalityProofProvider = { |client: Arc<FullClient<Self>>| {
/// Ok(Some(Arc::new(grandpa::FinalityProofProvider::new(client.clone(), client)) as _))
+1 -1
View File
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
parking_lot = "0.7.1"
parking_lot = "0.8.0"
log = "0.4"
primitives = { package = "substrate-primitives", path = "../../core/primitives" }
parity-codec = { version = "3.3", features = ["derive"] }
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
log = "0.4"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
hash-db = "0.12"
trie-db = "0.12"
trie-root = "0.12"
+1 -1
View File
@@ -6,7 +6,7 @@ description = "Telemetry utils"
edition = "2018"
[dependencies]
parking_lot = "0.7.1"
parking_lot = "0.8.0"
lazy_static = "1.0"
log = "0.4"
rand = "0.6"
+1 -1
View File
@@ -237,7 +237,7 @@ impl<E, B> TestClientBuilder<E, B> where
).expect("Creates new client");
#[allow(deprecated)]
let longest_chain = client::LongestChain::new(self.backend, client.import_lock());
let longest_chain = client::LongestChain::new(self.backend);
(client, longest_chain)
}
+1 -1
View File
@@ -9,7 +9,7 @@ derive_more = "0.14.0"
futures = "0.1"
log = "0.4"
parity-codec = "3.3"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
sr-primitives = { path = "../sr-primitives" }
client = { package = "substrate-client", path = "../client" }
substrate-primitives = { path = "../primitives" }
@@ -8,7 +8,7 @@ edition = "2018"
derive_more = "0.14.0"
futures = "0.1"
log = "0.4"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
serde = { version = "1.0", features = ["derive"] }
substrate-primitives = { path = "../../primitives" }
sr-primitives = { path = "../../sr-primitives" }
+1 -1
View File
@@ -16,7 +16,7 @@ ctrlc = { version = "3.0", features = ["termination"] }
log = "0.4"
tokio = "0.1"
exit-future = "0.1"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
parity-codec = "3.3"
trie-root = "0.12.2"
sr-io = { path = "../core/sr-io" }
+1 -4
View File
@@ -129,10 +129,7 @@ construct_service_factory! {
SelectChain = LongestChain<FullBackend<Self>, Self::Block>
{ |config: &FactoryFullConfiguration<Self>, client: Arc<FullClient<Self>>| {
#[allow(deprecated)]
Ok(LongestChain::new(
client.backend().clone(),
client.import_lock()
))
Ok(LongestChain::new(client.backend().clone()))
}
},
FinalityProofProvider = { |_client: Arc<FullClient<Self>>| {
+1 -4
View File
@@ -205,10 +205,7 @@ construct_service_factory! {
SelectChain = LongestChain<FullBackend<Self>, Self::Block>
{ |config: &FactoryFullConfiguration<Self>, client: Arc<FullClient<Self>>| {
#[allow(deprecated)]
Ok(LongestChain::new(
client.backend().clone(),
client.import_lock()
))
Ok(LongestChain::new(client.backend().clone()))
}
},
FinalityProofProvider = { |client: Arc<FullClient<Self>>| {
+1 -1
View File
@@ -18,7 +18,7 @@ session = { package = "srml-session", path = "../session", default-features = fa
[dev-dependencies]
lazy_static = "1.0"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
substrate-primitives = { path = "../../core/primitives" }
runtime_io = { package = "sr-io", path = "../../core/sr-io" }
consensus = { package = "srml-consensus", path = "../consensus" }
+1 -1
View File
@@ -20,7 +20,7 @@ babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../
[dev-dependencies]
lazy_static = "1.3.0"
parking_lot = "0.7.1"
parking_lot = "0.8.0"
substrate-primitives = { path = "../../core/primitives" }
runtime_io = { package = "sr-io", path = "../../core/sr-io" }
consensus = { package = "srml-consensus", path = "../consensus" }
+1 -1
View File
@@ -17,7 +17,7 @@ srml-system = { path = "../system", default-features = false }
substrate-primitives = { path = "../../core/primitives", default-features = false }
sr-io = { path = "../../core/sr-io", default-features = false }
lazy_static = "1.0"
parking_lot = "0.7"
parking_lot = "0.8.0"
[features]
default = ["std"]