mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Add trace logging for the POV size (#294)
* Add trace logging for the POV size * :(
This commit is contained in:
@@ -573,6 +573,14 @@ where
|
|||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trace!(
|
||||||
|
target: "cumulus-collator",
|
||||||
|
"PoV size {{ header: {}kb, extrinsics: {}kb, storage_proof: {}kb }}",
|
||||||
|
b.header().encode().len() as f64 / 1024f64,
|
||||||
|
b.extrinsics().encode().len() as f64 / 1024f64,
|
||||||
|
b.storage_proof().encode().len() as f64 / 1024f64,
|
||||||
|
);
|
||||||
|
|
||||||
let collation =
|
let collation =
|
||||||
self.build_collation(b, block_hash, validation_data.persisted.block_number)?;
|
self.build_collation(b, block_hash, validation_data.persisted.block_number)?;
|
||||||
let pov_hash = collation.proof_of_validity.hash();
|
let pov_hash = collation.proof_of_validity.hash();
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ pub struct ParachainBlockData<B: BlockT> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<B: BlockT> ParachainBlockData<B> {
|
impl<B: BlockT> ParachainBlockData<B> {
|
||||||
|
/// Creates a new instance of `Self`.
|
||||||
pub fn new(
|
pub fn new(
|
||||||
header: <B as BlockT>::Header,
|
header: <B as BlockT>::Header,
|
||||||
extrinsics: Vec<<B as BlockT>::Extrinsic>,
|
extrinsics: Vec<<B as BlockT>::Extrinsic>,
|
||||||
@@ -67,4 +68,9 @@ impl<B: BlockT> ParachainBlockData<B> {
|
|||||||
pub fn extrinsics(&self) -> &[B::Extrinsic] {
|
pub fn extrinsics(&self) -> &[B::Extrinsic] {
|
||||||
&self.extrinsics
|
&self.extrinsics
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the [`StorageProof`].
|
||||||
|
pub fn storage_proof(&self) -> &StorageProof {
|
||||||
|
&self.storage_proof
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user