diff --git a/_includes/devdoc/ref_p2p_networking.md b/_includes/devdoc/ref_p2p_networking.md index 074c3730..2aef4806 100644 --- a/_includes/devdoc/ref_p2p_networking.md +++ b/_includes/devdoc/ref_p2p_networking.md @@ -1253,22 +1253,22 @@ If a `version` message is accepted, the receiving node should send a before initializing its half of the connection by first sending a `version` message. -| Bytes | Name | Data Type | Description -|----------|-----------------------|------------------|-------------- -| 4 | version | int32_t | The highest protocol version understood by the transmitting node. See the [protocol version section][section protocol versions]. -| 8 | services | uint64_t | The services supported by the transmitting node encoded as a bitfield. See the list of service codes below. -| 8 | timestamp | int64_t | The current Unix epoch time according to the transmitting node's clock. Because nodes will reject blocks with timestamps more than two hours in the future, this field can help other nodes to determine that their clock is wrong. -| 8 | addr_recv services | uint64_t | *Added in protocol version 106.*

The services supported by the receiving node as perceived by the transmitting node. Same format as the 'services' field above. Bitcoin Core will attempt to provide accurate information. BitcoinJ will, by default, always send 0. -| 16 | addr_recv IP address | char | *Added in protocol version 106.*

The IPv6 address of the receiving node as perceived by the transmitting node in **big endian byte order**. IPv4 addresses can be provided as [IPv4-mapped IPv6 addresses][]. Bitcoin Core will attempt to provide accurate information. BitcoinJ will, by default, always return ::ffff:127.0.0.1 -| 2 | addr_recv port | uint16_t | *Added in protocol version 106.*

The port number of the receiving node as perceived by the transmitting node in **big endian byte order**. -| 8 | addr_trans services | uint64_t | The services supported by the transmitting node. Should be identical to the 'services' field above. -| 16 | addr_trans IP address | char | The IPv6 address of the transmitting node in **big endian byte order**. IPv4 addresses can be provided as [IPv4-mapped IPv6 addresses][]. Set to ::ffff:127.0.0.1 if unknown. -| 2 | addr_trans port | uint16_t | The port number of the transmitting node in **big endian byte order**. -| 8 | nonce | uint64_t | A random nonce which can help a node detect a connection to itself. If the nonce is 0, the nonce field is ignored. If the nonce is anything else, a node should terminate the connection on receipt of a `version` message with a nonce it previously sent. -| *Varies* | user_agent bytes | compactSize uint | Number of bytes in following user\_agent field. If 0x00, no user agent field is sent. -| *Varies* | user_agent | string | *Renamed in protocol version 60000.*

User agent as defined by BIP14. Previously called subVer. -| 4 | start_height | int32_t | The height of the transmitting node's best block chain or, in the case of an SPV client, best block header chain. -| 1 | relay | bool | *Added in protocol version 70001 as described by BIP37.*

Transaction relay flag. If 0x00, no `inv` messages or `tx` messages announcing new transactions should be sent to this client until it sends a `filterload` message or `filterclear` message. If 0x01, this node wants `inv` messages and `tx` messages announcing new transactions. +| Bytes | Name | Data Type | Required/Optional | Description +|----------|-----------------------|------------------|------------------------------------------|------------- +| 4 | version | int32_t | Required | The highest protocol version understood by the transmitting node. See the [protocol version section][section protocol versions]. +| 8 | services | uint64_t | Required | The services supported by the transmitting node encoded as a bitfield. See the list of service codes below. +| 8 | timestamp | int64_t | Required | The current Unix epoch time according to the transmitting node's clock. Because nodes will reject blocks with timestamps more than two hours in the future, this field can help other nodes to determine that their clock is wrong. +| 8 | addr_recv services | uint64_t | Required | *Added in protocol version 106.*

The services supported by the receiving node as perceived by the transmitting node. Same format as the 'services' field above. Bitcoin Core will attempt to provide accurate information. BitcoinJ will, by default, always send 0. +| 16 | addr_recv IP address | char | Required | *Added in protocol version 106.*

The IPv6 address of the receiving node as perceived by the transmitting node in **big endian byte order**. IPv4 addresses can be provided as [IPv4-mapped IPv6 addresses][]. Bitcoin Core will attempt to provide accurate information. BitcoinJ will, by default, always return ::ffff:127.0.0.1 +| 2 | addr_recv port | uint16_t | Required | *Added in protocol version 106.*

The port number of the receiving node as perceived by the transmitting node in **big endian byte order**. +| 8 | addr_trans services | uint64_t | Required | The services supported by the transmitting node. Should be identical to the 'services' field above. +| 16 | addr_trans IP address | char | Required | The IPv6 address of the transmitting node in **big endian byte order**. IPv4 addresses can be provided as [IPv4-mapped IPv6 addresses][]. Set to ::ffff:127.0.0.1 if unknown. +| 2 | addr_trans port | uint16_t | Required | The port number of the transmitting node in **big endian byte order**. +| 8 | nonce | uint64_t | Required | A random nonce which can help a node detect a connection to itself. If the nonce is 0, the nonce field is ignored. If the nonce is anything else, a node should terminate the connection on receipt of a `version` message with a nonce it previously sent. +| *Varies* | user_agent bytes | compactSize uint | Required | Number of bytes in following user\_agent field. If 0x00, no user agent field is sent. +| *Varies* | user_agent | string | Required if user_agent bytes > 0 | *Renamed in protocol version 60000.*

User agent as defined by BIP14. Previously called subVer. +| 4 | start_height | int32_t | Required | The height of the transmitting node's best block chain or, in the case of an SPV client, best block header chain. +| 1 | relay | bool | Optional | *Added in protocol version 70001 as described by BIP37.*

Transaction relay flag. If 0x00, no `inv` messages or `tx` messages announcing new transactions should be sent to this client until it sends a `filterload` message or `filterclear` message. If the relay field is not present or is set to 0x01, this node wants `inv` messages and `tx` messages announcing new transactions. The following service identifiers have been assigned.