Make sure we always have a node to do IBD from #2461

pull sipa wants to merge 2 commits into bitcoin:master from sipa:syncnode changing 4 files +76 −19
  1. sipa commented at 10:45 pm on April 4, 2013: member

    This introduces the concept of the ‘sync node’, which is the one we asked for missing blocks. In case the sync node goes away, a new one will be selected.

    For now, the heuristic is very simple, but it can easily be extended later to add better policies.

  2. Diapolo commented at 6:19 am on April 5, 2013: none

    @sipa Does this fix the non-working IBD after importing blocks from disk (but not up to the height the network currently has - so after disk we need to switch to network)?

    Edit: I’m creating a build with that patch and will see ^^.

    Edit 2: Very nice, it immediately switches to network sync, when import was finished, GREAT!

  3. sipa commented at 9:34 am on April 5, 2013: member
    @Diapolo Indeed, that’s what it should do :)
  4. Diapolo commented at 10:38 am on April 6, 2013: none
    @sipa What about an information, what the current sync node is? Perhaps in getinfo or getpeerinfo (isSyncNode or something) RPC?
  5. sipa commented at 4:23 pm on April 6, 2013: member
    I think that can be added to getpeerinfo, indeed.
  6. BitcoinPullTester commented at 8:27 pm on April 6, 2013: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/1cd6ae536a09143eb3cd95773a949255462af091 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
  7. Make sure we always have a node to do IBD from
    This introduces the concept of the 'sync node', which is the one we
    asked for missing blocks. In case the sync node goes away, a new one
    will be selected.
    
    For now, the heuristic is very simple, but it can easily be extended
    later to add better policies.
    6ed71b5e4f
  8. Add bytessent, bytesrecv and syncnode to getpeerinfo 86648a8d16
  9. sipa commented at 5:32 pm on April 7, 2013: member
    New commit: add bytessent, bytesrecv and sync to the getpeerinfo output.
  10. BitcoinPullTester commented at 6:05 pm on April 7, 2013: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/86648a8d16699ab392508a48bb867d3fc4f7d6cf for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
  11. jgarzik commented at 5:06 am on April 8, 2013: contributor
    ACK
  12. sipa commented at 8:55 am on April 8, 2013: member
    @jgarzik To comment on a remark you made in another pullreq: this patch effectively only uses the scoring mechanism when the current sync node goes away, even though it may not be the “node in practice being synced from” anymore. When IBD is complete, and a node (different from the designated sync node) announces a new block, we will fetch it from him. This patch does not switch the sync node to that peer then, though that could be improved in further revisions (see #2034). All this does is make sure there is always at least one node we’ve asked about new blocks.
  13. gavinandresen referenced this in commit 1fd3ed25be on Apr 9, 2013
  14. gavinandresen merged this on Apr 9, 2013
  15. gavinandresen closed this on Apr 9, 2013

  16. sipa deleted the branch on May 3, 2013
  17. laudney referenced this in commit 1a9a511193 on Mar 19, 2014
  18. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-18 03:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me