Skip to content

PDP Service Contract Performance  #16

@ZenGround0

Description

@ZenGround0

This is a placeholder issue for all speculative performance optimizations of the PDP service contract. We'll only do things that address measured bottlenecks (likely proving but possibly also the SumTree index and contract history recording).

Here are a few we can predict may be useful. Please add more ideas to the comments as you come up with them.

  • Batch the add and remove methods
  • SumTree performance improvements
    • track treeStart for efficient searching when front of proof set is garbage collected
    • store multiple SumTree entries in one word for better loading performance
    • change branching factor for shorter tree depth and to match word size for better loading performance
  • Change hot code paths to inline assembly, especially in proving code path
    • probably this is taken care of in merkle proof libraries that are very good
  • Do perf comparisons of merkle tree libraries
  • Consider changing PDP hash function for best perf
  • Recording history
    • Make assumptions about proving frequency to dramatically compress recorded bytes
    • Try a record keeping contract with a limited lifetime of events recorded. This keeps updating costs bounded rather than growing with map size

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions