summaryrefslogtreecommitdiff
path: root/bip-0152.mediawiki
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-12-15 04:11:06 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2016-12-15 04:21:00 +0000
commit3a28003993720d2e882f6513ec499f25cc163afc (patch)
treeb14d6108feae9d6bd1f1e25e83e66ead23539130 /bip-0152.mediawiki
parent42770fb6194f0e55a7e7139cf7fe97f5c8f84f4e (diff)
parentfd5a85d6b8b6e12cb9c26b5e0dd3309e81fc4554 (diff)
downloadbips-3a28003993720d2e882f6513ec499f25cc163afc.tar.xz
Implement BIP 2 with merging master changes
Diffstat (limited to 'bip-0152.mediawiki')
-rw-r--r--bip-0152.mediawiki8
1 files changed, 5 insertions, 3 deletions
diff --git a/bip-0152.mediawiki b/bip-0152.mediawiki
index 2211409..e717740 100644
--- a/bip-0152.mediawiki
+++ b/bip-0152.mediawiki
@@ -124,18 +124,18 @@ A new inv type (MSG_CMPCT_BLOCK == 4) and several new protocol messages are adde
# MSG_CMPCT_BLOCK inv objects MUST NOT appear anywhere except for in getdata messages.
====cmpctblock====
-# The cmpctblock message is defined as as a message containing a serialized HeaderAndShortIDs message and pchCommand == "cmpctblock".
+# The cmpctblock message is defined as a message containing a serialized HeaderAndShortIDs message and pchCommand == "cmpctblock".
# Upon receipt of a cmpctblock message after sending a sendcmpct message, nodes SHOULD calculate the short transaction ID for each unconfirmed transaction they have available (ie in their mempool) and compare each to each short transaction ID in the cmpctblock message.
# After finding already-available transactions, nodes which do not have all transactions available to reconstruct the full block SHOULD request the missing transactions using a getblocktxn message.
# A node MUST NOT send a cmpctblock message unless they are able to respond to a getblocktxn message which requests every transaction in the block.
# A node MUST NOT send a cmpctblock message without having validated that the header properly commits to each transaction in the block, and properly builds on top of the existing chain with a valid proof-of-work. A node MAY send a cmpctblock before validating that each transaction in the block validly spends existing UTXO set entries.
====getblocktxn====
-# The getblocktxn message is defined as as a message containing a serialized BlockTransactionsRequest message and pchCommand == "getblocktxn".
+# The getblocktxn message is defined as a message containing a serialized BlockTransactionsRequest message and pchCommand == "getblocktxn".
# Upon receipt of a properly-formatted getblocktxn message, nodes which recently provided the sender of such a message a cmpctblock for the block hash identified in this message MUST respond with either an appropriate blocktxn message, or a full block message. A blocktxn response MUST contain exactly and only each transaction which is present in the appropriate block at the index specified in the getblocktxn indexes list, in the order requested.
====blocktxn====
-# The blocktxn message is defined as as a message containing a serialized BlockTransactions message and pchCommand == "blocktxn".
+# The blocktxn message is defined as a message containing a serialized BlockTransactions message and pchCommand == "blocktxn".
# Upon receipt of a properly-formatted requested blocktxn message, nodes SHOULD attempt to reconstruct the full block by:
## Taking the prefilledtxn transactions from the original cmpctblock and placing them in the marked positions.
## For each short transaction ID from the original cmpctblock, in order, find the corresponding transaction either from the blocktxn message or from other sources and place it in the first available position in the block.
@@ -189,6 +189,8 @@ Compact blocks version 2 is almost identical to version 1, but supports segregat
# 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.
+
==Justification==
====Protocol design====