The Free TON blockchain Whitepaper, published on August 11, 2021, by the CTO of TON Labs, Mitja Goroshevsky, contains a number of new technological solutions that should be considered more carefully. For example, the model of distributed data storage in the Free TON proposed by the author.
Either Fast Or Reliable
The problem of distributed storage has been well known for a long time, and it usually comes down to the need to choose between two algorithms.
The first option is that we store information on every node of our blockchain. It’s secure but difficult to scale, and it’s also very expensive to store large amounts of data.
The second option is to optimize the number of nodes, finding a balance between security and reducing the number of storage nodes. When there is a smaller number of nodes, the possibility of blocking information on corrupt or blocked nodes increases proportionally.
In addition, certain economic conditions push for an innovative solution in the field of distributed storage. So, in the modern IT industry, the cost of storing data in a centralized data center is steadily decreasing, while the cost of transferring information over the network is increasing for validators.
Ultimately the cheapest way to store a file would be to contract a particular validator and store it on their hard drive once.
Suggestion from Mitja Goroshevsky
Of course, this is also the least secure option. Decentralized storage should ensure that the user can access the data at any time, as well as guarantee security and resistance to unauthorized access and censorship. For this purpose, a special protocol is suggested, which will ensure that the data:
- is stored continuously for an agreed upon period of time;
- is protected from attacks on its integrity
- is private and censorship-resistant;
- is verifiable.
Let’s say there is a specific chain of validators with their nodes that are not rotating. When their work is done from the perspective of data storage, they will be a separate shard or “a Drive” (more precisely, “DeDrive”). Each validator wishing to join the DriveChain will have to state the disk space they are willing to contribute for data storage.
The D’Elector contract of the DriveChain will “mount” the validator into a particular shard, after which the new node will be synchronized with the network. Work in DriveChain will follow the same algorithms as in any workchain: validators will periodically create blocks, blocks will be added to the global state according to a multithreaded approach. The blockchain data within DeDrive will be the same across all validators, but the storage data, which is located on the validator’s hard drives, will be sharded.
Files will be written to the validator’s hard drives by chunks of some length defined in the DriveChain configuration. The consensus mechanism between validators will involve constructing an extended Merkle Grid, allowing them to verify hashes of other validators’ data fragments on their own data before signing the block. After signing this information will be transferred to MasterChain.
Soft Majority Consensus In Action
To ensure safety, control the validators honesty, there is a monitoring system with the participation of verifiers and with the use of slashing. The set of verifiers will be random, their task is to check the blocks in DriveChain for compliance with the records in MasterChain. If an inaccuracy is detected, the SMFT consensus algorithm, which has not yet been implemented but is described, will be run to verify the data.
If the validation shows problems with less than 10% of the records on the validator nodes, the penalties will cut its blocked share in half, and if more than 10%, it will cut it completely. All of this fined amount will be transferred to the verifiers who found the errors.
As a result of building such a storage architecture, Free TON will be able to provide the consumer with a distributed data center in which the user can store any data in an encrypted format that no validator can decrypt and read. Relayers, organized like a torrent network, will provide data to the user on request.
IceChain — Put It In A Drawer
In addition to DriveChain, the Free TON Whitepaper by Mitya Goroshevsky also contains a conceptual description of IceChain cold storage. Its work will be organized on the same principle as the DriveChain, but unlike it, this storage is created for long-term data storage, to which there is no need to have quick access.
Zero-Knowledge Proof (ZKP) will be used as the consensus protocol here. But when the ZKP reaches the state of technology that will enable it to produce proof of storage at a high rate, the DriveChain verification mechanism is likely to move to the same consensus.