Byte元 is a simple, stable, and highly extensible public blockchain network. It was initially launched in December 2013 as a pre-mined airdrop with a Proof of Work (PoW) consensus mechanism. In 2015, Byte元 updated its consensus mechanism to Proof of Stake (PoS). After more than four years of design and research, Byte元 Blockchain 3.0 was released for public testing. The mainnet officially went live on May 17, 2018, upgrading to SPOS (Safe PoS), an optimized secure PoS consensus mechanism with improved randomness. Six months later, on December 7, 2018, Byte元 (BTY) became open-source on Github.
Byte元s development utilizes the underlying technology of Hangzhou ComplexBeauty Chain33, making it a public chain project with a multi-chain (parallel public chains) architecture that has been implemented and deployed. Multiple parallel public chains can be developed on the Byte元 blockchain, each with diverse and independent blockchain ecosystems and DApp development capabilities. This also enables cross-chain exchange functions between the chains. Applications for parallel public chain projects include stablecoins, red packets, social networking, e-commerce, asset tokenization, debt tokenization, notarization, and gaming.
Supported Storage Methods
The Byte元 blockchain innovatively implements MVCCKVDB (Multi-Version Key-Value Data Storage). Traditional blockchains store data using Merkle trees or MPT trees, which require a complete reconstruction of the tree with each change, leading to low efficiency. For example, querying data from a leaf node in a 20-level Merkle tree requires 20 read operations, resulting in a query efficiency that is only 1/20th of a conventional database. This means that a system capable of 100,000 reads per second can only process 5,000 transactions worth of data per second, significantly limiting the systems read performance. When writing data, multiple nodes along the tree branches must be loaded and ultimately written back to disk, consuming significant resources. Inspired by the MVCC (Multi-Version Concurrency Control) concept used in database design, Byte元 designed its unique KVMVCC data storage format to improve the inefficiencies present in MAVL or MPT structures, ensuring high data read and write performance even as blockchain data scales.
Hash Calculation:
statehash = hash(prevstatehash, KVSet, height), including the previous blocks state hash information, this blocks state data KVSet information, and this blocks height information (i.e., version information). The following relationships are stored in each nodes database:
hash -> height(version)
height(version) -> hash
key:height(version) -> value
latest:key -> value
Data Query:
The corresponding height (version) can be found based on the statehash, and the value associated with a specific key at that height can be located based on the height.
Data Verification:
For a particular heights KVSet, a hash calculation can be performed using the previous blocks hash value (prevstatehash), the KVSet, and the height. If the calculated hash matches, the data has not been tampered with. Otherwise, the data has been altered or is incorrect (either the height is incorrect, or the KVSet data is incorrect).
Maintenance of Latest Version Data:
When storing the key and value for the latest block, both new keys and updates to existing keys are preserved in the local key-value database as key:latest -> value mappings. To retrieve the latest batch of data, you can perform a bulk query using the latest prefix (which can be customized). Since typical key-value databases support prefix matching queries well, the query efficiency is much higher than with Merkle tree storage structures.
Super Nodes
To enhance blockchain performance, parallel public chains typically adopt Delegated Proof of Stake (DPoS) consensus, where a number of super nodes that contribute computing power and bandwidth are elected on the chain. These super nodes are responsible for bundling transaction information into blocks, broadcasting block information to other nodes, and storing transaction data on the blockchain, contributing to the community governance function.
A critical metric for the success of a public chain is the number of nodes on its network. The super node mechanism helps parallel public chains rapidly establish their ecosystem and, through the operation and maintenance of various super nodes, promotes a more prosperous and vibrant ecosystem, achieving a more stable, powerful, and decentralized blockchain system.
Furthermore, the operators of parallel public chains can establish a parallel chain foundation, incentivizing super nodes through various token mechanisms and operational strategies, enhancing their initiative and enthusiasm. Through token buybacks, transaction fees, and other methods, this promotes the healthy and sustainable development of parallel public chains.
Oracle Function Support
Oracles bridge the gap between blockchains and the real world. An oracle is a trusted entity that introduces information about the state of the external world through signatures, allowing deterministic smart contracts to react to uncertain external events. Oracles are characterized by being tamper-proof, stable, and auditable.
Publishing data through an oracle contract involves three steps:
(1) Publish a data event (inform the entire network that the result of a certain event will be published in the future and allocate a unique event ID. If the event does not occur, it can be revoked).
(2) Pre-publish the result (data providers pre-publish the event results. If auditors find issues with the results, they can be revoked).
(3) Publish the final result (after auditing the pre-published result, it is finally published across the network, immutable and auditable).
Other contracts (such as betting contracts) can use the event ID and specific event from step 1 to conduct activities (such as betting). When the final result is published in step 3, the betting contract triggers settlement based on the result associated with the event ID, achieving fair, objective, auditable, and traceable betting without human intervention.