0159 - Final - Standards - May 11, 2017 (9 years, 2 months ago)
11
2017
BIP: 159
Layer: Peer Services
Title: NODE_NETWORK_LIMITED service bit
Author: Jonas Schnelli <[email protected]>
Comments-Summary: No comments yet.
Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP 159
Status: Final
Type: Standards Track
Created: 2017-05-11
License: BSD-2-Clause
Define a service bit that allows pruned peers to signal their limited services.
Pruned peers can offer the same services as traditional peers, except
that of serving all historical blocks. Bitcoin right now only offers the
NODE_NETWORK
service bit to indicate that a peer can serve
all historical blocks.
This BIP proposes a new service bit
|
NODE_NETWORK_LIMITED |
bit 10 (0x400) |
If signaled, the peer MUST be capable of serving at least the last 288 blocks (~2 days). |
Pruned/limited peers
MUST NOT
set a service bit that signals
serving the complete block chain (e.g.,
NODE_NETWORK
).
Rationale: nodes that signal serving the complete block chain may also
signal
NODE_NETWORK_LIMITED
.
A safety buffer of 144 blocks to handle chain reorganizations
SHOULD
be taken into account when connecting to a peer signaling
the
NODE_NETWORK_LIMITED
service bit.
Full nodes following this BIP
SHOULD
relay address/services
(
addr
message) from peers they would connect to (including
peers signaling
NODE_NETWORK_LIMITED
).
Peers may have different prune depths (depending on their configuration, disk space, etc.), which can result in a fingerprinting weakness (finding the prune depth through getdata requests).
Pruned nodes should therefore avoid leaking the prune depth and
SHOULD NOT
serve blocks deeper than the signaled
NODE_NETWORK_LIMITED
threshold of 288 blocks.
Pruned peers following this BIP may consume more outbound bandwidth.
Light clients (and such) who are not checking the
nServiceFlags
(service bits) from a relayed
addr
-message may unwittingly connect to a pruned peer and
ask for (filtered) blocks at a depth below the peer’s pruned depth.
Light clients should therefore check the service bits and either (1)
connect to peers signaling
NODE_NETWORK_LIMITED
that
preferably do not also signal serving the full block chain, if they only
require (filtered) blocks around the tip, or (2) connect to peers
signaling serving the full block chain if they need data older than the
latest 288 blocks. Light clients obtaining peer IPs through DNS seeds
should use the DNS filtering option.
This proposal is backward compatible.
This BIP is licensed under the 2-clause BSD license.