Could Bifrost PubKey registration be done after Keygen TSS (and its timeout) has already completed?
Copying from this Discord question:
Since this can apparently take some time (and be delayed by other things being done?),
is there a disadvantage (for instance any risk of missed observations?)
to doing the AddPubKey step in a separate loop after the GenerateNewKey-sendKeygenToThorchain loop
(namely, once the keygen TSS timeout is no longer a pressing factor)?
|
(--Perhaps would there be a problem if the keygen succeeded and something interrupted the pubkey registration,
so Yggdrasils could not be observed?
However, if Bifrost were interrupted and had to restart,
pubkeys would be pulled from THORChain anyway with getPubkeys().
https://gitlab.com/thorchain/thornode/-/blob/v1.111.0/bifrost/pubkeymanager/pubkey_manager.go#L75 )
(As noted in the linked question, I am similarly curious about why the same node's logs suggest it registers the same PubKey in consecutive keygen tries, seemingly delaying its participation in the keygen party.)
(Update: Many thanks to Ursa!
Noting here in case of future reference, the pruning of not-currently-vaults addresses is here
https://gitlab.com/thorchain/thornode/-/blob/v1.113.0/bifrost/pubkeymanager/pubkey_manager.go#L257-268
(such as when a node that might have a Yggdrasil in fact doesn't have a Yggdrasil, according to getPubkeys
above which checks
https://thornode-v1.ninerealms.com/thorchain/vaults/pubkeys
; also, a separate Keygens loop in processKeygen
is not required for the address-adding, in that processKeygenBlock
which adds the keygen block to its channel uses GetKeygenBlock
with the node's pubkey, so does not include keygens for which the node is not a member!)