The Dawn Nexus Archives Protocol
All data is stored on disk and sent in Google's Protocol Buffers format to optimise size and storage/network performance, and used with gRPC for integration into applications.
Database
The Dawn Nexus operates as gRPC linked distributed nodes with one server per database. The database is a registry containing a potentially arbitrarily growing number of applications that operate with the protocol.
- Dawn Registry
- Dawn Forum
- ...
This is just an identifier type for messages, which must target a type of database. The first two are reserved for Nexus. New applications can simply generate a large (32 bit) random number which is certain not to have a collision.
Message
All messages are first wrapped in this container.
Type
Broadcast
This is the message dispatched by a client to all the Validators in a Validator set for a particular location or application to write data to the database.Crosscheck
This is the echoing of the received message from the Client out to all other validators in the validator set. All validators examine each other's messages to ensure they are identical and correct according to the encapsulated message protocol.Vote
Validators vote to approve or disapprove each other's messages, the votes are distributed amongst them and a consensus is reached on the result, and if approved, the message gets into the log and the database changed accordingly.Digest
Every 64 write operations, the network triggers a rebroadcast of the log of the last 64 write operations. This ensures that if anyone has got it muddled the first time, within a minute or less, they will have the correct data.
Structure
Author
Unique identifier as found in the RegistryTime
Timestamp of author with UUIDDatabaseType
Which database typeMsgType
Broadcast/Crosscheck/Voting/DigestPayload
Message contents (one from below)Broadcast
Protocol message specific to databaseCrosscheck
Full received messageVote
Peer assessment of message gossipValidator
Account UUID of validatorHash
Hash of validator's messageApprove
(1 or anything else for disapprove)
Digest
A list of the last 64 transactions as stored in a node's log
Hash
Hash of all foregoing dataSignature
Signature from the Author's private keyIntermediaries
List of all the account ID's acting as Validators for this transactionMsgHash
Hash of all foregoing dataMsgSignature
Signature from the Author's private key
Address
Type
IPV4
IPV6
TOR
I2P
ZEROTIER
Structure
AddressType
Which type of network address (tor, ipv4, zerotier, i2p, ipv6)Address
The string recognised by the protocol
Node
Role
There is three types of Archives nodes:
Validator
These are the nodes that process transactions and generate the stream of database updates. This is a list that is gazetted whenever it changes, with the type of data the node validates.Replicator
These nodes are just subscribing to the update stream and are being applied to some prescribed purpose by its operators, such as running some service tied to the database. These nodes also advertise their services on a shared list.Client
The client just subscribes to, or polls for some of the database updates that it is interested in, and caches data generated by queries. A user will generally want to control their own replicator as well or trust those they use. The client also sends out new transaction broadcasts to the Validators. They are not listed.
Structure
Role
Validator/ReplicatorAddresses
List of addresses the node can be reached atExpiry
Date after which this advertisement will become stale