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

P2p sync slow peers #291 #500

Merged
merged 4 commits into from
Sep 26, 2017
Merged

P2p sync slow peers #291 #500

merged 4 commits into from
Sep 26, 2017

Conversation

pmesnier
Copy link
Contributor

Summary of changes:

  • Added timeout handler to connections in order to check for slow peers.
  • Broke the classes net_plugin_impl, connections, and sync_manager into separate declaration and definition sections to clean up some cross references between these classes. Since the net_plugin.cpp file is getting rather long, this change also enables splitting that into separate header and implementation files if desired.
  • Added several more TODO warnings to identify remaining sections of code to be implemented to complete p2p.
  • Renamed send() to enqueue() since that is more accurate to what the function does. Same with write_block_backlog() to enqueue_sync_block()
  • Refactored the new sync_manager class to enable the reassignment of pending block requests. as needed.
  • Sync based on block number stops with the last irrefutable block. subsequent blocks are to be requested by block id.

Questions:

  1. I'm not sure how to handle requesting blocks newer than the last irreversible block. In that it is possible different peers may represent different forks. I suppose that different the chain controller will hold different forks until consensus dictates which is correct.
  2. what is the best way to find all of the unblocked transactions, since those will be needed for the next block?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants