Skip to content

Use BIP-130 sendheaders #331

@rustaceanrob

Description

@rustaceanrob

Describe the enhancement

Before BIP-130, new blocks are announced via an inv message. This is currently how the node discovers new blocks. To save a round-trip of inv -> getheaders -> headers, BIP-130 allows for block announcements by simply sending a headers message as opposed to an inv. With the changes to chain, the node should now be able to implement BIP-130.

ref: https://github.com/bitcoin/bips/blob/master/bip-0130.mediawiki

Additional context

  • Any pending CFHeader messages should be reset upon receiving headers (previously done when receiving inv)
  • The state should be reset to Behind if the node receives a headers message (previously done when receiving inv)
  • The sendheaders message must be sent before sending verack

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions