<oembed><type>rich</type><version>1.0</version><author_name>npub1e46n428mcyfwznl7nlsf6d3s7rhlwm9x3cmkuqzt3emmdpadmkaqqjxmcu</author_name><author_url>https://nostr.ae/npub1e46n428mcyfwznl7nlsf6d3s7rhlwm9x3cmkuqzt3emmdpadmkaqqjxmcu</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-08-21&#xA;📝 Original message:On 08/21/15 22:06, Peter Todd wrote:&#xA;&gt; On Fri, Aug 21, 2015 at 05:55:58PM +0000, Matt Corallo wrote:&#xA;&gt;&gt; Revised copy follows. re: mentioning the HTTP seeding stuff, I&#39;m not&#xA;&gt;&gt; sure we want to encourage more people aside from bitcoinj to use&#xA;&gt;&gt; that...I thought about adding a DNS seed section to this bip, but&#xA;&gt;&gt; decided against it...still, I think we should add the option to select&#xA;&gt;&gt; service bits to DNS seeds ASAP.&#xA;&gt; &#xA;&gt; Well, in general relying on seeds every time you start your node is a&#xA;&gt; really bad idea; doing so much be carefully weighed against the&#xA;&gt; downsides and should be used only as a last resort. Nodes should be&#xA;&gt; doing caching and proper gossip protocol participation whenever&#xA;&gt; possible. (note how bitcoinj nodes *do* rely on centralized servers,&#xA;&gt; implemented with an unauthenticated, unencrypted, protocol - the worst&#xA;&gt; of all possible solutions with many possible MITM vectors and privacy&#xA;&gt; security holes)&#xA;&gt;&#xA;&gt; To that end, I&#39;d be inclined to leave the DNS seed protocol as it is and&#xA;&gt; let others solve the centralized server use-case, for which Cartographer&#xA;&gt; isn&#39;t all that bad of a load balancing mechanism. Also as gmaxwell noted&#xA;&gt; on IRC, adding flag bits does have privacy implications.&#xA;&#xA;Had a discussion on IRC and with Pieter, and I kinda agree that the more&#xA;optimal way is for DNS seeds to, instead of returning NODE_NETWORK&#xA;nodes, return any node which responds to getaddr, allowing clients to&#xA;connect to a few DNS seeds by name, do a getaddr, then disconnect (like&#xA;Bitcoin Core does now if you&#39;re using Tor). They can then select the&#xA;peers they want based on nServices.&#xA;&#xA;&gt;&gt; Re: need to &#34;shard&#34; the blockchain: not sure what you&#39;re referring to&#xA;&gt;&gt; here. The bloom filter stuff requires you to download the chain&#xA;&gt;&gt; in-order, sure, but you have to do that for headers anyway, and&#xA;&gt;&gt; hopefully your total data isnt too much more than headers alone.&#xA;&gt; &#xA;&gt; Any protocol change that would split blocks themselves into multiples.&#xA;&gt; Not an easy problem to solve, but given the inherent O(n^2) scaling of&#xA;&gt; global consensus blockchains, it&#39;s the only kind of solution that could&#xA;&gt; in the future make the blockchain itself have reasonable scalability.&#xA;&#xA;Meh, whatever, justification is already provided well enough without&#xA;having to go into &#34;but if we did this long into the future&#34;  arguments.&#xA;&#xA;&gt;&gt; Anyone have the best reference for the DoS issues?&#xA;&gt; &#xA;&gt; Well actually, we can reference the DoS attacks that Bitcoin XT nodes&#xA;&gt; are undergoing right now - part of the attack is repeated Bloom filter&#xA;&gt; requests to soak up disk IO bandwidth. I&#39;ve CC&#39;d Gavin and Mike - as far&#xA;&gt; as I know they haven&#39;t published details of those attacks - a write-up&#xA;&gt; would be very helpful.&#xA;&gt; &#xA;&gt; While so far those are being directed only at XT nodes, obviously this&#xA;&gt; is a potential issue for Core nodes as well. Like I mentioned last time&#xA;&gt; around, it&#39;s critical that miners aren&#39;t affected by these attacks -&#xA;&gt; nodes simply serving SPV wallet clients are much less latency sensitive,&#xA;&gt; so a good DoS attack mitigation strategy would be to have the two&#xA;&gt; classes of nodes out there &#34;in the wild&#34;&#xA;&#xA;Ehh, I was going more for the oldest mention.&#xA;&#xA;&gt;&gt; BIP: ?&#xA;&gt;&gt; Title: NODE_BLOOM service bit&#xA;&gt;&gt; Author: Matt Corallo &lt;bip at bluematt.me&gt;, Peter Todd &lt;pete at petertodd.org&gt;&#xA;&gt;&gt; Type: Standards Track (draft)&#xA;&gt;&gt; Created: 20-08-2015&#xA;&gt;&gt;&#xA;&gt;&gt; Abstract&#xA;&gt;&gt; ========&#xA;&gt;&gt;&#xA;&gt;&gt; This BIP extends BIP 37, Connection Bloom filtering, by defining a&#xA;&gt;&gt; service bit to allow peers to advertise that they support bloom filters&#xA;&gt;&gt; explicitly. It also bumps the protocol version to allow peers to&#xA;&gt;&gt; identify old nodes which allow bloom filtering of the connection despite&#xA;&gt;&gt; lacking the new service bit.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Motivation&#xA;&gt;&gt; ==========&#xA;&gt;&gt;&#xA;&gt;&gt; BIP 37 did not specify a service bit for the bloom filter service, thus&#xA;&gt;&gt; implicitly assuming that all nodes that serve peers data support it.&#xA;&gt;&gt; However, the connection filtering algorithm proposed in BIP 37, and&#xA;&gt;&gt; implemented in several clients today, has been shown to provide little&#xA;&gt;&gt; to no privacy[1], as well as being a large DoS risk on some nodes[2].&#xA;&gt;&gt; Thus, allowing node operators to disable connection bloom filtering is a&#xA;&gt;&gt; much-needed feature.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Specification&#xA;&gt;&gt; =============&#xA;&gt;&gt;&#xA;&gt;&gt; The following protocol bit is added:&#xA;&gt;&gt;&#xA;&gt;&gt;     NODE_BLOOM = (1 &lt;&lt; 2)&#xA;&gt;&gt;&#xA;&gt;&gt; Nodes which support bloom filters should set that protocol bit.&#xA;&gt;&gt; Otherwise it should remain unset. In addition the protocol version is&#xA;&gt;&gt; increased from 70002 to 70011 in the reference implementation. It is&#xA;&gt;&gt; often the case that nodes which have a protocol version smaller than&#xA;&gt;&gt; 70011, but larger than 70000 support bloom filtered connections without&#xA;&gt;&gt; the NODE_BLOOM bit set, however clients which require bloom filtered&#xA;&gt;&gt; connections should avoid making this assumption.&#xA;&gt;&gt;&#xA;&gt;&gt; NODE_BLOOM is distinct from NODE_NETWORK, and it is legal to advertise&#xA;&gt;&gt; NODE_BLOOM but not NODE_NETWORK (eg for nodes running in pruned mode&#xA;&gt;&gt; which, nonetheless, provide filtered access to the data which they do have).&#xA;&gt;&gt;&#xA;&gt;&gt; If a node does not support bloom filters but receives a &#34;filterload&#34;,&#xA;&gt;&gt; &#34;filteradd&#34;, or &#34;filterclear&#34; message from a peer the node should&#xA;&gt;&gt; disconnect that peer immediately. For backwards compatibility, in&#xA;&gt;&gt; initial implementations, nodes may choose to only disconnect nodes which&#xA;&gt;&gt; have the new protocol version set and attempt to send a filter command.&#xA;&gt;&gt;&#xA;&gt;&gt; While outside the scope of this BIP it is suggested that DNS seeds and&#xA;&gt;&gt; other peer discovery mechanisms support the ability to specify the&#xA;&gt;&gt; services required; current implementations simply check only that&#xA;&gt;&gt; NODE_NETWORK is set.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Design rational&#xA;&gt;&gt; ===============&#xA;&gt;&gt;&#xA;&gt;&gt; A service bit was chosen as applying a bloom filter is a service.&#xA;&gt;&gt;&#xA;&gt;&gt; The increase in protocol version is for backwards compatibility. In&#xA;&gt;&gt; initial implementations, old nodes which are not yet aware of NODE_BLOOM&#xA;&gt;&gt; and use a protocol version &lt; 70011 may still send filter* messages to a&#xA;&gt;&gt; node without NODE_BLOOM. This feature may be removed after there are&#xA;&gt;&gt; sufficient NODE_BLOOM nodes available and SPV clients have upgraded,&#xA;&gt;&gt; allowing node operators to fully close the bloom-related DoS vectors.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Reference Implementation&#xA;&gt;&gt; ========================&#xA;&gt;&gt;&#xA;&gt;&gt; https://github.com/bitcoin/bitcoin/pull/6579&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Copyright&#xA;&gt;&gt; =========&#xA;&gt;&gt;&#xA;&gt;&gt; This document is placed in the public domain.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; References&#xA;&gt;&gt; ==========&#xA;&gt;&gt;&#xA;&gt;&gt; [1] http://eprint.iacr.org/2014/763&#xA;&gt;&gt; [2] ???? is one example where the issues were found, though others&#xA;&gt;&gt; independently discovered issues as well. Sample DoS exploit code&#xA;&gt;&gt; available at https://github.com/petertodd/bloom-io-attack.&#xA;&gt;</html></oembed>