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.