|
| 1 | +<pre> |
| 2 | + BIP: 159 |
| 3 | + Layer: Peer Services |
| 4 | + Title: NODE_NETWORK_LIMITED service bits |
| 5 | + Author: Jonas Schnelli < [email protected]> |
| 6 | + Comments-Summary: No comments yet. |
| 7 | + Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0159 |
| 8 | + Status: Draft |
| 9 | + Type: Standards Track |
| 10 | + Created: 2017-05-11 |
| 11 | + License: BSD-2-Clause |
| 12 | +</pre> |
| 13 | + |
| 14 | +== Abstract == |
| 15 | + |
| 16 | +Define service bits that allow pruned peers to signal their limited services |
| 17 | + |
| 18 | +==Motivation== |
| 19 | + |
| 20 | +Pruned peers can offer the same services as traditional peer except of serving all historical blocks. |
| 21 | +Bitcoin right now only offers the NODE_NETWORK service bit which indicates that a peer can serve |
| 22 | +all historical blocks. |
| 23 | +# Pruned peers can relay blocks, headers, transactions, addresses and can serve a limited number of historical blocks, thus they should have a way how to announce their service(s) |
| 24 | +# Peers no longer in initial block download should consider connection some of its outbound connections to pruned peers to allow other peers to bootstrap from non-pruned peers |
| 25 | +
|
| 26 | +== Specification == |
| 27 | + |
| 28 | +=== New service bits === |
| 29 | + |
| 30 | +This BIP proposes two new service bits |
| 31 | + |
| 32 | +{|class="wikitable" |
| 33 | +|- |
| 34 | +| NODE_NETWORK_LIMITED_LOW || If signaled, the peer <I>MUST</I> be capable of serving at least the last 288 blocks (~2 day / the current minimum limit for Bitcoin Core). |
| 35 | +|- |
| 36 | +| NODE_NETWORK_LIMITED_HIGH || If signaled, the peer <I>MUST</i> be capable of serving at least the last 1152 blocks (~8 days) |
| 37 | +|} |
| 38 | + |
| 39 | +The required behaviour when signaling both bits (<code>NODE_NETWORK_LIMITED_LOW & NODE_NETWORK_LIMITED_HIGH</code>) is currently undefined. |
| 40 | + |
| 41 | +A safety buffer of additional 144 blocks to handle chain reorganizations <I>SHOULD</I> be taken into account when connecting to a peer signaling <code>NODE_NETWORK_LIMITED_*</code> service bits. |
| 42 | + |
| 43 | +=== Address relay === |
| 44 | + |
| 45 | +Full nodes following this BIP <I>SHOULD</I> relay address/services (<code>addr</code> message) from peers they would connect to (including peers signaling <code>NODE_NETWORK_LIMITED_*</code>). |
| 46 | + |
| 47 | +=== Risks === |
| 48 | + |
| 49 | +Pruned peers following this BIP may consume more outbound bandwidth. |
| 50 | + |
| 51 | +Light clients (and such) who are not checking the <code>nServiceFlags</code> (service bits) from a relayed <code>addr</code>-message may unwillingly connect to a pruned peer and ask for (filtered) blocks at a depth below their pruned depth. Light clients should therefore check the service bits (and eventually connect to peers signaling <code>NODE_NETWORK_LIMITED_*</code> if they require [filtered] blocks around the tip). Light clients obtaining peer IPs though DNS seed should use the DNS filtering option. |
| 52 | + |
| 53 | +== Compatibility == |
| 54 | + |
| 55 | +This proposal is backward compatible. |
| 56 | + |
| 57 | +== Reference implementation == |
| 58 | + |
| 59 | +* https://github.com/bitcoin/bitcoin/pull/10387 |
| 60 | +
|
| 61 | + |
| 62 | +== References == |
| 63 | + |
| 64 | +== Copyright == |
| 65 | + |
| 66 | +This BIP is licensed under the 2-clause BSD license. |
0 commit comments