mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
sc-consensus-beefy: reduce log levels (#3418)
fixes https://github.com/paritytech/polkadot-sdk/issues/3407
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
use crate::{error::Error, worker::PersistedState, LOG_TARGET};
|
||||
use codec::{Decode, Encode};
|
||||
use log::{info, trace};
|
||||
use log::{debug, trace};
|
||||
use sc_client_api::{backend::AuxStore, Backend};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
@@ -30,7 +30,7 @@ const WORKER_STATE_KEY: &[u8] = b"beefy_voter_state";
|
||||
const CURRENT_VERSION: u32 = 4;
|
||||
|
||||
pub(crate) fn write_current_version<BE: AuxStore>(backend: &BE) -> Result<(), Error> {
|
||||
info!(target: LOG_TARGET, "🥩 write aux schema version {:?}", CURRENT_VERSION);
|
||||
debug!(target: LOG_TARGET, "🥩 write aux schema version {:?}", CURRENT_VERSION);
|
||||
AuxStore::insert_aux(backend, &[(VERSION_KEY, CURRENT_VERSION.encode().as_slice())], &[])
|
||||
.map_err(|e| Error::Backend(e.to_string()))
|
||||
}
|
||||
|
||||
@@ -460,10 +460,14 @@ where
|
||||
R::Api: BeefyApi<B, AuthorityId>,
|
||||
{
|
||||
let blockchain = backend.blockchain();
|
||||
|
||||
// Walk up the chain looking for the validator set active at 'at_header'. Process both state and
|
||||
// header digests.
|
||||
debug!(target: LOG_TARGET, "🥩 Trying to find validator set active at header: {:?}", at_header);
|
||||
debug!(
|
||||
target: LOG_TARGET,
|
||||
"🥩 Trying to find validator set active at header(number {:?}, hash {:?})",
|
||||
at_header.number(),
|
||||
at_header.hash()
|
||||
);
|
||||
let mut header = at_header.clone();
|
||||
loop {
|
||||
debug!(target: LOG_TARGET, "🥩 Looking for auth set change at block number: {:?}", *header.number());
|
||||
|
||||
@@ -387,7 +387,7 @@ where
|
||||
.flatten()
|
||||
.map(|justifs| justifs.get(BEEFY_ENGINE_ID).is_some())
|
||||
{
|
||||
info!(
|
||||
debug!(
|
||||
target: LOG_TARGET,
|
||||
"🥩 Initialize BEEFY voter at last BEEFY finalized block: {:?}.",
|
||||
*header.number()
|
||||
@@ -439,7 +439,7 @@ where
|
||||
}
|
||||
|
||||
if let Some(active) = find_authorities_change::<B>(&header) {
|
||||
info!(
|
||||
debug!(
|
||||
target: LOG_TARGET,
|
||||
"🥩 Marking block {:?} as BEEFY Mandatory.",
|
||||
*header.number()
|
||||
@@ -471,7 +471,7 @@ where
|
||||
state.set_best_grandpa(best_grandpa.clone());
|
||||
// Overwrite persisted data with newly provided `min_block_delta`.
|
||||
state.set_min_block_delta(min_block_delta);
|
||||
info!(target: LOG_TARGET, "🥩 Loading BEEFY voter state from db: {:?}.", state);
|
||||
debug!(target: LOG_TARGET, "🥩 Loading BEEFY voter state from db: {:?}.", state);
|
||||
|
||||
// Make sure that all the headers that we need have been synced.
|
||||
let mut new_sessions = vec![];
|
||||
@@ -489,7 +489,7 @@ where
|
||||
|
||||
// Make sure we didn't miss any sessions during node restart.
|
||||
for (validator_set, new_session_start) in new_sessions.drain(..).rev() {
|
||||
info!(
|
||||
debug!(
|
||||
target: LOG_TARGET,
|
||||
"🥩 Handling missed BEEFY session after node restart: {:?}.",
|
||||
new_session_start
|
||||
@@ -630,13 +630,14 @@ where
|
||||
&mut self,
|
||||
notification: &FinalityNotification<B>,
|
||||
) -> Result<(), Error> {
|
||||
let header = ¬ification.header;
|
||||
debug!(
|
||||
target: LOG_TARGET,
|
||||
"🥩 Finality notification: header {:?} tree_route {:?}",
|
||||
notification.header,
|
||||
"🥩 Finality notification: header(number {:?}, hash {:?}) tree_route {:?}",
|
||||
header.number(),
|
||||
header.hash(),
|
||||
notification.tree_route,
|
||||
);
|
||||
let header = ¬ification.header;
|
||||
|
||||
self.base
|
||||
.runtime
|
||||
@@ -757,7 +758,7 @@ where
|
||||
match rounds.add_vote(vote) {
|
||||
VoteImportResult::RoundConcluded(signed_commitment) => {
|
||||
let finality_proof = VersionedFinalityProof::V1(signed_commitment);
|
||||
info!(
|
||||
debug!(
|
||||
target: LOG_TARGET,
|
||||
"🥩 Round #{} concluded, finality_proof: {:?}.", block_number, finality_proof
|
||||
);
|
||||
@@ -1165,7 +1166,7 @@ where
|
||||
return Ok(())
|
||||
} else if let Some(local_id) = self.base.key_store.authority_id(validators) {
|
||||
if offender_id == local_id {
|
||||
debug!(target: LOG_TARGET, "🥩 Skip equivocation report for own equivocation");
|
||||
warn!(target: LOG_TARGET, "🥩 Skip equivocation report for own equivocation");
|
||||
return Ok(())
|
||||
}
|
||||
}
|
||||
@@ -1234,7 +1235,7 @@ where
|
||||
// if the mandatory block (session_start) does not have a beefy justification yet,
|
||||
// we vote on it
|
||||
let target = if best_beefy < session_start {
|
||||
debug!(target: LOG_TARGET, "🥩 vote target - mandatory block: #{:?}", session_start,);
|
||||
debug!(target: LOG_TARGET, "🥩 vote target - mandatory block: #{:?}", session_start);
|
||||
session_start
|
||||
} else {
|
||||
let diff = best_grandpa.saturating_sub(best_beefy) + 1u32.into();
|
||||
|
||||
Reference in New Issue
Block a user