From 261bf25afc55625a8f59c8332d2e9086b583e9ad Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 24 Aug 2015 11:04:07 -0700 Subject: [PATCH 1/6] Add last-fully-posted version of BIP 111 --- bip-0111.mediawiki | 91 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 bip-0111.mediawiki diff --git a/bip-0111.mediawiki b/bip-0111.mediawiki new file mode 100644 index 00000000..e75c9be5 --- /dev/null +++ b/bip-0111.mediawiki @@ -0,0 +1,91 @@ +BIP: 111 +Title: NODE_BLOOM service bit +Author: Matt Corallo , Peter Todd +Type: Standards Track (draft) +Created: 20-08-2015 + +Abstract +======== + +This BIP extends BIP 37, Connection Bloom filtering, by defining a +service bit to allow peers to advertise that they support bloom filters +explicitly. It also bumps the protocol version to allow peers to +identify old nodes which allow bloom filtering of the connection despite +lacking the new service bit. + + +Motivation +========== + +BIP 37 did not specify a service bit for the bloom filter service, thus +implicitly assuming that all nodes that serve peers data support it. +However, the connection filtering algorithm proposed in BIP 37, and +implemented in several clients today, has been shown to provide little +to no privacy[1], as well as being a large DoS risk on some nodes[2]. +Thus, allowing node operators to disable connection bloom filtering is a +much-needed feature. + + +Specification +============= + +The following protocol bit is added: + + NODE_BLOOM = (1 << 2) + +Nodes which support bloom filters should set that protocol bit. +Otherwise it should remain unset. In addition the protocol version is +increased from 70002 to 70011 in the reference implementation. It is +often the case that nodes which have a protocol version smaller than +70011, but larger than 70000 support bloom filtered connections without +the NODE_BLOOM bit set, however clients which require bloom filtered +connections should avoid making this assumption. + +NODE_BLOOM is distinct from NODE_NETWORK, and it is legal to advertise +NODE_BLOOM but not NODE_NETWORK (eg for nodes running in pruned mode +which, nonetheless, provide filtered access to the data which they do have). + +If a node does not support bloom filters but receives a "filterload", +"filteradd", or "filterclear" message from a peer the node should +disconnect that peer immediately. For backwards compatibility, in +initial implementations, nodes may choose to only disconnect nodes which +have the new protocol version set and attempt to send a filter command. + +While outside the scope of this BIP it is suggested that DNS seeds and +other peer discovery mechanisms support the ability to specify the +services required; current implementations simply check only that +NODE_NETWORK is set. + + +Design rational +=============== + +A service bit was chosen as applying a bloom filter is a service. + +The increase in protocol version is for backwards compatibility. In +initial implementations, old nodes which are not yet aware of NODE_BLOOM +and use a protocol version < 70011 may still send filter* messages to a +node without NODE_BLOOM. This feature may be removed after there are +sufficient NODE_BLOOM nodes available and SPV clients have upgraded, +allowing node operators to fully close the bloom-related DoS vectors. + + +Reference Implementation +======================== + +https://github.com/bitcoin/bitcoin/pull/6579 + + +Copyright +========= + +This document is placed in the public domain. + + +References +========== + +[1] http://eprint.iacr.org/2014/763 +[2] ???? is one example where the issues were found, though others +independently discovered issues as well. Sample DoS exploit code +available at https://github.com/petertodd/bloom-io-attack. From 36a1741e7fd7d82a01062fa8a440f4f14b02e7e2 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 24 Aug 2015 11:05:26 -0700 Subject: [PATCH 2/6] Update reference and text of 111 after ML discussion --- bip-0111.mediawiki | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bip-0111.mediawiki b/bip-0111.mediawiki index e75c9be5..52bec365 100644 --- a/bip-0111.mediawiki +++ b/bip-0111.mediawiki @@ -42,8 +42,8 @@ the NODE_BLOOM bit set, however clients which require bloom filtered connections should avoid making this assumption. NODE_BLOOM is distinct from NODE_NETWORK, and it is legal to advertise -NODE_BLOOM but not NODE_NETWORK (eg for nodes running in pruned mode -which, nonetheless, provide filtered access to the data which they do have). +NODE_BLOOM but not NODE_NETWORK (though there is little reason to do +so now, some proposals may make this more useful in the future) If a node does not support bloom filters but receives a "filterload", "filteradd", or "filterclear" message from a peer the node should @@ -86,6 +86,7 @@ References ========== [1] http://eprint.iacr.org/2014/763 -[2] ???? is one example where the issues were found, though others +[2] http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2013-July/003044.html +is one example where the issues were found, though others independently discovered issues as well. Sample DoS exploit code available at https://github.com/petertodd/bloom-io-attack. From 8dd40f15ba2197e90b4fca81790f9ff751404d58 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 24 Aug 2015 11:25:03 -0700 Subject: [PATCH 3/6] Add BIP 111 to index --- README.mediawiki | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.mediawiki b/README.mediawiki index 041a4f15..71eabc66 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -289,6 +289,12 @@ Those proposing changes should consider that ultimately consent may rest with th | Gavin Andresen | Standard | Draft +|- +| [[bip-0111.mediawiki|101]] +| NODE_BLOOM service bit +| Matt Corallo and Peter Todd +| Standard +| Draft |} From b1d5a37f589c6bbb39701481cb00fa949148237b Mon Sep 17 00:00:00 2001 From: Andy Chase Date: Wed, 26 Aug 2015 00:24:11 -0700 Subject: [PATCH 4/6] Fix index number on BIP 111 --- README.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.mediawiki b/README.mediawiki index 71eabc66..1f299587 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -290,7 +290,7 @@ Those proposing changes should consider that ultimately consent may rest with th | Standard | Draft |- -| [[bip-0111.mediawiki|101]] +| [[bip-0111.mediawiki|111]] | NODE_BLOOM service bit | Matt Corallo and Peter Todd | Standard From 94db3f90c39b38ff04adb9ca43ff577340283eef Mon Sep 17 00:00:00 2001 From: Andy Chase Date: Wed, 26 Aug 2015 01:15:19 -0700 Subject: [PATCH 5/6] bip-111 convert formatting to mediawiki --- bip-0111.mediawiki | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/bip-0111.mediawiki b/bip-0111.mediawiki index 52bec365..af9e3941 100644 --- a/bip-0111.mediawiki +++ b/bip-0111.mediawiki @@ -1,11 +1,13 @@ -BIP: 111 -Title: NODE_BLOOM service bit -Author: Matt Corallo , Peter Todd -Type: Standards Track (draft) -Created: 20-08-2015 +
+  BIP: 111
+  Title: NODE_BLOOM service bit
+  Author: Matt Corallo , Peter Todd 
+  Status: Draft
+  Type: Standards Track
+  Created: 2015-08-20
+
-Abstract -======== +== Abstract == This BIP extends BIP 37, Connection Bloom filtering, by defining a service bit to allow peers to advertise that they support bloom filters @@ -14,24 +16,24 @@ identify old nodes which allow bloom filtering of the connection despite lacking the new service bit. -Motivation -========== +== Motivation == BIP 37 did not specify a service bit for the bloom filter service, thus implicitly assuming that all nodes that serve peers data support it. However, the connection filtering algorithm proposed in BIP 37, and implemented in several clients today, has been shown to provide little -to no privacy[1], as well as being a large DoS risk on some nodes[2]. +to no privacyhttp://eprint.iacr.org/2014/763, as well as being a large DoS risk on some nodes[http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2013-July/003044.html] is one example where the issues were found, though others independently discovered issues as well. Sample DoS exploit code available at https://github.com/petertodd/bloom-io-attack.. Thus, allowing node operators to disable connection bloom filtering is a much-needed feature. -Specification -============= +== Specification == The following protocol bit is added: +
     NODE_BLOOM = (1 << 2)
+
Nodes which support bloom filters should set that protocol bit. Otherwise it should remain unset. In addition the protocol version is @@ -57,8 +59,7 @@ services required; current implementations simply check only that NODE_NETWORK is set. -Design rational -=============== +== Design rational == A service bit was chosen as applying a bloom filter is a service. @@ -70,23 +71,15 @@ sufficient NODE_BLOOM nodes available and SPV clients have upgraded, allowing node operators to fully close the bloom-related DoS vectors. -Reference Implementation -======================== +== Reference Implementation == https://github.com/bitcoin/bitcoin/pull/6579 -Copyright -========= +== Copyright == This document is placed in the public domain. -References -========== - -[1] http://eprint.iacr.org/2014/763 -[2] http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2013-July/003044.html -is one example where the issues were found, though others -independently discovered issues as well. Sample DoS exploit code -available at https://github.com/petertodd/bloom-io-attack. +== References == + From a110a5692fa25724f2ec6beffae5905a2c553564 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 1 Sep 2015 14:30:44 -0700 Subject: [PATCH 6/6] Remove confusing * --- bip-0111.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bip-0111.mediawiki b/bip-0111.mediawiki index af9e3941..d3bd630b 100644 --- a/bip-0111.mediawiki +++ b/bip-0111.mediawiki @@ -65,7 +65,7 @@ A service bit was chosen as applying a bloom filter is a service. The increase in protocol version is for backwards compatibility. In initial implementations, old nodes which are not yet aware of NODE_BLOOM -and use a protocol version < 70011 may still send filter* messages to a +and use a protocol version < 70011 may still send filter messages to a node without NODE_BLOOM. This feature may be removed after there are sufficient NODE_BLOOM nodes available and SPV clients have upgraded, allowing node operators to fully close the bloom-related DoS vectors.