From 76d40552aea22043e0dff6504d084880f95f246a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Andr=C3=A9s=20Dorado=20Su=C3=A1rez?= Date: Fri, 12 Jul 2024 15:41:02 +0200 Subject: [PATCH] minor(virto-node): add logs to `code_hash_provider` method --- Cargo.lock | 4 ++-- node/Cargo.toml | 2 +- node/src/service.rs | 8 +++++++- runtime/kreivo/Cargo.toml | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0b03aab..09d6bdff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4664,7 +4664,7 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kreivo-runtime" -version = "0.13.1" +version = "0.13.2" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -14428,7 +14428,7 @@ dependencies = [ [[package]] name = "virto-node" -version = "0.13.1" +version = "0.13.2" dependencies = [ "clap", "color-print", diff --git a/node/Cargo.toml b/node/Cargo.toml index 6d073755..cd75273a 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" name = "virto-node" publish = false repository.workspace = true -version = "0.13.1" +version = "0.13.2" [[bin]] name = "virto-node" diff --git a/node/src/service.rs b/node/src/service.rs index d3285d71..1920d052 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -200,7 +200,13 @@ fn start_consensus( para_client: client.clone(), para_backend: backend, relay_client: relay_chain_interface, - code_hash_provider: move |block_hash| client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash()), + code_hash_provider: move |block_hash| { + use polkadot_cli::service::HeaderProvider; + let code_hash = client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash()); + let number = client.number(block_hash).expect("block exists; qed"); + log::trace!(">>> providing code hash for Aura: block_number = {number:?}, block_hash = {block_hash:?}, code_hash = {code_hash:?} <<<"); + client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash()) + }, sync_oracle, keystore, collator_key, diff --git a/runtime/kreivo/Cargo.toml b/runtime/kreivo/Cargo.toml index 28176766..d7733962 100644 --- a/runtime/kreivo/Cargo.toml +++ b/runtime/kreivo/Cargo.toml @@ -6,7 +6,7 @@ homepage.workspace = true license = "GPL-3.0-only" name = "kreivo-runtime" repository.workspace = true -version = "0.13.1" +version = "0.13.2" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"]