Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
Currently we run into an issue when syncing when if a node does not have a parent block when processing, it will fail and its chain will never advance. Instead, we should request parent blocks from peers. @nisdas outlined the following as a solution:
- Request for block by hash,
- Once we receive it we check again for its parent, we can recursively do this until maybe a limit of 10 blocks or something.
- If we have like 10 blocks missing that means something is deeply wrong,
- Have an in-memory map of blocks similar to initial-sync
- We can use that to store any blocks that cannot be processed yet
- Add in a new field in the regular sync struct, currentHead
- using this we can pre-check received blocks, if the block is more than 1 slot ahead then we keep it in the map, we can keep requesting for parent blocks until we get one that has is 1 slot ahead from the currentHead