Hash invariant Binary Object Notation

In the Tagion network, it is important to be able to store and exchange data in a consistent manner. This means if the same collection of data is generated by two or more nodes independent, it is important that the binary data is the same. This enables each node in the system to update/store the data in the distributed database independently because the cryptographical hash value of the data is the same for the same data collection.

It also enables nodes to verify that they independently have created the same data collection without sharing the hash-value of the data collection but only sharing the digital signature of hash-value.

This prevents an evil node from being lazy and just coping the result from and other node and thereby weaken the network consensus.

This data format is called Hash invariant Binary Object notation or HiBON for short. The HiBON format is inspired by the BSON format used in the MongoDB project, but HiBON is not compatible with BSON it is just built on the same concept.

A data-element is stored with a key and a value, similar to the BSON or JSON format as in BSON a binary datatype is also specified for each data element. Each data-element has a number which indicated the number of bytes in the field.

image
The type is one-byte value which set the data-type.

A tool is provided in the Tagion tools called hibonutil, this to can convert from back and forth between JSON and HiBON.


Hibonutil can be download from Tagion SDK Repository.

More detailed description can also be found in the Tagion Technical Paper.

7 Likes