depend-o-pocalipse (#9450)

Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.  
Updated code related to deprecated warning on tracing-subscriber `scope()` 
( See https://github.com/tokio-rs/tracing/issues/1429 )
This commit is contained in:
Squirrel
2021-08-13 15:18:37 +01:00
committed by GitHub
parent 76504e56d7
commit 7e9b8d278e
129 changed files with 487 additions and 726 deletions
+4 -9
View File
@@ -14,25 +14,21 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
"derive",
] }
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
derive_more = "0.99.2"
sc-executor = { version = "0.10.0-dev", path = "../executor" }
sp-externalities = { version = "0.10.0-dev", path = "../../primitives/externalities" }
fnv = "1.0.6"
futures = "0.3.1"
hash-db = { version = "0.15.2", default-features = false }
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
sp-inherents = { version = "4.0.0-dev", default-features = false, path = "../../primitives/inherents" }
kvdb = "0.10.0"
log = "0.4.8"
parking_lot = "0.11.1"
lazy_static = "1.4.0"
sp-database = { version = "4.0.0-dev", path = "../../primitives/database" }
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
sp-keystore = { version = "0.10.0-dev", default-features = false, path = "../../primitives/keystore" }
sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primitives/std" }
sp-version = { version = "4.0.0-dev", default-features = false, path = "../../primitives/version" }
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
@@ -43,7 +39,6 @@ sc-transaction-pool-api = { version = "4.0.0-dev", path = "../transaction-pool/a
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.9.0", path = "../../utils/prometheus" }
[dev-dependencies]
kvdb-memorydb = "0.10.0"
sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" }
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
thiserror = "1.0.21"
@@ -20,18 +20,16 @@ prost-build = "0.7"
async-trait = "0.1"
codec = { package = "parity-scale-codec", default-features = false, version = "2.0.0" }
derive_more = "0.99.2"
either = "1.5.3"
futures = "0.3.9"
futures-timer = "3.0.1"
ip_network = "0.3.4"
libp2p = { version = "0.37.1", default-features = false, features = ["kad"] }
log = "0.4.8"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0" }
prost = "0.7"
rand = "0.7.2"
sc-client-api = { version = "4.0.0-dev", path = "../api" }
sc-network = { version = "0.10.0-dev", path = "../network" }
serde_json = "1.0.41"
sp-authority-discovery = { version = "4.0.0-dev", path = "../../primitives/authority-discovery" }
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
@@ -42,5 +40,4 @@ sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
[dev-dependencies]
quickcheck = "1.0.3"
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
sc-peerset = { version = "4.0.0-dev", path = "../peerset" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client"}
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
@@ -319,8 +319,9 @@ where
for inherent in block_builder.create_inherents(inherent_data)? {
match block_builder.push(inherent) {
Err(ApplyExtrinsicFailed(Validity(e))) if e.exhausted_resources() =>
warn!("⚠️ Dropping non-mandatory inherent from overweight block."),
Err(ApplyExtrinsicFailed(Validity(e))) if e.exhausted_resources() => {
warn!("⚠️ Dropping non-mandatory inherent from overweight block.")
},
Err(ApplyExtrinsicFailed(Validity(e))) if e.was_mandatory() => {
error!(
"❌️ Mandatory inherent extrinsic returned error. Block cannot be produced."
+3 -2
View File
@@ -22,8 +22,9 @@ sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
sp-block-builder = { version = "4.0.0-dev", path = "../../primitives/block-builder" }
sp-inherents = { version = "4.0.0-dev", path = "../../primitives/inherents" }
sc-client-api = { version = "4.0.0-dev", path = "../api" }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
"derive",
] }
[dev-dependencies]
substrate-test-runtime-client = { path = "../../test-utils/runtime/client" }
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
+1 -6
View File
@@ -24,19 +24,16 @@ sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/commo
sp-consensus-slots = { version = "0.10.0-dev", path = "../../../primitives/consensus/slots" }
derive_more = "0.99.2"
futures = "0.3.9"
futures-timer = "3.0.1"
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
log = "0.4.8"
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
sp-version = { version = "4.0.0-dev", path = "../../../primitives/version" }
sc-consensus-slots = { version = "0.10.0-dev", path = "../slots" }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
sp-keystore = { version = "0.10.0-dev", path = "../../../primitives/keystore" }
sc-telemetry = { version = "4.0.0-dev", path = "../../telemetry" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0"}
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0" }
async-trait = "0.1.50"
# We enable it only for web-wasm check
# See https://docs.rs/getrandom/0.2.1/getrandom/#webassembly-support
@@ -46,11 +43,9 @@ getrandom = { version = "0.2", features = ["js"], optional = true }
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
sp-keyring = { version = "4.0.0-dev", path = "../../../primitives/keyring" }
sp-tracing = { version = "4.0.0-dev", path = "../../../primitives/tracing" }
sc-executor = { version = "0.10.0-dev", path = "../../executor" }
sc-keystore = { version = "4.0.0-dev", path = "../../keystore" }
sc-network = { version = "0.10.0-dev", path = "../../network" }
sc-network-test = { version = "0.8.0", path = "../../network/test" }
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../service" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
tempfile = "3.1.0"
parking_lot = "0.11.1"
+4 -8
View File
@@ -14,7 +14,9 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
"derive",
] }
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
@@ -37,14 +39,11 @@ sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain"
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
sp-consensus-slots = { version = "0.10.0-dev", path = "../../../primitives/consensus/slots" }
sp-consensus-vrf = { version = "0.10.0-dev", path = "../../../primitives/consensus/vrf" }
sc-consensus-uncles = { version = "0.10.0-dev", path = "../uncles" }
sc-consensus-slots = { version = "0.10.0-dev", path = "../slots" }
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
sp-utils = { version = "4.0.0-dev", path = "../../../primitives/utils" }
fork-tree = { version = "3.0.0", path = "../../../utils/fork-tree" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0"}
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0" }
futures = "0.3.9"
futures-timer = "3.0.1"
parking_lot = "0.11.1"
log = "0.4.8"
schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated"] }
@@ -56,12 +55,9 @@ async-trait = "0.1.50"
[dev-dependencies]
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
sp-keyring = { version = "4.0.0-dev", path = "../../../primitives/keyring" }
sp-tracing = { version = "4.0.0-dev", path = "../../../primitives/tracing" }
sc-executor = { version = "0.10.0-dev", path = "../../executor" }
sc-network = { version = "0.10.0-dev", path = "../../network" }
sc-network-test = { version = "0.8.0", path = "../../network/test" }
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../service" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
sc-block-builder = { version = "0.10.0-dev", path = "../../block-builder" }
rand_chacha = "0.2.2"
+2 -2
View File
@@ -20,8 +20,8 @@ futures = { version = "0.3.1", features = ["thread-pool"] }
futures-timer = "3.0.1"
sc-client-api = { version = "4.0.0-dev", path = "../../api" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
sp-core = { path = "../../../primitives/core", version = "4.0.0-dev"}
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev"}
sp-core = { path = "../../../primitives/core", version = "4.0.0-dev" }
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev" }
sp-state-machine = { version = "0.10.0-dev", path = "../../../primitives/state-machine" }
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
sp-utils = { version = "4.0.0-dev", path = "../../../primitives/utils" }
+3 -2
View File
@@ -561,12 +561,13 @@ where
// Ok, we found our node.
// and here we figure out which of the internal epochs
// of a genesis node to use based on their start slot.
PersistedEpochHeader::Genesis(ref epoch_0, ref epoch_1) =>
PersistedEpochHeader::Genesis(ref epoch_0, ref epoch_1) => {
if epoch_1.start_slot <= slot {
(EpochIdentifierPosition::Genesis1, epoch_1.clone())
} else {
(EpochIdentifierPosition::Genesis0, epoch_0.clone())
},
}
},
PersistedEpochHeader::Regular(ref epoch_n) =>
(EpochIdentifierPosition::Regular, epoch_n.clone()),
},
@@ -19,36 +19,33 @@ jsonrpc-core = "18.0.0"
jsonrpc-core-client = "18.0.0"
jsonrpc-derive = "18.0.0"
log = "0.4.8"
parking_lot = "0.11.1"
codec = { package = "parity-scale-codec", version = "2.0.0" }
serde = { version = "1.0", features=["derive"] }
serde = { version = "1.0", features = ["derive"] }
assert_matches = "1.3.0"
async-trait = "0.1.50"
sc-client-api = { path = "../../api", version = "4.0.0-dev"}
sc-client-api = { path = "../../api", version = "4.0.0-dev" }
sc-consensus = { version = "0.10.0-dev", path = "../../consensus/common" }
sc-consensus-babe = { path = "../../consensus/babe", version = "0.10.0-dev"}
sc-consensus-epochs = { path = "../../consensus/epochs", version = "0.10.0-dev"}
sp-consensus-babe = { path = "../../../primitives/consensus/babe", version = "0.10.0-dev"}
sc-consensus-babe = { path = "../../consensus/babe", version = "0.10.0-dev" }
sc-consensus-epochs = { path = "../../consensus/epochs", version = "0.10.0-dev" }
sp-consensus-babe = { path = "../../../primitives/consensus/babe", version = "0.10.0-dev" }
sc-transaction-pool = { path = "../../transaction-pool", version = "4.0.0-dev"}
sp-blockchain = { path = "../../../primitives/blockchain", version = "4.0.0-dev"}
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev"}
sp-consensus-slots = { path = "../../../primitives/consensus/slots", version = "0.10.0-dev"}
sp-inherents = { path = "../../../primitives/inherents", version = "4.0.0-dev"}
sp-runtime = { path = "../../../primitives/runtime", version = "4.0.0-dev"}
sp-core = { path = "../../../primitives/core", version = "4.0.0-dev"}
sp-keystore = { path = "../../../primitives/keystore", version = "0.10.0-dev"}
sp-keyring = { path = "../../../primitives/keyring", version = "4.0.0-dev"}
sp-api = { path = "../../../primitives/api", version = "4.0.0-dev"}
sc-transaction-pool-api = { path = "../../../client/transaction-pool/api", version = "4.0.0-dev"}
sp-timestamp = { path = "../../../primitives/timestamp", version = "4.0.0-dev"}
sc-transaction-pool = { path = "../../transaction-pool", version = "4.0.0-dev" }
sp-blockchain = { path = "../../../primitives/blockchain", version = "4.0.0-dev" }
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev" }
sp-consensus-slots = { path = "../../../primitives/consensus/slots", version = "0.10.0-dev" }
sp-inherents = { path = "../../../primitives/inherents", version = "4.0.0-dev" }
sp-runtime = { path = "../../../primitives/runtime", version = "4.0.0-dev" }
sp-core = { path = "../../../primitives/core", version = "4.0.0-dev" }
sp-keystore = { path = "../../../primitives/keystore", version = "0.10.0-dev" }
sp-api = { path = "../../../primitives/api", version = "4.0.0-dev" }
sc-transaction-pool-api = { path = "../../../client/transaction-pool/api", version = "4.0.0-dev" }
sp-timestamp = { path = "../../../primitives/timestamp", version = "4.0.0-dev" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0"}
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.9.0" }
[dev-dependencies]
tokio = { version = "0.2", features = ["rt-core", "macros"] }
sc-basic-authorship = { path = "../../basic-authorship", version = "0.10.0-dev"}
sc-basic-authorship = { path = "../../basic-authorship", version = "0.10.0-dev" }
substrate-test-runtime-client = { path = "../../../test-utils/runtime/client", version = "2.0.0" }
substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool", version = "2.0.0" }
tempfile = "3.1.0"
@@ -17,8 +17,6 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { package = "parity-scale-codec", version = "2.0.0" }
sc-client-api = { version = "4.0.0-dev", path = "../../api" }
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
sp-trie = { version = "4.0.0-dev", path = "../../../primitives/trie" }
sp-application-crypto = { version = "4.0.0-dev", path = "../../../primitives/application-crypto" }
sp-arithmetic = { version = "4.0.0-dev", path = "../../../primitives/arithmetic" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
@@ -34,7 +32,6 @@ futures = "0.3.9"
futures-timer = "3.0.1"
log = "0.4.11"
thiserror = "1.0.21"
impl-trait-for-tuples = "0.2.1"
async-trait = "0.1.50"
[dev-dependencies]
+3 -6
View File
@@ -20,25 +20,22 @@ kvdb-rocksdb = { version = "0.14.0", optional = true }
kvdb-memorydb = "0.10.0"
linked-hash-map = "0.5.4"
hash-db = "0.15.2"
parity-util-mem = { version = "0.10.0", default-features = false, features = ["std"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
blake2-rfc = "0.2.18"
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
"derive",
] }
sc-client-api = { version = "4.0.0-dev", path = "../api" }
sp-arithmetic = { version = "4.0.0-dev", path = "../../primitives/arithmetic" }
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
sc-executor = { version = "0.10.0-dev", path = "../executor" }
sc-state-db = { version = "0.10.0-dev", path = "../state-db" }
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
sp-database = { version = "4.0.0-dev", path = "../../primitives/database" }
parity-db = { version = "0.3.1", optional = true }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.9.0", path = "../../utils/prometheus" }
[dev-dependencies]
sp-keyring = { version = "4.0.0-dev", path = "../../primitives/keyring" }
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
quickcheck = "1.0.3"
+12 -8
View File
@@ -67,15 +67,19 @@ impl From<io::Error> for UpgradeError {
impl fmt::Display for UpgradeError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
UpgradeError::UnknownDatabaseVersion =>
write!(f, "Database version cannot be read from exisiting db_version file"),
UpgradeError::UnknownDatabaseVersion => {
write!(f, "Database version cannot be read from exisiting db_version file")
},
UpgradeError::MissingDatabaseVersionFile => write!(f, "Missing database version file"),
UpgradeError::UnsupportedVersion(version) =>
write!(f, "Database version no longer supported: {}", version),
UpgradeError::FutureDatabaseVersion(version) =>
write!(f, "Database version comes from future version of the client: {}", version),
UpgradeError::DecodingJustificationBlock =>
write!(f, "Decodoning justification block failed"),
UpgradeError::UnsupportedVersion(version) => {
write!(f, "Database version no longer supported: {}", version)
},
UpgradeError::FutureDatabaseVersion(version) => {
write!(f, "Database version comes from future version of the client: {}", version)
},
UpgradeError::DecodingJustificationBlock => {
write!(f, "Decodoning justification block failed")
},
UpgradeError::Io(err) => write!(f, "Io error: {}", err),
}
}
+3 -2
View File
@@ -249,8 +249,9 @@ impl fmt::Display for OpenDbError {
match self {
OpenDbError::Internal(e) => write!(f, "{}", e.to_string()),
OpenDbError::DoesNotExist => write!(f, "Database does not exist at given location"),
OpenDbError::NotEnabled(feat) =>
write!(f, "`{}` feature not enabled, database can not be opened", feat),
OpenDbError::NotEnabled(feat) => {
write!(f, "`{}` feature not enabled, database can not be opened", feat)
},
}
}
}
+4 -13
View File
@@ -14,17 +14,14 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
derive_more = "0.99.2"
codec = { package = "parity-scale-codec", version = "2.0.0" }
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
sp-tasks = { version = "4.0.0-dev", path = "../../primitives/tasks" }
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
sp-serializer = { version = "3.0.0", path = "../../primitives/serializer" }
sp-version = { version = "4.0.0-dev", path = "../../primitives/version" }
sp-panic-handler = { version = "3.0.0", path = "../../primitives/panic-handler" }
wasmi = "0.9.0"
parity-wasm = "0.42.0"
lazy_static = "1.4.0"
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
sp-wasm-interface = { version = "4.0.0-dev", path = "../../primitives/wasm-interface" }
@@ -38,29 +35,23 @@ log = "0.4.8"
libsecp256k1 = "0.3.4"
[dev-dependencies]
assert_matches = "1.3.0"
wat = "1.0"
hex-literal = "0.3.1"
sc-runtime-test = { version = "2.0.0", path = "runtime-test" }
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
sp-maybe-compressed-blob = { version = "4.0.0-dev", path = "../../primitives/maybe-compressed-blob" }
sc-tracing = { version = "4.0.0-dev", path = "../tracing" }
tracing = "0.1.25"
tracing-subscriber = "0.2.18"
tracing-subscriber = "0.2.19"
paste = "1.0"
regex = "1"
[features]
default = [ "std" ]
default = ["std"]
# This crate does not have `no_std` support, we just require this for tests
std = []
wasm-extern-trace = []
wasmtime = [
"sc-executor-wasmtime",
]
wasmi-errno = [
"wasmi/errno"
]
wasmtime = ["sc-executor-wasmtime"]
wasmi-errno = ["wasmi/errno"]
@@ -24,11 +24,12 @@ sp-wasm-interface = { version = "4.0.0-dev", path = "../../../primitives/wasm-in
sp-runtime-interface = { version = "4.0.0-dev", path = "../../../primitives/runtime-interface" }
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
sc-allocator = { version = "4.0.0-dev", path = "../../allocator" }
wasmtime = { version = "0.27.0", default-features = false, features = ["cache", "parallel-compilation"] }
pwasm-utils = { version = "0.18" }
wasmtime = { version = "0.27.0", default-features = false, features = [
"cache",
"parallel-compilation",
] }
[dev-dependencies]
assert_matches = "1.3.0"
sc-runtime-test = { version = "2.0.0", path = "../runtime-test" }
sp-io = { version = "4.0.0-dev", path = "../../../primitives/io" }
wat = "1.0"
@@ -16,8 +16,6 @@ codec = { package = "parity-scale-codec", version = "2.0.0" }
derive_more = "0.99.11"
futures = "0.3.8"
log = "0.4.11"
num-traits = "0.2.14"
parking_lot = "0.11.1"
prost = "0.7"
sc-client-api = { version = "4.0.0-dev", path = "../api" }
sc-finality-grandpa = { version = "0.10.0-dev", path = "../finality-grandpa" }
+6 -8
View File
@@ -37,28 +37,26 @@ sc-telemetry = { version = "4.0.0-dev", path = "../telemetry" }
sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
serde_json = "1.0.41"
sc-client-api = { version = "4.0.0-dev", path = "../api" }
sp-inherents = { version = "4.0.0-dev", path = "../../primitives/inherents" }
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
sc-network = { version = "0.10.0-dev", path = "../network" }
sc-network-gossip = { version = "0.10.0-dev", path = "../network-gossip" }
sp-finality-grandpa = { version = "4.0.0-dev", path = "../../primitives/finality-grandpa" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0" }
sc-block-builder = { version = "0.10.0-dev", path = "../block-builder" }
finality-grandpa = { version = "0.14.1", features = ["derive-codec"] }
pin-project = "1.0.4"
linked-hash-map = "0.5.4"
async-trait = "0.1.50"
wasm-timer = "0.2"
[dev-dependencies]
assert_matches = "1.3.0"
finality-grandpa = { version = "0.14.1", features = ["derive-codec", "test-helpers"] }
finality-grandpa = { version = "0.14.1", features = [
"derive-codec",
"test-helpers",
] }
sc-network = { version = "0.10.0-dev", path = "../network" }
sc-network-test = { version = "0.8.0", path = "../network/test" }
sp-keyring = { version = "4.0.0-dev", path = "../../primitives/keyring" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
sp-consensus-babe = { version = "0.10.0-dev", path = "../../primitives/consensus/babe" }
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
tokio = { version = "0.2", features = ["rt-core"] }
tempfile = "3.1.0"
@@ -29,11 +29,10 @@ sc-client-api = { version = "4.0.0-dev", path = "../../api" }
[dev-dependencies]
sc-block-builder = { version = "0.10.0-dev", path = "../../block-builder" }
sc-network-test = { version = "0.8.0", path = "../../network/test" }
sc-rpc = { version = "4.0.0-dev", path = "../../rpc", features = ["test-helpers"] }
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
sc-rpc = { version = "4.0.0-dev", path = "../../rpc", features = [
"test-helpers",
] }
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
sp-finality-grandpa = { version = "4.0.0-dev", path = "../../../primitives/finality-grandpa" }
sp-keyring = { version = "4.0.0-dev", path = "../../../primitives/keyring" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
lazy_static = "1.4"
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
@@ -1194,19 +1194,21 @@ impl<Block: BlockT> Inner<Block> {
catch_up_request: &CatchUpRequestMessage,
) -> (bool, Option<Report>) {
let report = match &self.pending_catch_up {
PendingCatchUp::Requesting { who: peer, instant, .. } =>
PendingCatchUp::Requesting { who: peer, instant, .. } => {
if instant.elapsed() <= CATCH_UP_REQUEST_TIMEOUT {
return (false, None)
} else {
// report peer for timeout
Some((peer.clone(), cost::CATCH_UP_REQUEST_TIMEOUT))
},
PendingCatchUp::Processing { instant, .. } =>
}
},
PendingCatchUp::Processing { instant, .. } => {
if instant.elapsed() < CATCH_UP_PROCESS_TIMEOUT {
return (false, None)
} else {
None
},
}
},
_ => None,
};
@@ -684,18 +684,21 @@ impl<Block: BlockT> Sink<Message<Block>> for OutgoingMessages<Block> {
fn start_send(mut self: Pin<&mut Self>, mut msg: Message<Block>) -> Result<(), Self::Error> {
// if we've voted on this round previously under the same key, send that vote instead
match &mut msg {
finality_grandpa::Message::PrimaryPropose(ref mut vote) =>
finality_grandpa::Message::PrimaryPropose(ref mut vote) => {
if let Some(propose) = self.has_voted.propose() {
*vote = propose.clone();
},
finality_grandpa::Message::Prevote(ref mut vote) =>
}
},
finality_grandpa::Message::Prevote(ref mut vote) => {
if let Some(prevote) = self.has_voted.prevote() {
*vote = prevote.clone();
},
finality_grandpa::Message::Precommit(ref mut vote) =>
}
},
finality_grandpa::Message::Precommit(ref mut vote) => {
if let Some(precommit) = self.has_voted.precommit() {
*vote = precommit.clone();
},
}
},
}
// when locals exist, sign messages on import
-5
View File
@@ -17,17 +17,12 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
async-trait = "0.1.50"
derive_more = "0.99.2"
futures = "0.3.9"
futures-util = "0.3.4"
sp-application-crypto = { version = "4.0.0-dev", path = "../../primitives/application-crypto" }
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
sp-keystore = { version = "0.10.0-dev", path = "../../primitives/keystore" }
hex = "0.4.0"
merlin = { version = "2.0", default-features = false }
parking_lot = "0.11.1"
rand = "0.7.2"
serde_json = "1.0.41"
subtle = "2.1.1"
[dev-dependencies]
tempfile = "3.1.0"
-1
View File
@@ -12,7 +12,6 @@ readme = "README.md"
[dependencies]
parking_lot = "0.11.1"
lazy_static = "1.4.0"
hash-db = "0.15.2"
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
sp-externalities = { version = "0.10.0-dev", path = "../../primitives/externalities" }
@@ -29,5 +29,4 @@ tracing = "0.1.25"
[dev-dependencies]
async-std = "1.6.5"
quickcheck = "1.0.3"
rand = "0.7.2"
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
@@ -263,8 +263,9 @@ impl<B: BlockT> Future for GossipEngine<B> {
for sink in sinks {
match sink.start_send(notification.clone()) {
Ok(()) => {},
Err(e) if e.is_full() =>
unreachable!("Previously ensured that all sinks are ready; qed."),
Err(e) if e.is_full() => {
unreachable!("Previously ensured that all sinks are ready; qed.")
},
// Receiver got dropped. Will be removed in next iteration (See (1)).
Err(_) => {},
}
@@ -623,8 +624,9 @@ mod tests {
.and_modify(|e| *e += 1)
.or_insert(1);
},
Poll::Ready(None) =>
unreachable!("Sender side of channel is never dropped"),
Poll::Ready(None) => {
unreachable!("Sender side of channel is never dropped")
},
Poll::Pending => {},
}
}
@@ -127,14 +127,15 @@ where
} else {
MessageIntent::Broadcast
},
MessageIntent::PeriodicRebroadcast =>
MessageIntent::PeriodicRebroadcast => {
if peer.known_messages.contains(&message_hash) {
MessageIntent::PeriodicRebroadcast
} else {
// peer doesn't know message, so the logic should treat it as an
// initial broadcast.
MessageIntent::Broadcast
},
}
},
other => other,
};
+19 -7
View File
@@ -20,13 +20,13 @@ prost-build = "0.7"
async-trait = "0.1"
async-std = "1.6.5"
bitflags = "1.2.0"
bs58 = "0.4.0"
cid = "0.6.0"
bytes = "1"
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
"derive",
] }
derive_more = "0.99.2"
either = "1.5.3"
erased-serde = "0.3.9"
fnv = "1.0.6"
fork-tree = { version = "3.0.0", path = "../../utils/fork-tree" }
futures = "0.3.9"
@@ -38,7 +38,6 @@ linked-hash-map = "0.5.4"
linked_hash_set = "0.1.3"
lru = "0.6.5"
log = "0.4.8"
nohash-hasher = "0.2.0"
parking_lot = "0.11.1"
pin-project = "1.0.4"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.9.0", path = "../../utils/prometheus" }
@@ -59,7 +58,10 @@ sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
sp-finality-grandpa = { version = "4.0.0-dev", path = "../../primitives/finality-grandpa" }
thiserror = "1"
unsigned-varint = { version = "0.6.0", features = ["futures", "asynchronous_codec"] }
unsigned-varint = { version = "0.6.0", features = [
"futures",
"asynchronous_codec",
] }
void = "1.0.2"
wasm-timer = "0.2"
zeroize = "1.2.0"
@@ -70,7 +72,18 @@ version = "0.37.1"
[target.'cfg(target_os = "unknown")'.dependencies.libp2p]
version = "0.37.1"
default-features = false
features = ["identify", "kad", "mdns", "mplex", "noise", "ping", "request-response", "tcp-async-io", "websocket", "yamux"]
features = [
"identify",
"kad",
"mdns",
"mplex",
"noise",
"ping",
"request-response",
"tcp-async-io",
"websocket",
"yamux",
]
[dev-dependencies]
@@ -78,7 +91,6 @@ assert_matches = "1.3"
libp2p = { version = "0.37.1", default-features = false }
quickcheck = "1.0.3"
rand = "0.7.2"
sp-keyring = { version = "4.0.0-dev", path = "../../primitives/keyring" }
sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" }
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
@@ -213,14 +213,15 @@ where
) -> Result<Reply<B>, Error> {
use schema::v1::light::response::Response;
match response.response {
Some(Response::RemoteCallResponse(response)) =>
Some(Response::RemoteCallResponse(response)) => {
if let Request::Call { request, .. } = request {
let proof = Decode::decode(&mut response.proof.as_ref())?;
let reply = self.checker.check_execution_proof(request, proof)?;
Ok(Reply::VecU8(reply))
} else {
Err(Error::UnexpectedResponse)
},
}
},
Some(Response::RemoteReadResponse(response)) => match request {
Request::Read { request, .. } => {
let proof = Decode::decode(&mut response.proof.as_ref())?;
@@ -234,7 +235,7 @@ where
},
_ => Err(Error::UnexpectedResponse),
},
Some(Response::RemoteChangesResponse(response)) =>
Some(Response::RemoteChangesResponse(response)) => {
if let Request::Changes { request, .. } = request {
let max_block = Decode::decode(&mut response.max.as_ref())?;
let roots_proof = Decode::decode(&mut response.roots_proof.as_ref())?;
@@ -259,8 +260,9 @@ where
Ok(Reply::VecNumberU32(reply))
} else {
Err(Error::UnexpectedResponse)
},
Some(Response::RemoteHeaderResponse(response)) =>
}
},
Some(Response::RemoteHeaderResponse(response)) => {
if let Request::Header { request, .. } = request {
let header = if response.header.is_empty() {
None
@@ -272,7 +274,8 @@ where
Ok(Reply::Header(reply))
} else {
Err(Error::UnexpectedResponse)
},
}
},
None => Err(Error::UnexpectedResponse),
}
}
@@ -779,8 +782,9 @@ impl<B: Block> Request<B> {
Request::Header { request, sender } => match result {
Err(e) => send(Err(e), sender),
Ok(Reply::Header(x)) => send(Ok(x), sender),
reply =>
log::error!("invalid reply for header request: {:?}, {:?}", reply, request),
reply => {
log::error!("invalid reply for header request: {:?}, {:?}", reply, request)
},
},
Request::Read { request, sender } => match result {
Err(e) => send(Err(e), sender),
@@ -790,8 +794,9 @@ impl<B: Block> Request<B> {
Request::ReadChild { request, sender } => match result {
Err(e) => send(Err(e), sender),
Ok(Reply::MapVecU8OptVecU8(x)) => send(Ok(x), sender),
reply =>
log::error!("invalid reply for read child request: {:?}, {:?}", reply, request),
reply => {
log::error!("invalid reply for read child request: {:?}, {:?}", reply, request)
},
},
Request::Call { request, sender } => match result {
Err(e) => send(Err(e), sender),
@@ -801,8 +806,9 @@ impl<B: Block> Request<B> {
Request::Changes { request, sender } => match result {
Err(e) => send(Err(e), sender),
Ok(Reply::VecNumberU32(x)) => send(Ok(x), sender),
reply =>
log::error!("invalid reply for changes request: {:?}, {:?}", reply, request),
reply => {
log::error!("invalid reply for changes request: {:?}, {:?}", reply, request)
},
},
}
}
+3 -2
View File
@@ -352,8 +352,9 @@ impl NetworkBehaviour for PeerInfoBehaviour {
let event = PeerInfoEvent::Identified { peer_id, info };
return Poll::Ready(NetworkBehaviourAction::GenerateEvent(event))
},
IdentifyEvent::Error { peer_id, error } =>
debug!(target: "sub-libp2p", "Identification with peer {:?} failed => {}", peer_id, error),
IdentifyEvent::Error { peer_id, error } => {
debug!(target: "sub-libp2p", "Identification with peer {:?} failed => {}", peer_id, error)
},
IdentifyEvent::Pushed { .. } => {},
IdentifyEvent::Sent { .. } => {},
},
@@ -565,8 +565,9 @@ impl Notifications {
*entry.into_mut() = PeerState::Disabled { connections, backoff_until }
},
PeerState::Poisoned =>
error!(target: "sub-libp2p", "State of {:?} is poisoned", peer_id),
PeerState::Poisoned => {
error!(target: "sub-libp2p", "State of {:?} is poisoned", peer_id)
},
}
}
@@ -218,7 +218,7 @@ where
loop {
match mem::replace(this.handshake, NotificationsInSubstreamHandshake::Sent) {
NotificationsInSubstreamHandshake::PendingSend(msg) =>
NotificationsInSubstreamHandshake::PendingSend(msg) => {
match Sink::poll_ready(this.socket.as_mut(), cx) {
Poll::Ready(_) => {
*this.handshake = NotificationsInSubstreamHandshake::Flush;
@@ -231,8 +231,9 @@ where
*this.handshake = NotificationsInSubstreamHandshake::PendingSend(msg);
return Poll::Pending
},
},
NotificationsInSubstreamHandshake::Flush =>
}
},
NotificationsInSubstreamHandshake::Flush => {
match Sink::poll_flush(this.socket.as_mut(), cx)? {
Poll::Ready(()) =>
*this.handshake = NotificationsInSubstreamHandshake::Sent,
@@ -240,7 +241,8 @@ where
*this.handshake = NotificationsInSubstreamHandshake::Flush;
return Poll::Pending
},
},
}
},
st @ NotificationsInSubstreamHandshake::NotSent |
st @ NotificationsInSubstreamHandshake::Sent |
@@ -270,7 +272,7 @@ where
*this.handshake = NotificationsInSubstreamHandshake::NotSent;
return Poll::Pending
},
NotificationsInSubstreamHandshake::PendingSend(msg) =>
NotificationsInSubstreamHandshake::PendingSend(msg) => {
match Sink::poll_ready(this.socket.as_mut(), cx) {
Poll::Ready(_) => {
*this.handshake = NotificationsInSubstreamHandshake::Flush;
@@ -283,8 +285,9 @@ where
*this.handshake = NotificationsInSubstreamHandshake::PendingSend(msg);
return Poll::Pending
},
},
NotificationsInSubstreamHandshake::Flush =>
}
},
NotificationsInSubstreamHandshake::Flush => {
match Sink::poll_flush(this.socket.as_mut(), cx)? {
Poll::Ready(()) =>
*this.handshake = NotificationsInSubstreamHandshake::Sent,
@@ -292,7 +295,8 @@ where
*this.handshake = NotificationsInSubstreamHandshake::Flush;
return Poll::Pending
},
},
}
},
NotificationsInSubstreamHandshake::Sent => {
match Stream::poll_next(this.socket.as_mut(), cx) {
+6 -4
View File
@@ -1967,8 +1967,9 @@ impl<B: BlockT + 'static, H: ExHashT> Future for NetworkWorker<B, H> {
}
}
},
Poll::Ready(SwarmEvent::Dialing(peer_id)) =>
trace!(target: "sub-libp2p", "Libp2p => Dialing({:?})", peer_id),
Poll::Ready(SwarmEvent::Dialing(peer_id)) => {
trace!(target: "sub-libp2p", "Libp2p => Dialing({:?})", peer_id)
},
Poll::Ready(SwarmEvent::IncomingConnection { local_addr, send_back_addr }) => {
trace!(target: "sub-libp2p", "Libp2p => IncomingConnection({},{}))",
local_addr, send_back_addr);
@@ -2007,9 +2008,10 @@ impl<B: BlockT + 'static, H: ExHashT> Future for NetworkWorker<B, H> {
.inc();
}
},
Poll::Ready(SwarmEvent::UnknownPeerUnreachableAddr { address, error }) =>
Poll::Ready(SwarmEvent::UnknownPeerUnreachableAddr { address, error }) => {
trace!(target: "sub-libp2p", "Libp2p => UnknownPeerUnreachableAddr({}): {}",
address, error),
address, error)
},
Poll::Ready(SwarmEvent::ListenerClosed { reason, addresses }) => {
if let Some(metrics) = this.metrics.as_ref() {
metrics.listeners_local_addresses.sub(addresses.len() as u64);
@@ -135,8 +135,9 @@ impl<TBlock: BlockT> RequestHandler<TBlock> {
let IncomingRequest { peer, payload, pending_response } = request;
match self.handle_request(payload, pending_response) {
Ok(()) =>
debug!(target: "sync", "Handled grandpa warp sync request from {}.", peer),
Ok(()) => {
debug!(target: "sync", "Handled grandpa warp sync request from {}.", peer)
},
Err(e) => debug!(
target: "sync",
"Failed to handle grandpa warp sync request from {}: {}",
-1
View File
@@ -31,7 +31,6 @@ sc-block-builder = { version = "0.10.0-dev", path = "../../block-builder" }
sp-consensus-babe = { version = "0.10.0-dev", path = "../../../primitives/consensus/babe" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }
substrate-test-runtime = { version = "2.0.0", path = "../../../test-utils/runtime" }
tempfile = "3.1.0"
sp-tracing = { version = "4.0.0-dev", path = "../../../primitives/tracing" }
sc-service = { version = "0.10.0-dev", default-features = false, features = ["test-helpers"], path = "../../service" }
async-trait = "0.1.50"
-1
View File
@@ -24,7 +24,6 @@ num_cpus = "1.10"
parking_lot = "0.11.1"
rand = "0.7.2"
sc-client-api = { version = "4.0.0-dev", path = "../api" }
sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
sc-network = { version = "0.10.0-dev", path = "../network" }
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
+9 -6
View File
@@ -219,7 +219,7 @@ impl HttpApi {
HttpApiRequest::Dispatched(Some(sender))
},
HttpApiRequest::Dispatched(Some(mut sender)) =>
HttpApiRequest::Dispatched(Some(mut sender)) => {
if !chunk.is_empty() {
match poll_sender(&mut sender) {
Err(HttpError::IoError) => return Err(HttpError::IoError),
@@ -234,11 +234,12 @@ impl HttpApi {
// the sender.
self.requests.insert(request_id, HttpApiRequest::Dispatched(None));
return Ok(())
},
}
},
HttpApiRequest::Response(
mut response @ HttpApiRequestRp { sending_body: Some(_), .. },
) =>
) => {
if !chunk.is_empty() {
match poll_sender(
response
@@ -264,7 +265,8 @@ impl HttpApi {
}),
);
return Ok(())
},
}
},
HttpApiRequest::Fail(_) =>
// If the request has already failed, return without putting back the request
@@ -368,7 +370,7 @@ impl HttpApi {
// Update internal state based on received message.
match next_message {
Some(WorkerToApi::Response { id, status_code, headers, body }) =>
Some(WorkerToApi::Response { id, status_code, headers, body }) => {
match self.requests.remove(&id) {
Some(HttpApiRequest::Dispatched(sending_body)) => {
self.requests.insert(
@@ -384,7 +386,8 @@ impl HttpApi {
},
None => {}, // can happen if we detected an IO error when sending the body
_ => error!("State mismatch between the API and worker"),
},
}
},
Some(WorkerToApi::Fail { id, error }) => match self.requests.remove(&id) {
Some(HttpApiRequest::Dispatched(_)) => {
+3 -2
View File
@@ -648,8 +648,9 @@ impl Peerset {
peer_id, DISCONNECT_REPUTATION_CHANGE, entry.reputation());
entry.disconnect();
},
peersstate::Peer::NotConnected(_) | peersstate::Peer::Unknown(_) =>
error!(target: "peerset", "Received dropped() for non-connected node"),
peersstate::Peer::NotConnected(_) | peersstate::Peer::Unknown(_) => {
error!(target: "peerset", "Received dropped() for non-connected node")
},
}
if let DropReason::Refused = reason {
-2
View File
@@ -18,9 +18,7 @@ jsonrpc-core = "18.0.0"
pubsub = { package = "jsonrpc-pubsub", version = "18.0.0" }
log = "0.4.8"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
serde = "1.0.126"
serde_json = "1.0.41"
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
[target.'cfg(not(target_os = "unknown"))'.dependencies]
http = { package = "jsonrpc-http-server", version = "18.0.0" }
-5
View File
@@ -30,17 +30,13 @@ sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
sp-rpc = { version = "4.0.0-dev", path = "../../primitives/rpc" }
sp-keystore = { version = "0.10.0-dev", path = "../../primitives/keystore" }
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
sc-chain-spec = { version = "4.0.0-dev", path = "../chain-spec" }
sc-executor = { version = "0.10.0-dev", path = "../executor" }
sc-block-builder = { version = "0.10.0-dev", path = "../block-builder" }
sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
sc-tracing = { version = "4.0.0-dev", path = "../tracing" }
hash-db = { version = "0.15.2", default-features = false }
parking_lot = "0.11.1"
lazy_static = { version = "1.4.0", optional = true }
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../transaction-pool/api" }
[dev-dependencies]
@@ -50,7 +46,6 @@ sc-network = { version = "0.10.0-dev", path = "../network" }
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
sc-transaction-pool = { version = "4.0.0-dev", path = "../transaction-pool" }
sc-cli = { version = "0.10.0-dev", path = "../cli" }
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
[features]
+5 -10
View File
@@ -17,9 +17,7 @@ default = ["db"]
# The RocksDB feature activates the RocksDB database backend. If it is not activated, and you pass
# a path to a database, an error will be produced at runtime.
db = ["sc-client-db/with-kvdb-rocksdb", "sc-client-db/with-parity-db"]
wasmtime = [
"sc-executor/wasmtime",
]
wasmtime = ["sc-executor/wasmtime"]
# exposes the client type
test-helpers = []
@@ -30,7 +28,6 @@ jsonrpc-pubsub = "18.0"
jsonrpc-core = "18.0"
rand = "0.7.3"
parking_lot = "0.11.1"
lazy_static = "1.4.0"
log = "0.4.11"
futures-timer = "3.0.1"
wasm-timer = "0.2"
@@ -40,7 +37,6 @@ hash-db = "0.15.2"
serde = "1.0.126"
serde_json = "1.0.41"
sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
sp-io = { version = "4.0.0-dev", path = "../../primitives/io" }
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
sp-externalities = { version = "0.10.0-dev", path = "../../primitives/externalities" }
@@ -75,12 +71,14 @@ sp-block-builder = { version = "4.0.0-dev", path = "../../primitives/block-build
sc-informant = { version = "0.10.0-dev", path = "../informant" }
sc-telemetry = { version = "4.0.0-dev", path = "../telemetry" }
sc-offchain = { version = "4.0.0-dev", path = "../offchain" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0" }
sc-tracing = { version = "4.0.0-dev", path = "../tracing" }
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
tracing = "0.1.25"
tracing-futures = { version = "0.2.4" }
parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.10.0", default-features = false, features = [
"primitive-types",
] }
async-trait = "0.1.50"
[target.'cfg(not(target_os = "unknown"))'.dependencies]
@@ -90,8 +88,5 @@ directories = "3.0.1"
[dev-dependencies]
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime/" }
sp-consensus-babe = { version = "0.10.0-dev", path = "../../primitives/consensus/babe" }
grandpa = { version = "0.10.0-dev", package = "sc-finality-grandpa", path = "../finality-grandpa" }
grandpa-primitives = { version = "4.0.0-dev", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" }
tokio = { version = "0.2.25", default-features = false }
async-std = { version = "1.6.5", default-features = false }
-1
View File
@@ -13,7 +13,6 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
thiserror = "1.0.21"
parking_lot = "0.11.1"
log = "0.4.11"
sc-client-api = { version = "4.0.0-dev", path = "../api" }
-2
View File
@@ -23,8 +23,6 @@ log = "0.4.8"
pin-project = "1.0.4"
rand = "0.7.2"
serde = { version = "1.0.126", features = ["derive"] }
take_mut = "0.2.2"
void = "1.0.2"
serde_json = "1.0.41"
chrono = "0.4.19"
thiserror = "1.0.21"
+2 -8
View File
@@ -21,26 +21,20 @@ once_cell = "1.4.1"
parking_lot = "0.11.1"
regex = "1.4.2"
rustc-hash = "1.1.0"
erased-serde = "0.3.9"
serde = "1.0.126"
serde_json = "1.0.41"
thiserror = "1.0.21"
tracing = "0.1.25"
tracing-log = "0.1.2"
tracing-subscriber = "0.2.18"
tracing-subscriber = "0.2.19"
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
sp-rpc = { version = "4.0.0-dev", path = "../../primitives/rpc" }
sp-block-builder = { version = "4.0.0-dev", path = "../../primitives/block-builder" }
sp-storage = { version = "4.0.0-dev", path = "../../primitives/storage" }
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
sc-telemetry = { version = "4.0.0-dev", path = "../telemetry" }
sc-client-api = { version = "4.0.0-dev", path = "../api" }
sc-tracing-proc-macro = { version = "4.0.0-dev", path = "./proc-macro" }
sc-rpc-server = { version = "4.0.0-dev", path = "../rpc-servers" }
wasm-timer = "0.2"
sc-rpc-server = { version = "4.0.0-dev", path = "../rpc-servers" }
[target.'cfg(target_os = "unknown")'.dependencies]
wasm-bindgen = "0.2.67"
@@ -93,8 +93,7 @@ where
// Custom code to display node name
if let Some(span) = ctx.lookup_current() {
let parents = span.parents();
for span in std::iter::once(span).chain(parents) {
for span in span.scope() {
let exts = span.extensions();
if let Some(prefix) = exts.get::<super::layers::Prefix>() {
write!(writer, "{}", prefix.as_str())?;
@@ -31,7 +31,6 @@ sc-transaction-pool-api = { version = "4.0.0-dev", path = "./api" }
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
wasm-timer = "0.2"
derive_more = "0.99.2"
serde = { version = "1.0.126", features = ["derive"] }
linked-hash-map = "0.5.4"
retain_mut = "0.1.3"
@@ -15,6 +15,5 @@ serde = { version = "1.0.126", features = ["derive"] }
thiserror = { version = "1.0.21" }
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/runtime" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
derive_more = { version = "0.99.11" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }