Skip to content

Optimization: Leaf-hash-caching for SHA-512 Hashes #6352

@gmalouf

Description

@gmalouf

Thinking about it more and talking with @algorandskiy, the easiest thing that doesn't require refactoring the merklearray package is to pre-compute all the leaf hashes as the block is built, and that saves you half the work at GenerateBlock time. Going deeper than that is trickier because of the way the leaves are indexed differently in the two implementations.. but the leaf-hash-caching would be lowest hanging fruit for a future optimization PR

Originally posted by @cce in #6339 (comment)

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