Skip to content

Fix/delegate events and chunk pagination audit - #349

Merged
miss-yusrah merged 2 commits into
Stellar-TrustBridge:mainfrom
martinzhames:fix/delegate-events-and-chunk-pagination-audit
Aug 31, 2026
Merged

Fix/delegate events and chunk pagination audit#349
miss-yusrah merged 2 commits into
Stellar-TrustBridge:mainfrom
martinzhames:fix/delegate-events-and-chunk-pagination-audit

Conversation

@martinzhames

Copy link
Copy Markdown
Contributor

closes #316
closes #317
closes #318
closes #319

Indexers previously had no way to tell a payout-address change apart
from an identity rotation or re-registration, since all three funneled
through registered_event. Adds delegate_payout/undelegate_payout entry
points that reuse the existing payout_address field (no new storage),
emit their own payout_delegated_event/payout_delegation_revoked_event,
and enforce a single live delegate at a time via new AlreadyDelegated/
NoActiveDelegate errors. Documents the three-way distinction in
EVENT_INDEXING.md and adds coverage for the new entry points.
Audited the dual flat/chunked username index: get_public_paginated
shared get_registered_paginated_internal with the admin export, which
loads the entire legacy flat index out of instance storage on every
call before slicing out the requested page. Being unauthenticated and
pause-exempt, the public path was the most exposed to that cost and
defeated the point of the chunked index (Issue Stellar-TrustBridge#2). Adds
get_public_paginated_internal, which walks only the persistent chunks
needed for the requested window and shares the same opaque cursor
format, so cursors stay interchangeable with the admin path. Adds
pagination tests and a DASHBOARD_SYNC.md archival note recording the
audit and confirming no other public read path scans an index.
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@martinzhames 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

@miss-yusrah
miss-yusrah merged commit f18042c into Stellar-TrustBridge:main Aug 31, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants