Closed
Description
Our current tree depth sizes:
Accounts: 24 (16,777,216 unique accounts / exchange)
Tokens: 12 (4096 unique tokens / exchange)
Trade History: 16 (65536 slots / tokenS / account)
Some of these are larger than needed. Updating these trees in the circuits is our main bottleneck next to data availability (which will be optional). By decreasing these we lower the number of constraints which increases our achievable throughput.
I propose the following:
Accounts: 20 (1,048,576 unique accounts / exchange)
Tokens: [8, 10] (256 - 1024 unique tokens / exchange)
TradeHistory: [12, 14] (4096 - 16384 slots / tokenS / account)
The Tokens tree is updated the most frequent so lowering this is the most important, then the Accounts tree and then the TradeHistory tree.