HomePhabricator

Allow block announcements with headers
50262d895316Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Allow block announcements with headers

This replaces using inv messages to announce new blocks, when a peer requests
(via the new "sendheaders" message) that blocks be announced with headers
instead of inv's.

Since headers-first was introduced, peers send getheaders messages in response
to an inv, which requires generating a block locator that is large compared to
the size of the header being requested, and requires an extra round-trip before
a reorg can be relayed. Save time by tracking headers that a peer is likely to
know about, and send a headers chain that would connect to a peer's known
headers, unless the chain would be too big, in which case we revert to sending
an inv instead.

Based off of @sipa's commit to announce all blocks in a reorg via inv,
which has been squashed into this commit.

Rebased-by: Pieter Wuille

Details

Provenance
Suhas Daftuar <sdaftuar@gmail.com>Authored on Nov 18 2014, 21:16
Pieter Wuille <pieter.wuille@gmail.com>Committed on Nov 29 2015, 10:59
deadalnixPushed on May 14 2017, 22:04
Parents
rABCc894fbbb1dc0: Merge pull request #7106
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <pieter.wuille@gmail.com> committed rABC50262d895316: Allow block announcements with headers (authored by Suhas Daftuar <sdaftuar@gmail.com>).Nov 29 2015, 10:59