Need implementing data structure certifying coin values distribution among newly minted tokens. As the base, we should take Sum-Certifying Hash Trees (reference: https://drive.google.com/file/d/13KjolL-EYLm_nkpGdhUuZ554aAU2YS1h/view?usp=sharing, thanks Ahto!) implemented on base of Prefix Hash Trees (TypeScript: https://github.com/unicitynetwork/shared/tree/typescript/src/smt, old JS: https://github.com/unicitynetwork/prefix-hash-tree/tree/main/smt). Here, the idea is that all the leafs are positioned in the tree based on their id (bit sequence), in order to optimize on number of hashing steps across long non-forking segments along the path to a leaf, non-branching segments encoded as bit sequences rather than presented by multiple intermediary vertices with one empty and one non-empty child. Moreover, every vertex is supplied with list of coin values (mapping coin_id -->coin_value) such that if the vertex is not a leaf, then its respective coin values are sums of its children coin values. Each intermediary step in the hash path in this tree should be like (branch_bit_sequence, sibling_value, sibling_hash)
Need implementing data structure certifying coin values distribution among newly minted tokens. As the base, we should take Sum-Certifying Hash Trees (reference: https://drive.google.com/file/d/13KjolL-EYLm_nkpGdhUuZ554aAU2YS1h/view?usp=sharing, thanks Ahto!) implemented on base of Prefix Hash Trees (TypeScript: https://github.com/unicitynetwork/shared/tree/typescript/src/smt, old JS: https://github.com/unicitynetwork/prefix-hash-tree/tree/main/smt). Here, the idea is that all the leafs are positioned in the tree based on their id (bit sequence), in order to optimize on number of hashing steps across long non-forking segments along the path to a leaf, non-branching segments encoded as bit sequences rather than presented by multiple intermediary vertices with one empty and one non-empty child. Moreover, every vertex is supplied with list of coin values (mapping coin_id -->coin_value) such that if the vertex is not a leaf, then its respective coin values are sums of its children coin values. Each intermediary step in the hash path in this tree should be like (branch_bit_sequence, sibling_value, sibling_hash)