Fix/delegate events and chunk pagination audit - #349
Merged
miss-yusrah merged 2 commits intoAug 31, 2026
Merged
Conversation
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.
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #316
closes #317
closes #318
closes #319