Merge-mining Merkle Tree

From JaxNetwork Wiki
Jump to navigation Jump to search

Merge-mining Merkle Tree or MMMT is a data structure used for merge-mining of shard block candidates according to JaxNet protocol. Every miner maintains his own instance of MMMT determined by the subset of shards which he has decided to mine. Whenever a miner completes proof-of-work for some block candidate he may use the data from MMMT to construct Shard Merkle Proof and Merge Mining Proof.

MMMT and merge-mining

Nodes in JaxNetwork have a special agreement described in the protocol on how to perform merged mining. The set of shards in JaxNet are in one-to-one correspondence with the set of leaves of MMMT 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 MMMT which corresponds to this shard. Blocks which are merge-mined in the wrong place are rejected during the block verification within the shard.

Height of MMMT

The number of shards in JaxNetwork is not fixed and could be increased according to shard expansion protocol. When the network decides to increase the network capacity, it may switch to higher Merkle Tree with more leaves and more capacity.

Orange subtree

Orange subtree encoding

Bound on the size of the encoding

Size of Merge-mining tree encoding
Height of
the Shard
Merkle tree
Bound on
the max size
of orange subtree
Max size of
orange subtree
encoding in bits
Max size of
Merge-mining tree
encoding in bits
1 2 3 3
2 4 7 9
3 8 15 21
4 16 31 45
5 30 59 90
h>5 6h 12h-1 18h
20 120 239 360

Merge-mining proof

See also

Merged mining in JaxNetwork