Skip to content

Incremental Merkle Tree #69

Open
@stechu

Description

@stechu

As we are building manta (https://github.com/Manta-Network), we figured out that we need an incremental merkle tree that has Log N internal nodes, which is not supported in the current MerkleTree implementaion. The properties that we need for this merkle tree:

  1. Able to generate ZK membership proofs
  2. The merkle tree can be fixed sized and append only (i.e. mark the unused leaf node as a filler, etc)
  3. The number of internal nodes is Log N. (since we need to store the internal nodes on chain, O(N) storage would be too expensive).
    I think 3 is only possible if this merkle tree only support append. Happy to submit a PR on this. Would also like to hear is there any design considerations that need to take care of during the implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    D-mediumDifficulty: mediumT-featureType: new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions