Skip to content

Commit fd876e0

Browse files
kianenigmaalvicsam
authored andcommitted
Mute a lot of logs in Staking-async and EPMB (#8855)
1 parent 73ccfe0 commit fd876e0

File tree

7 files changed

+14
-25
lines changed

7 files changed

+14
-25
lines changed

substrate/frame/election-provider-multi-block/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ impl<T: Config> ElectionProvider for Continue<T> {
308308
type MaxWinnersPerPage = <T::Verifier as Verifier>::MaxWinnersPerPage;
309309

310310
fn elect(_page: PageIndex) -> Result<BoundedSupportsOf<Self>, Self::Error> {
311-
log!(warn, "'Continue' fallback will do nothing");
312311
Err("'Continue' fallback will do nothing")
313312
}
314313

@@ -1539,7 +1538,7 @@ impl<T: Config> ElectionProvider for Pallet<T> {
15391538
.ok_or(ElectionError::SupportPageNotAvailable)
15401539
.or_else(|err: ElectionError<T>| {
15411540
log!(
1542-
warn,
1541+
debug,
15431542
"primary election for page {} failed due to: {:?}, trying fallback",
15441543
remaining,
15451544
err,
@@ -1551,7 +1550,7 @@ impl<T: Config> ElectionProvider for Pallet<T> {
15511550
// anything else anymore. This will prevent any new submissions to signed and
15521551
// unsigned pallet, and thus the verifier will also be almost stuck, except for the
15531552
// submission of emergency solutions.
1554-
log!(warn, "primary and fallback ({:?}) failed for page {:?}", err, remaining);
1553+
log!(debug, "fallback also ({:?}) failed for page {:?}", err, remaining);
15551554
err
15561555
})
15571556
.map(|supports| {
@@ -1564,7 +1563,6 @@ impl<T: Config> ElectionProvider for Pallet<T> {
15641563
log!(error, "Emergency phase triggered, halting the election.");
15651564
} else {
15661565
if remaining.is_zero() {
1567-
log!(info, "receiving last call to elect(0), rotating round");
15681566
Self::rotate_round()
15691567
} else {
15701568
Self::phase_transition(Phase::Export(remaining - 1))

substrate/frame/election-provider-multi-block/src/signed/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ pub mod pallet {
903903
if crate::Pallet::<T>::current_phase().is_signed_validation_opened_now() {
904904
let maybe_leader = Submissions::<T>::leader(Self::current_round());
905905
sublog!(
906-
info,
906+
debug,
907907
"signed",
908908
"signed validation started, sending validation start signal? {:?}",
909909
maybe_leader.is_some()

substrate/frame/election-provider-multi-block/src/unsigned/miner.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ impl<T: MinerConfig> BaseMiner<T> {
418418
paged.score = score;
419419

420420
miner_log!(
421-
info,
421+
debug,
422422
"mined a solution with {} pages, score {:?}, {} winners, {} voters, {} edges, and {} bytes",
423423
pages,
424424
score,
@@ -773,11 +773,6 @@ impl<T: Config> OffchainWorkerMiner<T> {
773773
}
774774

775775
fn submit_call(call: Call<T>) -> Result<(), OffchainMinerError<T>> {
776-
sublog!(
777-
debug,
778-
"unsigned::ocw-miner",
779-
"miner submitting a solution as an unsigned transaction"
780-
);
781776
let xt = T::create_bare(call.into());
782777
frame_system::offchain::SubmitTransaction::<T, Call<T>>::submit_transaction(xt)
783778
.map(|_| {

substrate/frame/election-provider-multi-block/src/unsigned/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ mod pallet {
171171
)
172172
.expect(error_message);
173173

174-
sublog!(info, "unsigned", "queued an unsigned solution with score {:?}", claimed_score);
175-
176174
Ok(None.into())
177175
}
178176
}

substrate/frame/election-provider-multi-block/src/verifier/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ impl<T: Config> Pallet<T> {
752752

753753
// then store it.
754754
sublog!(
755-
info,
755+
debug,
756756
"verifier",
757757
"queued sync solution with score {:?} for pages {:?}",
758758
truth_score,

substrate/frame/staking-async/src/pallet/impls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ impl<T: Config> Pallet<T> {
663663
}
664664
}
665665

666-
log!(info, "[bounds {:?}] generated {} npos targets", bounds, all_targets.len());
666+
log!(debug, "[bounds {:?}] generated {} npos targets", bounds, all_targets.len());
667667

668668
all_targets
669669
}
@@ -1069,7 +1069,7 @@ impl<T: Config> rc_client::AHStakingInterface for Pallet<T> {
10691069
/// implies a new validator set has been applied, and we must increment the active era to keep
10701070
/// the systems in sync.
10711071
fn on_relay_session_report(report: rc_client::SessionReport<Self::AccountId>) {
1072-
log!(debug, "session report received: {}", report,);
1072+
log!(debug, "Received session report: {}", report,);
10731073
let consumed_weight = T::WeightInfo::rc_on_session_report();
10741074

10751075
let rc_client::SessionReport {

substrate/frame/staking-async/src/session_rotation.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ impl<T: Config> Rotator<T> {
560560

561561
log!(
562562
info,
563-
"Session: end {:?}, start {:?} (ts: {:?}), plan {:?}",
563+
"Session: end {:?}, start {:?} (ts: {:?}), planning {:?}",
564564
end_index,
565565
starting,
566566
activation_timestamp,
@@ -765,7 +765,7 @@ impl<T: Config> Rotator<T> {
765765
/// The newly planned era is targeted to activate in the next session.
766766
fn plan_new_era() {
767767
let _ = CurrentEra::<T>::try_mutate(|x| {
768-
log!(debug, "Planning new era: {:?}, sending election start signal", x.unwrap_or(0));
768+
log!(info, "Planning new era: {:?}, sending election start signal", x.unwrap_or(0));
769769
let could_start_election = EraElectionPlanner::<T>::plan_new_election();
770770
*x = Some(x.unwrap_or(0) + 1);
771771
could_start_election
@@ -877,19 +877,17 @@ impl<T: Config> EraElectionPlanner<T> {
877877
use pallet_staking_async_rc_client::RcClientInterface;
878878
let id = CurrentEra::<T>::get().defensive_unwrap_or(0);
879879
let prune_up_to = Self::get_prune_up_to();
880+
let rc_validators = ElectableStashes::<T>::take().into_iter().collect::<Vec<_>>();
880881

881882
crate::log!(
882883
info,
883-
"Send new validator set to RC. ID: {:?}, prune_up_to: {:?}",
884+
"Sending new validator set of size {:?} to RC. ID: {:?}, prune_up_to: {:?}",
885+
rc_validators.len(),
884886
id,
885887
prune_up_to
886888
);
887889

888-
T::RcClientInterface::validator_set(
889-
ElectableStashes::<T>::take().into_iter().collect(),
890-
id,
891-
prune_up_to,
892-
);
890+
T::RcClientInterface::validator_set(rc_validators, id, prune_up_to);
893891
}
894892
}
895893
}
@@ -1022,7 +1020,7 @@ impl<T: Config> EraElectionPlanner<T> {
10221020
}
10231021

10241022
log!(
1025-
info,
1023+
debug,
10261024
"stored a page of stakers with {:?} validators and {:?} total backers for era {:?}",
10271025
elected_stashes.len(),
10281026
total_backers,

0 commit comments

Comments
 (0)