DHT bootnodes: get randomness from the next epoch descriptor#8405
Conversation
| @@ -207,9 +207,20 @@ impl BootnodeAdvertisement { | |||
| async fn handle_import_notification(&mut self, header: RelayHeader) { | |||
There was a problem hiding this comment.
Some edge case that is not covered is when the notification stream skipped blocks (because of major sync). Then you would maybe advertise too long with an invalid key.
There was a problem hiding this comment.
Unfortunately, stop_providing is a local-only action only (Kademlia DHT doesn't have a way to tell target nodes we are not providing the key anymore), so remote nodes will advertise every key until it expires in 48 hours anyway.
There was a problem hiding this comment.
This was not what I wanted to say :) The problem I raised there is when you for example sync across an epoch change, but the node was doing this in "major sync mode". Then you would not get a notification for these blocks.
There was a problem hiding this comment.
Thanks for the explanation, this makes sense. How common is such situation except during the initial sync?
Co-authored-by: Bastian Köcher <git@kchr.de>
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
|
It looks like an unrelated test to these changes is failing (since we have only modified |
Yes we can rerun, seems to be known flaky :( polkadot-sdk/substrate/client/service/test/src/client/mod.rs Lines 1750 to 1752 in db5ee7d |
Use runtime calls to get epoch randomness only on startup, and later get it from the next epoch descriptor at the first block of every epoch. Resolves #8377. --------- Co-authored-by: Bastian Köcher <git@kchr.de>
Use runtime calls to get epoch randomness only on startup, and later get it from the next epoch descriptor at the first block of every epoch. Resolves #8377. --------- Co-authored-by: Bastian Köcher <git@kchr.de>
Use runtime calls to get epoch randomness only on startup, and later get it from the next epoch descriptor at the first block of every epoch.
Resolves #8377.