akwizgran created page: BSP

akwizgran
2015-03-23 22:38:36 +00:00
parent 30d3327827
commit 1eb7eaaccf

@@ -14,8 +14,8 @@ Each channel has a unique identifier hash_len bytes long. This identifier is sup
### Message format ### Message format
Each message consists of one or more blocks, each block_len bytes long, except the last block, which may be shorter. The blocks form the leaves of a binary hash tree. Each parent node consists of the concatenated hashes of its children. Each message consists of one or more blocks, each of which is block_len bytes long, except the last block, which may be shorter. The blocks form the leaves of a binary hash tree. Each parent node consists of the concatenated hashes of its children. If the number of blocks is not a power of two, some parent nodes will only have one child.
The message's unique identifier is calculated by hashing a message header followed by the root node of the hash tree. The message header consists of the channel identifier, a timestamp, the message type, and the depth of the tree. The message's unique identifier is calculated by hashing a message header concatenated with the root node of the hash tree. The message header consists of the channel identifier, a timestamp, the message type, and the depth of the tree excluding leaves.
The timestamp is a 64-bit big-endian integer representing the time at which the message was created, measured in seconds since the Unix epoch. The message type is a single byte that is supplied by the application and not interpreted by BSP. The depth of the tree is an 8-bit integer. The total length of the message header is hash_len + 10 bytes. The timestamp is a 64-bit big-endian integer representing the time at which the message was created, in seconds since the Unix epoch. The message type is a single byte that is supplied by the application and not interpreted by BSP. The depth of the tree is an 8-bit integer. The total length of the message header is hash_len + 10 bytes.