[WIP] clarify BIP152 sendcmpct message exchange#461
Closed
jnewbery wants to merge 1 commit intobitcoin:masterfrom
Closed
[WIP] clarify BIP152 sendcmpct message exchange#461jnewbery wants to merge 1 commit intobitcoin:masterfrom
jnewbery wants to merge 1 commit intobitcoin:masterfrom
Conversation
Contributor
Author
TheBlueMatt
reviewed
Oct 14, 2016
| # Upon receipt of a "sendcmpct" message with the first integer set to 0, the node SHOULD NOT announce new blocks by sending a cmpctblock message, but SHOULD announce new blocks by sending invs or headers, as defined by BIP130. | ||
| # Upon receipt of a "sendcmpct" message with the second integer set to something other than 1, nodes MUST treat the peer as if they had not received the message (as it indicates the peer will provide an unexpected encoding in cmpctblock, and/or other, messages). This allows future versions to send duplicate sendcmpct messages with different versions as a part of a version handshake for future versions. | ||
| # The second integer SHALL be interpreted as a little-endian version number. Nodes sending a sendcmpct message MUST currently set this value to 1. Upon receipt of a "sendcmpct" message with the second integer set to something other than 1, nodes MUST treat the peer as if they had not received the message (as it indicates the peer will provide an unexpected encoding in cmpctblock, and/or other, messages). This allows future versions to send duplicate sendcmpct messages with different versions as a part of a version handshake for future versions. | ||
| # Upon receipt of a "sendcmpct" message with the first integer set to 1, if the node wishes to use high-bandwidth compact block mode, it MUST respond with a "sendcmpct" message with the first integer set to 1. Upon receipt of a "sendcmpct" message with the first integer set to 0, if the node wishes to use low-bandwidth compact block mode, it MUST respond with a "sendcmpct" message with the first integer set to 0. |
Contributor
There was a problem hiding this comment.
This seems to imply, to me, that a node should wait for a sendcmpct message before sending its announce, which it should not.
TheBlueMatt
reviewed
Oct 14, 2016
| # Upon receipt of a "sendcmpct" message with the second integer set to something other than 1, nodes MUST treat the peer as if they had not received the message (as it indicates the peer will provide an unexpected encoding in cmpctblock, and/or other, messages). This allows future versions to send duplicate sendcmpct messages with different versions as a part of a version handshake for future versions. | ||
| # The second integer SHALL be interpreted as a little-endian version number. Nodes sending a sendcmpct message MUST currently set this value to 1. Upon receipt of a "sendcmpct" message with the second integer set to something other than 1, nodes MUST treat the peer as if they had not received the message (as it indicates the peer will provide an unexpected encoding in cmpctblock, and/or other, messages). This allows future versions to send duplicate sendcmpct messages with different versions as a part of a version handshake for future versions. | ||
| # Upon receipt of a "sendcmpct" message with the first integer set to 1, if the node wishes to use high-bandwidth compact block mode, it MUST respond with a "sendcmpct" message with the first integer set to 1. Upon receipt of a "sendcmpct" message with the first integer set to 0, if the node wishes to use low-bandwidth compact block mode, it MUST respond with a "sendcmpct" message with the first integer set to 0. | ||
| # If the node has sent *and* received "sendcmpct" with the first integer set to 1, the node SHOULD announce new blocks by sending a cmpctblock message. |
Contributor
There was a problem hiding this comment.
This seems to imply, to me, that you have to send a sendcmpct message with a 1 in order to announce using cmpctblocks, which isnt true, you only need to receive one.
Member
|
What's the status here? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@TheBlueMatt - as discussed, this PR slightly clarifies the BIP 152 text: