when adding duplicates to quarantine, schedule deepest missing parent#6112
Conversation
During sync, sometimes the same block gets encountered and added to quarantine multiple times. If its parent is already known, quarantine incorrectly registers it as missing, leading to re-download. This can be fixed by registering the parent's deepest missing parent recursively. Also increase the stickiness of `missing`. We only perform 4 attempts within ~16 seconds before giving up. Very frequently, this is not enough and there is no progress until sync manager kicks in even on holesky.
When checking for `MissingParent`, it may be that the parent block was already discovered as part of a prior run. In that case, it can be loaded from storage and processed without having to rediscover the entire branch from the network. This is similar to #6112 but for blocks that are discovered via gossip / sync mgr instead of via request mgr.
When checking for `MissingParent`, it may be that the parent block was already discovered as part of a prior run. In that case, it can be loaded from storage and processed without having to rediscover the entire branch from the network. This is similar to #6112 but for blocks that are discovered via gossip / sync mgr instead of via request mgr.
why is this needed though? that ancestor should already be registered in this case? |
|
Entries from the |
this sounds like a broader issue then - ie in the quarantine, we have limited space (in part because it lives in-memory) - it seems to me then that when running low on space, we should strive to keep "early" entries and discard entries that build on top of them first so that we don't inadvertedly remove an ancestor over a descendant from the list of "interesting" blocks -> the "retry" count of an ancestor should be the sum of all its known descendants and used to prioritise requests (since resolving such a quarantine item would have the effect of unblocking a large number of blocks) |
During sync, sometimes the same block gets encountered and added to quarantine multiple times. If its parent is already known, quarantine incorrectly registers it as missing, leading to re-download. This can be fixed by registering the parent's deepest missing parent recursively.
Also increase the stickiness of
missing. We only perform 4 attempts within ~16 seconds before giving up. Very frequently, this is not enough and there is no progress until sync manager kicks in even on holesky.