From fff8dcb8271e2da9c6d0a259fd346338ac5c740f Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 23 Dec 2023 21:28:50 -0500 Subject: [PATCH] Document usage of latest_decided in AuthorityDiscoveryApi --- substrate/runtime/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/substrate/runtime/src/lib.rs b/substrate/runtime/src/lib.rs index 57fa4ab9..f083befb 100644 --- a/substrate/runtime/src/lib.rs +++ b/substrate/runtime/src/lib.rs @@ -579,6 +579,12 @@ sp_api::impl_runtime_apis! { if network == NetworkId::Serai { continue; } + // Returning the latest-decided, not latest and active, means the active set + // may fail to peer find if there isn't sufficient overlap. If a large amount reboot, + // forcing some validators to successfully peer find in order for the threshold to become + // online again, this may cause a liveness failure. + // + // This is assumed not to matter in real life, yet an interesting note. let participants = ValidatorSets::participants_for_latest_decided_set(network) .map_or(vec![], BoundedVec::into_inner);