-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MerkleTreeMiMC7_test.sol:24:25: Error: Array is too large to be encoded. public returns (bytes32[MAX_NUM_NODES] memory) #228
Comments
Thanks for the issue @yanyanho, that's a good catch! |
Thanks very much, I hava a further trouble. A Merkle tree of depth 8 can only support 2^8 transfers, can you give the demo dynamic creating merkel trees. A Merkle tree of depth 32 takes too long time (20s , mac docker test ) to generating proof, I want to decrease the tree depth but I need to dynamic creating merkel trees. What's more , Can you give some suggestion to short the time of generating proof. |
Hi @yanyanho. The Merkle tree size is controlled by the Regarding proving times, it's worth checking the fundamentals (ensure you are running an optimized multi-threaded build and that the docker container has enough resources, or try a native mac build etc) to get the max performance, but a substantial improvement would require optimization of the arithmetic circuit, and even this is only possible up to a point. You may be interested in Chapter 4 of the protocol spec https://github.com/clearmatics/zeth-specifications/blob/master/zeth-protocol-specification.pdf which discusses performance, snark-friendly primitives and some of the trade-offs in this proof-of-concept. |
@yanyanho this ticket has been addressed in #229 which is now merged in Further discussion and details are discussed in the protocol specifications linked above. |
hi, I may not explicit it clearly. What I want to do is creating more than one tree(depth is the same). I want decrease the depth (for example set depth 5 rather than 32 )of merkeltree to shorten the time of generating proof. Meanwhile, I need to create more trees(depth is 5) to contain the utxo . Do you have the solution? |
Creating multiple small trees may look appealing at first glance, but tremendously weakens the protocol as the merkle root associated to each tx leaks in which small anonymity set the inputs/outputs belong. That of course, constitute valuable information for the adversary. Moreover, managing multiple MK Tree complexifies the protocol as we may have inputs and outputs that do not belong to the same merke tree, hence forcing us to create several merkle roots during the proof generation etc. That being said, the big drawback of using shallow trees really is the leakages associated to this solution. Keeping a single and big anonymity set really is essential to minimize metadata leakages. |
This actually is already moved to its own ticket: #238 |
when I ran test_merkle_tree_contract.py, I came across this problem.
The text was updated successfully, but these errors were encountered: