It's ok not to resolve the entire cohort, we just need a threshold of them. In most cases the entire cohort should be learned about, but in the rare case of only a threshold known about that is fine.

pull/3351/head
derekpierre 2023-11-10 10:33:54 -05:00 committed by KPrasch
parent 65fb84281f
commit e8526f915d
1 changed files with 8 additions and 1 deletions

View File

@ -611,15 +611,22 @@ class Bob(Character):
self.block_until_specific_nodes_are_known(
addresses=validators,
timeout=timeout,
allow_missing=0,
allow_missing=(ritual.dkg_size - ritual.threshold),
)
cohort = list()
for staking_provider_address, transcript_bytes in ritual.transcripts:
if staking_provider_address not in self.known_nodes:
continue
remote_operator = self.known_nodes[staking_provider_address]
remote_operator.mature()
cohort.append(remote_operator)
if len(cohort) < ritual.threshold:
raise Ursula.NotEnoughUrsulas(
f"Unable to learn about a threshold, {ritual.threshold}-of-{ritual.dkg_size} Ursulas for ritual"
)
return cohort
@staticmethod