Skip to content

Commit

Permalink
added non-sensitive println summary logs for production logs where en…
Browse files Browse the repository at this point in the history
…clave logs will be disabled
  • Loading branch information
brenzi committed Dec 24, 2023
1 parent dd516bf commit ee93813
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions core-primitives/types/src/parentchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ pub enum ParentchainId {
impl std::fmt::Display for ParentchainId {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
let message = match self {
ParentchainId::Integritee => "L1:Integritee",
ParentchainId::TargetA => "L1:AssetHub",
ParentchainId::TargetB => "L1:UNDEFINED",
ParentchainId::Integritee => "Integritee",
ParentchainId::TargetA => "TargetA",
ParentchainId::TargetB => "TargetB",
};
write!(f, "{}", message)
}
Expand Down
2 changes: 1 addition & 1 deletion enclave-runtime/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4795,7 +4795,7 @@ version = "1.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if 0.1.10",
"cfg-if 1.0.0",
"digest 0.10.7",
"static_assertions",
]
Expand Down
7 changes: 5 additions & 2 deletions sidechain/consensus/aura/src/slot_proposer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ where

// Remove all not successfully executed operations from the top pool.
let failed_operations = batch_execution_result.get_failed_operations();
let nr_failed_operations = failed_operations.len();
self.top_pool_author.remove_calls_from_pool(
self.shard,
failed_operations
Expand All @@ -147,9 +148,11 @@ where
)
.map_err(|e| ConsensusError::Other(e.to_string().into()))?;

info!(
"sidechain block production summary: processed {}/{} in {}ms",
println!(
"[Sidechain] propose block {} summary: executed {} failed {} from {} in queue in {}ms",
sidechain_block.block().header().block_number(),
number_executed_transactions,
nr_failed_operations,
trusted_calls.len(),
max_duration.as_millis(),
);
Expand Down
5 changes: 3 additions & 2 deletions sidechain/consensus/common/src/peer_block_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ where
_ => Err(e),
},
Ok(latest_parentchain_header) => {
info!("Successfully imported broadcast sidechain block (number: {}, author: {}), based on parentchain block {:?}",
sidechain_block_number, hex_encode(sidechain_block.block().block_data().block_author().encode().as_slice()), latest_parentchain_header.number());
println!("[Sidechain] imported block (number: {}, tcalls: {}, author: {}), based on parentchain block {:?}",
sidechain_block_number, sidechain_block.block().block_data().signed_top_hashes().len(),
hex_encode(sidechain_block.block().block_data().block_author().encode().as_slice()) ,latest_parentchain_header.number());

// We confirm the successful block import. Only in this case, not when we're in
// on-boarding and importing blocks that were fetched from a peer.
Expand Down

0 comments on commit ee93813

Please sign in to comment.