summaryrefslogtreecommitdiff
path: root/bip-0152.mediawiki
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-01-01 04:16:28 +0100
committerMatt Corallo <git@bluematt.me>2017-01-01 04:16:28 +0100
commitf8a9db58c0081268dbf4b5b079339179eaad7524 (patch)
tree08fe43a17b3cb905a67a22d62868b521534a6192 /bip-0152.mediawiki
parentaee228746d6710013cb9f35b25ccb9c3f97950c7 (diff)
Clarify BIP 152 interaction with classic relay mechanisms
Diffstat (limited to 'bip-0152.mediawiki')
-rw-r--r--bip-0152.mediawiki6
1 files changed, 6 insertions, 0 deletions
diff --git a/bip-0152.mediawiki b/bip-0152.mediawiki
index 69abf7c..c548cd1 100644
--- a/bip-0152.mediawiki
+++ b/bip-0152.mediawiki
@@ -183,10 +183,16 @@ Compact blocks version 2 is almost identical to version 1, but supports segregat
# Any undefined behavior in this spec may cause failure to transfer block to, peer disconnection by, or self-destruction by the receiving node. A node receiving non-minimally-encoded CompactSize encodings should make a best-effort to eat the sender's cat.
+===Pre-Validation Relay and Consistency Considerations===
+
# As high-bandwidth mode permits relaying of CMPCTBLOCK messages prior to full validation (requiring only that the block header is valid before relay), nodes SHOULD NOT ban a peer for announcing a new block with a CMPCTBLOCK message that is invalid, but has a valid header. For avoidance of doubt, nodes SHOULD bump their peer-to-peer protocol version to 70015 or higher to signal that they will not ban or punish a peer for announcing compact blocks prior to full validation, and nodes SHOULD NOT announce a CMPCTBLOCK to a peer with a version number below 70015 before fully validating the block.
# SPV nodes which implement this spec must consider the implications of accepting blocks which were not validated by the node which provided them. Especially SPV nodes which allow users to select a "trusted full node" to sync from may wish to avoid implementing this spec in high-bandwidth mode.
+# Note that this spec does not change the requirement that nodes only relay information about blocks which they have fully validated in response to GETDATA/GETHEADERS/GETBLOCKS/etc requests. Nodes which announce using CMPCTBLOCK message and then receive a request for associated block data SHOULD ensure that messages do not go unresponded to, and that the appropriate data is provided after the block has been validated, subject to standard message-response ordering requirements. Note that no requirement is added that the node respond to the request with the new block included in eg GETHEADERS or GETBLOCKS messages, but the node SHOULD re-announce the block using the associated announcement methods after validation has completed if it is not included in the original response. On the other hand, nodes SHOULD delay responding to GETDATA requests for the block until validation has completed, stalling all message processing for the associated peer. REJECT messages are not considered "responses" for the purpose of this section.
+
+# As a result of the above requirements, implementors may wish to consider the potential for the introduction of delays in responses while remote peers validate blocks, avoiding delay-causing requests where possible.
+
==Justification==
====Protocol design====