The architecture of the Venom blockchain provides a framework for a highly scalable, efficient, and secure blockchain network. At its core, the architecture comprises of a heterogeneous multi-blockchain system, utilizing dynamic sharding capabilities for optimal performance.
Masterchain
Acting as the backbone of the Venom blockchain, the masterchain is a layer-0 chain that facilitates communication and coordination among the workchains, shardchains, and accounts. It carries the responsibility for message routing, maintaining the network configuration, and retaining information about validators, their stakes, and election rounds.
The Masterchain is also tasked with the distribution of the current shard configuration and the latest block hashes of each corresponding shardchain. A unique set of validators, with the highest stakes, are charged with the generation of new masterchain blocks.
Workchains
Workchains represent specialized layer-1 blockchains, safeguarded by the global validators set. Their connection to the masterchain grants them access to the masterchain's security, with the masterchain validators' efforts forming a protective shield around them.
The design of workchains allows for customizability to cater to the specific needs of the applications they host. Developers have complete control over commissions and emission schemes within their workchains, establishing the Venom Blockchain as a heterogeneous platform.
Basechain
At the time of launch, the Venom blockchain consists of two networks: the Masterchain and the Basechain. The Basechain serves as the initial layer-1 workchain for end-users, hosting dApps and providing a platform for the execution of smart contracts.
Workchain's Interoperability
The interoperability of workchains within the Venom blockchain is facilitated through a native cross-chain communication protocol. This protocol enables trustless interactions between workchains, negating the need for third-party bridges or intermediaries.
Shardchain
The Venom blockchain utilizes shardchains, smaller slices of a blockchain state, to execute computations for a specific subset of accounts. Initially, all transactions are processed by one group of validators belonging to a shardchain. However, as the volume of transactions increases, the network triggers a split event that divides the shardchain into multiple shards. Conversely, if the network load decreases, a merge event can be triggered to combine the shardchains back into a single entity.
Dynamic Sharding
The Dynamic Sharding Protocol, a key feature of the Venom blockchain, enables the network to dynamically adjust the number and size of shards to accommodate the current load.
Split and Merge Events
Split events, announced several blocks in advance, trigger when the shardchain blocks are at least 90% full. The split is then propagated to the masterchain block, updating the shard configuration of the network.
On the other hand, merge events are triggered when the sum of the sizes of the two blocks of sibling shardchains does not exceed 60% of the maximal block size. The system then combines the blocks and transactions from each of the two sibling shardchains to create a new state for the merged shardchain.
With its unique architecture, the Venom blockchain ensures a robust, scalable, and secure platform that seamlessly caters to the needs of its users.