HomePhabricator

Modify getblocktxn handler not to drop requests for old blocks

Description

Modify getblocktxn handler not to drop requests for old blocks

The current getblocktxn implementation drops and ignores requests for old
blocks, which causes occasional sync_block timeouts during the
p2p-compactblocks.py test as reported in
https://github.com/bitcoin/bitcoin/issues/8842.

The p2p-compactblocks.py test setup creates many new blocks in a short
period of time, which can lead to getblocktxn requests for blocks below the
hardcoded depth limit of 10 blocks. This commit changes the getblocktxn
handler not to ignore these requests, so the peer nodes in the test setup
will reliably be able to sync.

The protocol change is documented in BIP-152 update "Allow block responses
to getblocktxn requests" at https://github.com/bitcoin/bips/pull/469.

The protocol change is not expected to affect nodes running outside the test
environment, because there shouldn't normally be lots of new blocks being
rapidly added that need to be synced.

Details

Provenance
Russell Yanofsky <russ@chaincode.com>Authored on Oct 26 2016, 18:53
Russell Yanofsky <russ@yanofsky.org>Committed on Nov 7 2016, 19:35
deadalnixPushed on May 14 2017, 22:04
Parents
rABC55bfddcabbf9: [qa] Fix stale data bug in test_compactblocks_not_at_tip
Branches
Unknown
Tags
Unknown

Event Timeline

Russell Yanofsky <russ@yanofsky.org> committed rABCdac53b58b555: Modify getblocktxn handler not to drop requests for old blocks (authored by Russell Yanofsky <russ@chaincode.com>).Nov 7 2016, 19:35