Skip to content

SMT proof size will lead to larger transaction size #24

@duanyytop

Description

@duanyytop

Hello, we found the SMT proof size will be about 15k when updating 100 leaves for the SMT which already has about 1000 leaves.

Here is the test data:

history SMT leaves count: 996
update SMT leaves count: 100
updated SMT leaves count: 1096
SMT proof size: 15709 bytes
witness size (includes the signature, SMT origin data, and SMT proof): 32400 bytes

The SMT proof size is about 15k. Considering the block size limit, even if the size of other data in the transaction is negligibly small, the maximum number of transactions in one block is about 38(576/15 = 38.4).

Assuming that the average block time is 10s, the number of SMT leaves that can be updated per second is about 38*100/10 = 380. Considering other data sizes in the transaction, this value may be less than 300, or even less.

For CoTA NFT, the number of SMT leaves that can be updated per second determines the number of NFTs that can be minted per second.

And the keys of most of the SMT leaves in CoTA are the result of hashing, which has strong randomness.

So is there any possibility to reduce the size of SMT proof? Thanks

@jjyr @TheWaWaR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions