nervosnetwork / sparse-merkle-tree

46 stars 37 forks source link

Can the SMT height be customized #25

Open duanyytop opened 2 years ago

duanyytop commented 2 years ago

As described in issue#24, when the number of history leaves and update leaves of SMT becomes larger, the size of SMT proof also becomes larger. And when the SMT height is 256, the number of leaves that can be updated per second does not exceed 300.

A smaller height can effectively reduce the size of the SMT proof, which is beneficial to increasing the number of updated leaves per second.

So is it possible to allow custom SMT height, for example, 32 / 40 / 48 / 128, etc., as long as it is an integer multiple of 8?