Skip to content

fix: bound factory sender/recipient indices - #496

Open
pchieneye wants to merge 2 commits into
conduit-protocol:mainfrom
pchieneye:fix/362-factory-bounded-indices-pr
Open

fix: bound factory sender/recipient indices#496
pchieneye wants to merge 2 commits into
conduit-protocol:mainfrom
pchieneye:fix/362-factory-bounded-indices-pr

Conversation

@pchieneye

Copy link
Copy Markdown

Summary

Bound the factory sender/recipient indices to fixed-size pages instead of a single unbounded Vec that is rewritten on every create_stream.

What changed

  • page BySender and ByRecipient history into bounded storage buckets
  • add per-address counts to track index boundaries without unbounded entries
  • keep legacy migration compatibility in the factory index path
  • add regression coverage around paged reads and TTL refresh behavior

Why

A single unbounded Vec per sender/recipient grows without bound and can eventually hit Soroban entry-size limits, which permanently breaks future stream creation for that address.

Testing

  • cargo test -p drip-factory -- --nocapture

Closes #362

* feat: implement paginated indexing for streams by sender and recipient, update legacy storage handling

* fix: update legacy index migration check and improve documentation for paged storage keys
@pchieneye
pchieneye requested a review from Jaydbrown as a code owner August 31, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: factory BySender / ByRecipient indices are unbounded Vec<u64> rewritten on every create_stream

2 participants