Merged mining in JaxNetwork

From JaxNetwork Wiki
Jump to navigation Jump to search

The mining scheme in JaxNet relies on merged mining. Miner can choose the subset of shards, download the necessary information about them and the Beacon Chain, form valid block candidates for those shards, put them into the Merkle tree and start mining them simultaneously.

Merge-mining of shard blocks

Nodes in JaxNet have a special agreement described in the protocol on how to perform merged mining. Every miner composes a Merkle tree in which he places his shard block candidates. In JaxNet protocol this data structure is called Merge-mining Merkle Tree (MMMT) since it is used for merge-mining. Another name for it is Shard Merkle Tree (SMT) since its leaves correspond to shards in JaxNetwork.

Shard Merkle Tree

The set of shards in JaxNet are in one-to-one correspondence with the set of leaves of Shard Merkle Tree: the first leaf from the left corresponds to the first shard, the second leaf to the second shard and so on. It is allowed to merge-mine the shard block only on the leaves of the Shard Merkle Tree which corresponds to this shard.

Blocks which are merge-mined in the wrong place should be rejected during the block verification within the shard.

Hash sorting

Merged Mining Proof

Merged Mining Proof or MMP is the backbone and the key innovation of JaxNet protocol. According to JaxNet protocol, any miner can merge-mine multiple shards simultaneously. MMP is a tool that allows anyone within the particular shard to estimate how many shards were merge-mined. MMP is the proof that certain miner, who merge-mined the particular block, was not mining a particular subset of shards.

Besides standard records, the Beacon chain block header includes the number of shards in the network, the encoding of shard merge-mining tree, and its root.

Verification of the merge-minined block candidate

Verification of Shard Proof

Since a Shard Merkle Tree protects the data integrity, the miner has a proof of how merged mining has been executed. A Shard Merkle Proof is a merkle proof that the SC block header was mined in the correct place.

Verification of Merged Mining proof