Open Boqian-Ma opened 1 year ago
From the implementation, it seems like the balance tree uses the same sparse merkle tree data structure as the circuit account tree.
pub struct CircuitAccount<E: RescueEngine> { pub subtree: SparseMerkleTree<Balance<E>, E::Fr, RescueHasher<E>>, pub nonce: E::Fr, pub pub_key_hash: E::Fr, pub address: E::Fr, }
However, as noted in the illustration in protocol.md, the balance tree is none binary.
What is the correct interpretation?
Follow up questions: 1) why does CircuitAccountTree have a sub tree, but not AccountTree? 2) Do both reside in the "server"? 3) Why are there two trees?
CircuitAccountTree
AccountTree
Great!
From the implementation, it seems like the balance tree uses the same sparse merkle tree data structure as the circuit account tree.
However, as noted in the illustration in protocol.md, the balance tree is none binary.
What is the correct interpretation?