<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=BIP_0338</id>
	<title>BIP 0338 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=BIP_0338"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0338&amp;action=history"/>
	<updated>2026-04-26T08:57:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0338&amp;diff=69290&amp;oldid=prev</id>
		<title>934: Update BIP text with latest version from https://github.com/bitcoin/bips/blob/909f8e8b0c7f94fe/bip-0338.mediawiki</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0338&amp;diff=69290&amp;oldid=prev"/>
		<updated>2022-05-05T15:33:04Z</updated>

		<summary type="html">&lt;p&gt;Update BIP text with latest version from https://github.com/bitcoin/bips/blob/909f8e8b0c7f94fe/bip-0338.mediawiki&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:33, 5 May 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l68&quot;&gt;Line 68:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The protocol version of nodes implementing this BIP must be set to 70017 or higher.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The protocol version of nodes implementing this BIP must be set to 70017 or higher.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# If a node sets the transaction relay field in the version message to a peer to false, then the disabletx message MAY also be sent in response to a version message from that peer if the peer&amp;#039;s protocol version is &amp;gt;= 70017. If sent, the disabletx message MUST be sent prior to sending a verack.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# If a node sets the transaction relay field in the version message to a peer to false, then the disabletx message MAY also be sent in response to a version message from that peer if the peer&amp;#039;s protocol version is &amp;gt;= 70017. If sent, the disabletx message MUST be sent prior to sending a verack.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# A node MUST NOT send the disabletx message if the transaction relay field in the version message is omitted or set to true.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# A node that has sent or received a disabletx message to/from a peer MUST NOT send any of these messages to the peer:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# A node that has sent or received a disabletx message to/from a peer MUST NOT send any of these messages to the peer:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## inv messages for transactions&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## inv messages for transactions&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;## notfound messages for transactions&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## getdata messages for transactions&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## getdata messages for transactions&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## getdata messages for merkleblock (BIP 37)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## getdata messages for merkleblock (BIP 37)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## filteradd/filterload/filterclear (BIP 37)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## filteradd/filterload/filterclear (BIP 37)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;## feefilter (BIP 133)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## mempool (BIP 35)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## mempool (BIP 35)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## tx message&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;## tx message&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key db_bitcoin_en:diff:1.41:old-68414:rev-69290:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>934</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0338&amp;diff=68414&amp;oldid=prev</id>
		<title>934: Update BIP text with latest version from https://github.com/bitcoin/bips/blob/19c429ee2831d898/bip-0338.mediawiki</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0338&amp;diff=68414&amp;oldid=prev"/>
		<updated>2021-02-12T21:22:13Z</updated>

		<summary type="html">&lt;p&gt;Update BIP text with latest version from https://github.com/bitcoin/bips/blob/19c429ee2831d898/bip-0338.mediawiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{bip}}&lt;br /&gt;
{{BipMoved|bip-0338.mediawiki}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 338&lt;br /&gt;
  Layer: Peer Services&lt;br /&gt;
  Title: Disable transaction relay message&lt;br /&gt;
  Author: Suhas Daftuar &amp;lt;sdaftuar@chaincode.com&amp;gt;&lt;br /&gt;
  Comments-Summary: No comments yet.&lt;br /&gt;
  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0338&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 2020-09-03&lt;br /&gt;
  License: BSD-2-Clause&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
&lt;br /&gt;
This BIP describes a change to the p2p protocol to allow a node to tell a peer&lt;br /&gt;
that a connection will not be used for transaction relay, to support&lt;br /&gt;
block-relay-only connections that are currently in use on the network.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
This proposal is part of an effort to increase the number of inbound&lt;br /&gt;
connections that a peer can service, by distinguishing peers which will not&lt;br /&gt;
relay transactions from those that do.&lt;br /&gt;
&lt;br /&gt;
Since 2019, software has been deployed[1] which initiates&lt;br /&gt;
connections on the Bitcoin network and sets the transaction relay field&lt;br /&gt;
(introduced by BIP 37 and also defined in BIP 60) to false, to prevent&lt;br /&gt;
transaction relay from occurring on the connection. Additionally, addr messages&lt;br /&gt;
received from the peer are ignored by this software.&lt;br /&gt;
&lt;br /&gt;
The purpose of these connections is two-fold: by making additional&lt;br /&gt;
low-bandwidth connections on which blocks can propagate, the robustness of a&lt;br /&gt;
node to network partitioning attacks is strengthened.  Additionally, by not&lt;br /&gt;
relaying transactions and ignoring received addresses, the ability of an&lt;br /&gt;
adversary to learn the complete network graph (or a subgraph) is reduced[2],&lt;br /&gt;
which in turn increases the cost or difficulty to an attacker seeking to carry&lt;br /&gt;
out a network partitioning attack (when compared with having such knowledge).&lt;br /&gt;
&lt;br /&gt;
The low-bandwidth / minimal-resource nature of these connections is currently&lt;br /&gt;
known only by the initiator of the connection; this is because the transaction&lt;br /&gt;
relay field in the version message is not a permanent setting for the lifetime&lt;br /&gt;
of the connection.  Consequently, a node receiving an inbound connection with&lt;br /&gt;
transaction relay disabled cannot distinguish between a peer that will never&lt;br /&gt;
enable transaction relay (as described in BIP 37) and one that will.  Moreover,&lt;br /&gt;
the node also cannot determine that the incoming connection will ignore relayed&lt;br /&gt;
addresses; with that knowledge a node would likely choose other peers to&lt;br /&gt;
receive announced addresses instead.&lt;br /&gt;
&lt;br /&gt;
This proposal adds a new, optional message that a node can send a peer when&lt;br /&gt;
initiating a connection to that peer, to indicate that connection should not be&lt;br /&gt;
used for transaction relay for the connection&amp;#039;s lifetime. In addition, without&lt;br /&gt;
a current mechanism to negotiate whether addresses should be relayed on a&lt;br /&gt;
connection, this BIP suggests that address messages not be sent on links where&lt;br /&gt;
transaction relay has been disabled.&lt;br /&gt;
&lt;br /&gt;
After this BIP is deployed, nodes could more easily implement inbound&lt;br /&gt;
connection limiting that differentiates low-resource nodes (such as those&lt;br /&gt;
sending disabletx) from full-relay peers, potentially allowing for an increase&lt;br /&gt;
in the number of block-relay-only connections that can be made on the network.&lt;br /&gt;
&lt;br /&gt;
==Specification==&lt;br /&gt;
&lt;br /&gt;
# A new disabletx message is added, which is defined as an empty message with message type set to &amp;quot;disabletx&amp;quot;.&lt;br /&gt;
# The protocol version of nodes implementing this BIP must be set to 70017 or higher.&lt;br /&gt;
# If a node sets the transaction relay field in the version message to a peer to false, then the disabletx message MAY also be sent in response to a version message from that peer if the peer&amp;#039;s protocol version is &amp;gt;= 70017. If sent, the disabletx message MUST be sent prior to sending a verack.&lt;br /&gt;
# A node that has sent or received a disabletx message to/from a peer MUST NOT send any of these messages to the peer:&lt;br /&gt;
## inv messages for transactions&lt;br /&gt;
## getdata messages for transactions&lt;br /&gt;
## getdata messages for merkleblock (BIP 37)&lt;br /&gt;
## filteradd/filterload/filterclear (BIP 37)&lt;br /&gt;
## mempool (BIP 35)&lt;br /&gt;
## tx message&lt;br /&gt;
# It is RECOMMENDED that a node that has sent or received a disabletx message to/from a peer not send any of these messages to the peer:&lt;br /&gt;
## addr/getaddr&lt;br /&gt;
## addrv2 (BIP 155)&lt;br /&gt;
# The behavior regarding sending or processing other message types is not specified by this BIP.&lt;br /&gt;
# Nodes MAY decide to not remain connected to peers that send this message (for example, if trying to find a peer that will relay transactions).&lt;br /&gt;
&lt;br /&gt;
==Compatibility==&lt;br /&gt;
&lt;br /&gt;
Nodes with protocol version &amp;gt;= 70017 that do not implement this BIP, and nodes&lt;br /&gt;
with protocol version &amp;lt; 70017, will continue to remain compatible with&lt;br /&gt;
implementing software: transactions would not be relayed to peers sending the&lt;br /&gt;
disabletx message (provided that BIP 37 or BIP 60 has been implemented), and while&lt;br /&gt;
periodic address relay may still take place, software implementing this BIP&lt;br /&gt;
should not be disconnecting such peers solely for that reason.&lt;br /&gt;
&lt;br /&gt;
Disabling address relay is suggested but not required by this BIP, to allow for&lt;br /&gt;
future protocol extensions that might specify more carefully how address relay&lt;br /&gt;
is to be negotiated. This BIP&amp;#039;s recommendations for software to not relay&lt;br /&gt;
addresses is intended to be interpreted as guidance in the absence of any such&lt;br /&gt;
future protocol extension, to accommodate existing software behavior.&lt;br /&gt;
&lt;br /&gt;
Note that all messages specified in BIP 152, including blocktxn and&lt;br /&gt;
getblocktxn, are permitted between peers that have sent/received a disabletx&lt;br /&gt;
message, subject to the feature negotiation of BIP 152.&lt;br /&gt;
&lt;br /&gt;
This proposal is compatible with, but independent of, BIP 37.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
https://github.com/bitcoin/bitcoin/pull/20726&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
# Bitcoin Core has [https://github.com/bitcoin/bitcoin/pull/15759 implemented this functionality] since version 0.19.0.1, released in November 2019.&lt;br /&gt;
# For example, see https://www.cs.umd.edu/projects/coinscope/coinscope.pdf and https://arxiv.org/pdf/1812.00942.pdf.&lt;br /&gt;
&lt;br /&gt;
==Copyright==&lt;br /&gt;
&lt;br /&gt;
This BIP is licensed under the 2-clause BSD license.&lt;/div&gt;</summary>
		<author><name>934</name></author>
	</entry>
</feed>