X[version/update/verack] consolidation/updates.

Also fixing some additional formatting/linking inconsistencies.
This commit is contained in:
Andrew Groot
2020-10-05 16:33:33 -04:00
committed by bitcoin
parent 47272590fd
commit afa6e4641e
9 changed files with 96 additions and 88 deletions
+3 -13
View File
@@ -1,4 +1,4 @@
# Handshake: Acknowledge ("verack")
# Handshake: Version Acknowledgement ("verack")
The `verack` message is sent in reply to a [version](/protocol/network/messages/version) message.
Sending a `verack` in response to a `version` message indicates to the remote that its connection and version has been accepted.
@@ -7,16 +7,6 @@ There is no version negotiation functionality between nodes; therefore if the no
This `verack` message consists of only a message header; the command string is "verack".
## Example Serialized Data
## Message Format
Net Magic<sup>[(BE)](/protocol/misc/endian/little)</sup>
`E3E1F3E8`
Command String ("verack")<sup>[(BE)](/protocol/misc/endian/big)</sup>
`76657261636B000000000000`
Payload Byte Count<sup>[(LE)](/protocol/misc/endian/little)</sup>
`00000000`
Payload Checksum<sup>[(LE)](/protocol/network/messages/message-checksum)</sup>
`5DF6E0E2`
This message has no contents.
+21
View File
@@ -0,0 +1,21 @@
<div class="cwikmeta">{
"title":"XUPDATE",
"related":["/protocol/network/messages","/protocol/network/messages/xversion"]
}</div>
# Handshake Extension: XVersion (“xversion”)
This message notifies a peer about changes to protocol parameters. It follows the same format as [xversion](/protocol/network/messages/xversion) protocol parameters. Implementations **SHOULD** only send changed parameters, rather than every parameter. Note that some XVERSION parameters are not changeable and therefore will be ignored if they appear in this message.
See the [xversion fields](/protocol/network/messages/xversion#xversion-fields) for detailed information about each parameter.
## Message Format
| Field | Length | Format | Description |
|--|--|--|--|
| number of values | variable | [variable length integer](/protocol/formats/variable-length-integer) | The number of values being sent. |
| values | variable | `number_of_values` * [xversion values](/protocol/network/messages/xversion#xversion-value-format) | The list of values to communicate. |
### Support
Supported by: **Bitcoin Unlimited**
+8
View File
@@ -0,0 +1,8 @@
# Handshake Extension: XVersion Acknowledgement (“xverack”)
The `xverack` message is sent in reply to an [xversion](/protocol/network/messages/xversion) message.
Sending an `xverack` in response to a `version` message indicates to the remote that its XVersion values have been accepted.
## Message Format
This message has no contents.
+45
View File
@@ -0,0 +1,45 @@
<div class="cwikmeta">{
"title":"XVERSION",
"related":["/protocol/network/messages","/protocol/network/messages/xupdate","/protocol/network/messages/xverack"]
}</div>
# Handshake Extension: XVersion (“xversion”)
This message notifies a peer about extended protocol parameters. This message MAY be sent during connection initialization. If sent, it MUST be sent immediately subsequent to the receipt of the [verack](/protocol/network/messages/verack.md) message, and before other non-initialization messages are sent.
## Message Format
| Field | Length | Format | Description |
|--|--|--|--|
| number of values | variable | [variable length integer](/protocol/formats/variable-length-integer) | The number of values being sent. |
| values | variable | `number_of_values` * [xversion values](#xversion-value-format) | The list of values to communicate. |
### XVersion Value Format
| Field | Length | Format | Description |
|--|--|--|--|
| field | variable | [variable length integer](/protocol/formats/variable-length-integer) | Indicates the field type of the value to follow. See [XVersion Fields](#xversion-fields). |
| size of value | variable | [variable length integer](/protocol/formats/variable-length-integer) | The size of the value to follow. |
| value | `size_of_value` bytes | bytes | The value for the preceding field type (`key`). The format of the value is defined by the `field`, but must be the specified number of bytes. |
#### XVersion Fields
XVersion field identifiers are 32 bits and split into a 16 bit prefix and 16 bit suffix. Each development group is assigned a prefix so that new identifiers do not accidentally conflict. Once a field identifier is created by group A, it should be used by other software both to receive that information from A and to present that information to other software. Therefore, group A **MUST NOT** change the syntax or semantics of a field once defined. To change a field, create a new identifier and deprecate (by no longer using the original identifier).
#### Prefix and Suffix Assignments
##### Prefix Assignments
| Group | Value |
|-------------------------|-------|
| Reserved for versioning | 0 |
| Bitcoin Cash Node | 1 |
| Bitcoin Unlimited | 2 |
See [xversionkeys.dat](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.7.0.0/src/xversionkeys.dat) for the most up-to-date field definitions defined by the BitcoinUnlimited full node.
Note that:
* *u64c* refers to a [variable length integer](/protocol/formats/variable-length-integer).
* *Changeable* fields MAY be changed during the course of a connection via the [xupdate](/protocol/network/messages/xupdate) message.
### Support
Supported by: **Bitcoin Unlimited**