On-chain data stores the network wide state, it must meet two fundamental requirements:
Verifiable: A ĐNet scheme is publicly verifiable since all dnet operations are signed by the creator and no duplications of virtual IP address. In contrast, the operational status of the OVF could not be publicly verifiable, thus not on-chain.
Auditable: A ĐNet scheme is auditable, since it generates a verifiable trace of operations that can be checked in the future to confirm dnet operations was indeed conduct by the dnet creator. In contrast, the highly dynamic operational status of the OVF could not be saved into the network, thus not on-chain.
Incentive Compatible: A ĐNet scheme is incentive-compatible, since miners are rewarded for successfully maintaining the integrity of the ĐNetDB, e.g. preventing duplication of virtual IP address, which is the fundamental requirement for networking and security, similar to prevent double-spending for the Bitcoin.
These properties dictate that the fast-changing dynamic operational data could not be reliably stored on-chain.
The Đ.NETWORK protocol has two types of block data stored in the chain. These data are created by consensus engine and immutable once created. The P2P Network maintains a consensus state when the data are logically Created, Read, Updated, Deleted (CRUD).
The on-chain data meets the three fundamental requirements: security, scalability, and decentralization, which is the trilemma for decentrlized system solved by blockchain technology.
Be more specific, the following data meets the decentralization property requirements and store on chain:
As important as the on-chain data, the following data are NOT on chain:
The mining process is used to secure the block generation, similar to Bitcoin. However, the mining algorithm is based on RandomX, instead of Bitcon's hash.
A DNetDB CRUD Ops Transaction is a Pseudo Token Transaction with a fixed 0.0001 Amount and self PubKey in the Output. However, since the virtual IP addresses are foreign oracles entered into the blockchain, additional block validation algorithms are needed for preventing the Virtual IP address duplication and depletion. A Pseudo Token Transaction allows using the mature blockchain technology, like the consensus algorithms, to prevent unauthorized operations on DNetDB's records.
The token sent to self address for the DNetDB operations are not consumed and remains to be Unspent Transaction Output (UTXO). However, the token must be reserved to keep the record valid and useable. Once the DNetDB operation UTXO spent, the record is regarded as deleted.
Like managing the wallt, a set of friendly CLI and RPC are avaliable to manage the dnet records. For example, the following command create a dnet:
dnetcoin-cli dnet_create 'hello_dnet0'