{"number":130,"title":"sendheaders message","authors":["Suhas Daftuar"],"status":"Deployed","type":"Specification","layer":"Peer Services","created":"2015-05-08","license":"PD","requires":[],"replaces":[],"replacedBy":[],"discussion":[],"abstract":"Add a new message, \"sendheaders\", which indicates that a node prefers to receive new block announcements via a \"headers\" message rather than an \"inv\".","eli5":"Adds a message by which a node asks its peers to announce new blocks by sending the block headers directly instead of a short notice to request later. This saves a round of messages and helps new blocks spread across the network faster.","categories":["network"],"filename":"bip-0130.mediawiki","githubUrl":"https://github.com/bitcoin/bips/blob/master/bip-0130.mediawiki","format":"mediawiki","readingMinutes":2,"inbound":1,"revisions":10,"impact":34,"core":false,"references":[],"lastModified":"2025-10-08","html":"<h2 id=\"abstract\">Abstract</h2>\n<p>Add a new message, \"sendheaders\", which indicates that a node prefers to receive new block announcements via a \"headers\" message rather than an \"inv\".</p>\n<h2 id=\"motivation\">Motivation</h2>\n<p>Since the introduction of \"headers-first\" downloading of blocks in 0.10, blocks will not be processed unless they are able to connect to a (valid) headers chain.  Consequently, block relay generally works as follows:</p>\n<ol><li>\nA node (N) announces the new tip with an \"inv\" message, containing the block hash\n</li></ol>\n<ol><li>\nA peer (P) responds to the \"inv\" with a \"getheaders\" message (to request headers up to the new tip) and a \"getdata\" message for the new tip itself\n</li></ol>\n<ol><li>\nN responds with a \"headers\" message (with the header for the new block along with any preceding headers unknown to P) and a \"block\" message containing the new block\n</li></ol>\n<p>However, in the case where a new block is being announced that builds on the tip, it would be generally more efficient if the node N just announced the block header for the new block, rather than just the block hash, and saved the peer from generating and transmitting the getheaders message (and the required block locator).</p>\n<p>In the case of a reorg, where 1 or more blocks are disconnected, nodes currently just send an \"inv\" for the new tip.  Peers currently are able to request the new tip immediately, but wait until the headers for the intermediate blocks are delivered before requesting those blocks.  By announcing headers from the last fork point leading up to the new tip in the block announcement, peers are able to request all the intermediate blocks immediately.</p>\n<h2 id=\"specification\">Specification</h2>\n<ol><li>\nThe sendheaders message is defined as an empty message where pchCommand == \"sendheaders\"\n</li></ol>\n<ol><li>\nUpon receipt of a \"sendheaders\" message, the node will be permitted, but not required, to announce new blocks by sending the header of the new block (along with any other blocks that a node believes a peer might need in order for the block to connect).\n</li></ol>\n<ol><li>\nFeature discovery is enabled by checking protocol version >= 70012\n</li></ol>\n<h2 id=\"additional-constraints\">Additional constraints</h2>\n<p>As support for sendheaders is optional, software that implements this may also optionally impose additional constraints, such as only honoring sendheaders messages shortly after a connection is established.</p>\n<h2 id=\"backward-compatibility\">Backward compatibility</h2>\n<p>Older clients remain fully compatible and interoperable after this change.</p>\n<h2 id=\"implementation\">Implementation</h2>\n<p><a href=\"https://github.com/bitcoin/bitcoin/pull/6494\">https://github.com/bitcoin/bitcoin/pull/6494</a></p>\n<h2 id=\"copyright\">Copyright</h2>\n<p>This document is placed in the public domain.</p>","toc":[{"id":"abstract","title":"Abstract","level":2},{"id":"motivation","title":"Motivation","level":2},{"id":"specification","title":"Specification","level":2},{"id":"additional-constraints","title":"Additional constraints","level":2},{"id":"backward-compatibility","title":"Backward compatibility","level":2},{"id":"implementation","title":"Implementation","level":2},{"id":"copyright","title":"Copyright","level":2}],"history":{"totalCommits":10,"firstCommit":"2015-10-23T14:30:43-04:00","lastUpdated":"2025-10-08T14:59:36-07:00","events":[{"sha":"24e96e870fffaa257b465ce1f0370c14aac588e8","date":"2025-10-08T14:59:36-07:00","author":"Murch","message":"process: Created ↦ Assigned","url":"https://github.com/bitcoin/bips/commit/24e96e870fffaa257b465ce1f0370c14aac588e8","kind":"edit"},{"sha":"5207ef92a52d0b8902895b0dbb40823a4d698ec9","date":"2025-04-11T20:08:17-07:00","author":"Murch","message":"process: Author ↦ Authors","url":"https://github.com/bitcoin/bips/commit/5207ef92a52d0b8902895b0dbb40823a4d698ec9","kind":"edit"},{"sha":"59730dec4fb641a41589aa1b91d3c452f13e0e36","date":"2025-04-11T20:05:13-07:00","author":"Murch","message":"process: Remove Comments-URI and -Summary","url":"https://github.com/bitcoin/bips/commit/59730dec4fb641a41589aa1b91d3c452f13e0e36","kind":"edit"},{"sha":"a233bde4af52c6a11269e2e6dd9707abce441ffe","date":"2025-04-11T18:19:21-07:00","author":"Murch","message":"process: Standards Track ↦ Specification","url":"https://github.com/bitcoin/bips/commit/a233bde4af52c6a11269e2e6dd9707abce441ffe","kind":"edit"},{"sha":"5d3ceb37734f80b2ec206fc94245e3bfd6d5b0f0","date":"2025-04-11T18:08:44-07:00","author":"Murch","message":"process: Final/Active ↦ Deployed","url":"https://github.com/bitcoin/bips/commit/5d3ceb37734f80b2ec206fc94245e3bfd6d5b0f0","kind":"status"},{"sha":"729c44c4eaca2de76e83430609d1f271add0533a","date":"2024-07-10T15:05:06-04:00","author":"Suhas Daftuar","message":"Move BIP 130 to Final","url":"https://github.com/bitcoin/bips/commit/729c44c4eaca2de76e83430609d1f271add0533a","kind":"status"},{"sha":"959fecc15bdad070afa63455468b1dba54655fa6","date":"2016-11-30T09:47:31+00:00","author":"Luke Dashjr","message":"Promote BIP 2 Draft->Active, and implement it","url":"https://github.com/bitcoin/bips/commit/959fecc15bdad070afa63455468b1dba54655fa6","kind":"status"},{"sha":"72f18918a8ae655212ea2700b30f0dc4d758b843","date":"2016-11-30T09:45:33+00:00","author":"Luke Dashjr","message":"Promote BIP 123 Draft->Active, and implement it","url":"https://github.com/bitcoin/bips/commit/72f18918a8ae655212ea2700b30f0dc4d758b843","kind":"status"},{"sha":"387fc6011bd804609fd751786e50439d5c11a097","date":"2016-08-23T19:47:29+00:00","author":"Luke Dashjr","message":"Promote BIPs 18, 39, 44, 67, 80, 81, 111, 125, 130, and 132 Draft->Accepted; change BIP 43 to Informational","url":"https://github.com/bitcoin/bips/commit/387fc6011bd804609fd751786e50439d5c11a097","kind":"edit"},{"sha":"6721b0b1cb9ca32c5661f1b75d62eb640a9a8e5d","date":"2015-10-23T14:30:43-04:00","author":"Suhas Daftuar","message":"Update with assigned BIP number (130)","url":"https://github.com/bitcoin/bips/commit/6721b0b1cb9ca32c5661f1b75d62eb640a9a8e5d","kind":"edit"}]}}