diff --git a/protocol/misc/endian.md b/protocol/misc/endian.md new file mode 100644 index 0000000..d2f04c9 --- /dev/null +++ b/protocol/misc/endian.md @@ -0,0 +1,5 @@ +# Endianness + +## Little + +## Big diff --git a/protocol/network/messages/version.md b/protocol/network/messages/version.md index 22784a8..f2a74cc 100644 --- a/protocol/network/messages/version.md +++ b/protocol/network/messages/version.md @@ -8,14 +8,14 @@ The node connection is not considered established until both nodes have sent and | Field | Length | Format | Description | |--|--|--|--| -| version | 4 bytes | uint | The version number supported by the sending node. | -| services | 8 bytes | bitmask | An indication of the services supported by the sending node. See Services Bitmask section below. | -| timestamp | 8 bytes | unix timestamp | The time the message was generated on the sending node. | +| version | 4 bytes | unsigned integer (LE) | The version number supported by the sending node. | +| services | 8 bytes | bitmask[(LE)](/protocol/misc/endian#little) | An indication of the services supported by the sending node. See Services Bitmask section below. | +| timestamp | 8 bytes | unix timestamp (LE) | The time the message was generated on the sending node. | | remote address | 26 bytes | network address | The network address of the remote node.

_NOTE: this does not contain the timestamp normally included with network addresses._

| | local address | 26 bytes | network address | The network address of the sending node.

_NOTE: this does not contain the timestamp normally included with network addresses._

| -| nonce | 8 bytes | big-endian bytes | Random nonce for the connection, used to detect connections to self. | +| nonce | 8 bytes | bytes (LE) | Random nonce for the connection, used to detect connections to self. | | user agent | variable | user agent string | A user agent string identifying the node implementation. | -| block height | 4 bytes | uint | The height of the block with the highest height known to the sending node. | +| block height | 4 bytes | unsigned integer (LE) | The height of the block with the highest height known to the sending node. | | relay flag | 1 byte | boolean | Indicates whether the sending node would like all broadcasted transactions relayed to it. See [BIP-37](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki). | ## Services Bitmask