more tracing for av-store (#2604)

* more tracing for av-store

* Update node/core/av-store/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update node/core/av-store/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update node/core/av-store/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update tracing everywhere

* Fix build

* More fixes

* Push cargo.lock

* Update

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Robert Habermeier
2021-03-11 06:12:34 -06:00
committed by GitHub
parent 7dfb666ea5
commit b105d9acc0
29 changed files with 196 additions and 227 deletions
+151 -175
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -25,7 +25,6 @@ service = { package = "polkadot-service", path = "../node/service", default-feat
polkadot-parachain = { path = "../parachain", optional = true } polkadot-parachain = { path = "../parachain", optional = true }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
tracing-futures = "0.2.4"
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
polkadot-erasure-coding = { path = "../../erasure-coding" } polkadot-erasure-coding = { path = "../../erasure-coding" }
polkadot-node-primitives = { path = "../primitives" } polkadot-node-primitives = { path = "../primitives" }
polkadot-node-subsystem = { path = "../subsystem" } polkadot-node-subsystem = { path = "../subsystem" }
@@ -8,8 +8,7 @@ edition = "2018"
futures = "0.3.8" futures = "0.3.8"
futures-timer = "3.0.2" futures-timer = "3.0.2"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] }
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
merlin = "2.0" merlin = "2.0"
schnorrkel = "0.9.1" schnorrkel = "0.9.1"
+1 -2
View File
@@ -10,8 +10,7 @@ futures-timer = "3.0.2"
kvdb = "0.9.0" kvdb = "0.9.0"
kvdb-rocksdb = "0.11.0" kvdb-rocksdb = "0.11.0"
thiserror = "1.0.23" thiserror = "1.0.23"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
bitvec = "0.20.1" bitvec = "0.20.1"
parity-scale-codec = { version = "2.0.0", features = ["derive"] } parity-scale-codec = { version = "2.0.0", features = ["derive"] }
+19
View File
@@ -679,6 +679,12 @@ fn note_block_backed(
) -> Result<(), Error> { ) -> Result<(), Error> {
let candidate_hash = candidate.hash(); let candidate_hash = candidate.hash();
tracing::trace!(
target: LOG_TARGET,
?candidate_hash,
"Candidate backed",
);
if load_meta(db, &candidate_hash)?.is_none() { if load_meta(db, &candidate_hash)?.is_none() {
let meta = CandidateMeta { let meta = CandidateMeta {
state: State::Unavailable(now.into()), state: State::Unavailable(now.into()),
@@ -717,6 +723,12 @@ fn note_block_included(
Some(mut meta) => { Some(mut meta) => {
let be_block = (BEBlockNumber(block.0), block.1); let be_block = (BEBlockNumber(block.0), block.1);
tracing::trace!(
target: LOG_TARGET,
?candidate_hash,
"Candidate included",
);
meta.state = match meta.state { meta.state = match meta.state {
State::Unavailable(at) => { State::Unavailable(at) => {
let at_d: Duration = at.into(); let at_d: Duration = at.into();
@@ -1045,6 +1057,13 @@ fn store_chunk(
None => return Ok(false), // out of bounds. None => return Ok(false), // out of bounds.
} }
tracing::debug!(
target: LOG_TARGET,
?candidate_hash,
chunk_index = %chunk.index.0,
"Stored chunk index for candidate.",
);
db.write(tx)?; db.write(tx)?;
Ok(true) Ok(true)
} }
+1 -2
View File
@@ -14,8 +14,7 @@ polkadot-node-subsystem-util = { path = "../../subsystem-util" }
erasure-coding = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" } erasure-coding = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" }
statement-table = { package = "polkadot-statement-table", path = "../../../statement-table" } statement-table = { package = "polkadot-statement-table", path = "../../../statement-table" }
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
thiserror = "1.0.23" thiserror = "1.0.23"
[dev-dependencies] [dev-dependencies]
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem = { path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-subsystem-util = { path = "../../subsystem-util" }
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
thiserror = "1.0.23" thiserror = "1.0.23"
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
sp-core = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master" }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["bit-vec", "derive"] }
+1 -2
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" } polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
futures-timer = "3.0.2" futures-timer = "3.0.2"
tracing = "0.1.22" tracing = "0.1.25"
polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem = { path = "../../subsystem" }
polkadot-overseer = { path = "../../overseer" } polkadot-overseer = { path = "../../overseer" }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
+1 -2
View File
@@ -7,8 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
thiserror = "1.0.23" thiserror = "1.0.23"
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem = { path = "../../subsystem" }
+1 -2
View File
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
memory-lru = "0.1.0" memory-lru = "0.1.0"
parity-util-mem = { version = "0.9.0", default-features = false } parity-util-mem = { version = "0.9.0", default-features = false }
@@ -12,8 +12,7 @@ polkadot-node-subsystem-util = { path = "../../subsystem-util" }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
futures = "0.3.8" futures = "0.3.8"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
[dev-dependencies] [dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] }
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
parity-scale-codec = { version = "2.0.0", features = ["std"] } parity-scale-codec = { version = "2.0.0", features = ["std"] }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-erasure-coding = { path = "../../../erasure-coding" } polkadot-erasure-coding = { path = "../../../erasure-coding" }
@@ -9,8 +9,7 @@ futures = "0.3.12"
lru = "0.6.1" lru = "0.6.1"
rand = "0.8.3" rand = "0.8.3"
thiserror = "1.0.21" thiserror = "1.0.21"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
polkadot-erasure-coding = { path = "../../../erasure-coding" } polkadot-erasure-coding = { path = "../../../erasure-coding" }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" } polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
+1 -2
View File
@@ -7,8 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
async-trait = "0.1.42" async-trait = "0.1.42"
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -6,8 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
thiserror = "1.0.23" thiserror = "1.0.23"
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
@@ -11,6 +11,5 @@ polkadot-node-subsystem-util = { path = "../../subsystem-util" }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
futures = "0.3.8" futures = "0.3.8"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
rand = "0.8.3" rand = "0.8.3"
@@ -7,8 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
thiserror = "1.0.23" thiserror = "1.0.23"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" } polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
@@ -7,8 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.12" futures = "0.3.12"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" } polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
+1 -2
View File
@@ -14,8 +14,7 @@ polkadot-node-primitives = { package = "polkadot-node-primitives", path = "../pr
polkadot-node-subsystem-util = { path = "../subsystem-util" } polkadot-node-subsystem-util = { path = "../subsystem-util" }
polkadot-primitives = { path = "../../primitives" } polkadot-primitives = { path = "../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../subsystem" } polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../subsystem" }
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
[dev-dependencies] [dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
+1 -2
View File
@@ -57,8 +57,7 @@ prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https:
# External Crates # External Crates
futures = "0.3.12" futures = "0.3.12"
hex-literal = "0.3.1" hex-literal = "0.3.1"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
serde = { version = "1.0.123", features = ["derive"] } serde = { version = "1.0.123", features = ["derive"] }
thiserror = "1.0.23" thiserror = "1.0.23"
@@ -9,8 +9,7 @@ description = "Subsystem traits and message definitions"
async-trait = "0.1.42" async-trait = "0.1.42"
futures = "0.3.12" futures = "0.3.12"
futures-timer = "3.0.2" futures-timer = "3.0.2"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parking_lot = "0.11.1" parking_lot = "0.11.1"
pin-project = "1.0.4" pin-project = "1.0.4"
+1 -2
View File
@@ -14,8 +14,7 @@ parking_lot = { version = "0.11.1", optional = true }
pin-project = "1.0.4" pin-project = "1.0.4"
streamunordered = "0.5.1" streamunordered = "0.5.1"
thiserror = "1.0.23" thiserror = "1.0.23"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
polkadot-node-primitives = { path = "../primitives" } polkadot-node-primitives = { path = "../primitives" }
polkadot-node-subsystem = { path = "../subsystem" } polkadot-node-subsystem = { path = "../subsystem" }
+1 -2
View File
@@ -13,8 +13,7 @@ futures = "0.3.12"
futures-timer = "3.0.2" futures-timer = "3.0.2"
mick-jaeger = "0.1.2" mick-jaeger = "0.1.2"
lazy_static = "1.4" lazy_static = "1.4"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] } parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parking_lot = "0.11.1" parking_lot = "0.11.1"
pin-project = "1.0.4" pin-project = "1.0.4"
+1 -2
View File
@@ -8,8 +8,7 @@ edition = "2018"
futures = "0.3.12" futures = "0.3.12"
futures01 = { package = "futures", version = "0.1.29" } futures01 = { package = "futures", version = "0.1.29" }
hex = "0.4.2" hex = "0.4.2"
tracing = "0.1.22" tracing = "0.1.25"
tracing-futures = "0.2.4"
rand = "0.8.3" rand = "0.8.3"
tempfile = "3.2.0" tempfile = "3.2.0"