Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

p2p sync dead peer handoff #406

Closed
pmesnier opened this issue Sep 12, 2017 · 6 comments
Closed

p2p sync dead peer handoff #406

pmesnier opened this issue Sep 12, 2017 · 6 comments
Assignees
Milestone

Comments

@pmesnier
Copy link
Contributor

Relates to #291. When a new peer node is added to the network, it must be quickly brought up to the head of the chain with the rest of the nodes. As described in #344, this is done by requesting smallish chunks of blocks from many peers, and caching these until they can be assembled into a local clone of the chain.

But if one of those peers dies while delivering a chunk? The solution is to simply transfer the chunk to another peer and request that peer finish supplying the missing blocks. There is a function used to generate new chunk requests, all that is needed here is to push any partially filled chunks onto a queue and hand these out to the peers as they are able to take more requests.

@pmesnier
Copy link
Contributor Author

I am still working this issue, but concurrently working to fix up synchronization issues that have cropped up today. To the solution of #408, I've defined a "sync_manager" class that simplifies the task of distributing sections of historical blocks, and is able to transfer responsibility for a section from one peer to another.

@pmesnier
Copy link
Contributor Author

daily status (a bit delayed) : Transfer of sync request from a dead peer to another works fine. Adding a timer detecting slow peers. working through the implications of that scenario.

@pmesnier
Copy link
Contributor Author

Timer work done, Syncing now tolerates both dead peers and peers that are just slow. Need to add debug-driver code so that these conditions may be reliably tested. Also, the sync only takes the client up to the current last irreversible block. Still need to add the support for sending notices and fetching remaining blocks and pending transactions. Not quite ready for a PR just yet.

@pmesnier
Copy link
Contributor Author

taking off the in progress label for now.

@pmesnier
Copy link
Contributor Author

Addressed by PR #500. Waiting for review. It's a big one.

@pmesnier
Copy link
Contributor Author

Closing, PR #500 resolves this issue.

@thomasbcox thomasbcox added this to the EOS Dawn 1.1 milestone Nov 9, 2017
taokayan pushed a commit to taokayan/eos that referenced this issue May 15, 2019
Small fixes for code generation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants