HomePhabricator

fix abc-parkedchain timeouts

Description

fix abc-parkedchain timeouts

Summary:
Lately on the Diff Testing we have seen random failures in this test.
By looking at logs we can see the following race condition was happening:

  1. Node0 generates some new blocks.
  2. Node1 requests & receives headers.
  3. Node0 runs invalidateblock on some blocks.
  4. Node1 requests the blocks corresponding to the full header list.
  5. Node0 ignores requests of invalid blocks, per BlockRequestAllowed.
  6. Node0 re-validates those blocks and continues on.
  7. Test proceeds up to wait_for_tip(). However, Node1 is still waiting for blocks that will never come. Timeout after 60 seconds.

This should break the race by requiring node1 to be synced before any rewind commands are done.

(thanks to @florian for noticing this in the logs)

Test Plan: very hard to test this rare failure; I can't seem to reproduce it locally.

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox, teamcity, florian, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2548

Details

Provenance
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Authored on Feb 14 2019, 02:33
markblundebergPushed on Feb 14 2019, 05:54
Reviewer
Restricted Project
Differential Revision
D2548: fix abc-parkedchain timeouts
Parents
rABC2ba3ac5b795d: Fix regression in getrawtransaction
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rABC011e6fe43a59: fix abc-parkedchain timeouts (authored by Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>).Feb 14 2019, 05:54
Diffusion added a subscriber: florian.