Skip to content

Subscription and registry: version(), paged subscriber listing, stats and TTL tests - #135

Open
amaka105 wants to merge 4 commits into
stellar-sub:mainfrom
amaka105:fix/drips-amaka105-41-44
Open

amaka105 wants to merge 4 commits into
stellar-sub:mainfrom
amaka105:fix/drips-amaka105-41-44

Conversation

@amaka105

Copy link
Copy Markdown

Subscription and registry: version(), paged subscriber listing, stats and TTL tests

Closes #41
Closes #42
Closes #43
Closes #44

Notes for review:

🤖 Generated with Claude Code

amaka105 and others added 4 commits October 21, 2026 15:26
Add a VERSION constant and a version() entrypoint so clients and indexers
can detect which behaviour a deployed subscription contract has. The doc
comment records the rule: bump VERSION on any change to the storage layout
or to how an entrypoint behaves. A test checks that version() returns the
constant.

Closes stellar-sub#43

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Add get_by_subscriber_page(subscriber, start, limit). It reads one slice of
the subscriber's index, so large histories no longer have to be read in one
call. limit is capped at MAX_PAGE_LIMIT (50), and a page past the end is
empty. get_by_subscriber is kept unchanged for compatibility. A test checks
that pages run end to end with no gaps or repeats, and that a huge limit is
capped.

Closes stellar-sub#44

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…r-sub#41)

Add a property test that runs random registrations and valid updates and,
after every step, checks the incremental stats against values recomputed
from all stored records: total subscriptions, active count and charged
volume. The registry gains proptest as a dev-dependency.

Closes stellar-sub#41

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Advance the ledger into the threshold window, then read a record and the
id list, and check that both persistent TTLs grew.

Closes stellar-sub#42

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@amaka105 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant