Skip to content

SparseMerkleTree does not implement a sparse merkle tree #144

@prestwich

Description

@prestwich

Describe the bug
This is not a sparse merkle tree.

Sparse merkle trees definitionally have 2**n nodes at each level of the tree (where n is the 0-indexed depth). If you intend to build a sparse merkle, you ought not pad.

If you intend to build a regular merkle that allows incremental storage of nodes, you ought not use the default hash mechanism (bytes32(height) would be sufficient padding).

Also, please consider tagging your interior nodes

Expected behavior
Name should reflect common definition of sparse merkles

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