Skip to content

Conversation

@ten15bit
Copy link
Contributor

Description

  • fixes a bug where block headers weren't readded to the work queue in case of errors
  • also moves the block headers work queue to syncState to keep it together with the work queues for bodies and receipts

Proposed Solution

If requests time out or the peer disconnects we need to readd the requested block headers to the work queue so they will be requested from another peer.

Testing

Full sync on sagano testnet and successful syncing on mainnet for some time.

private def handleRequestFailure(peer: Peer, handler: ActorRef, reason: BlacklistReason): Unit = {
removeRequestHandler(handler)

requestedHeaders.get(peer).foreach(requested => syncState = syncState.enqueueHeaderRange(requested))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the relevant line for fixing the bug.

@ten15bit ten15bit marked this pull request as ready for review March 19, 2021 09:57
@ten15bit ten15bit merged commit 404ba7b into develop Mar 19, 2021
@ten15bit ten15bit deleted the fix/etcm-716 branch March 19, 2021 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants