Skip to content

[feature]: Add byte-based limit to universe proof cache #1865

@ffranr

Description

@ffranr

The universe proof cache is currently limited by number of proofs per universe. Proof size varies and will grow over time so we need a total-byte-size cap.

Work:

  • Add Size() uint64 to mssmt.Node, Leaf, and implementations.
  • Add Size() uint64 to proof.Proof.
  • Use these to track proof byte size in cache.
  • Evict based on byte budget.
  • Add unit tests for the size methods and eviction logic.

Output:

  • Config option for max cache bytes.
  • Byte-aware eviction in universe proof cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions