feat(indexer): preflight endpoint, sync with abstract discovery provider interface - #439
Closed
Conversation
This was referenced Feb 6, 2026
Author
m-kus
marked this pull request as ready for review
February 6, 2026 19:38
m-kus
marked this pull request as draft
February 6, 2026 21:15
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.

TL;DR
Refactored the Discovery Service API with improved endpoint naming, enhanced cursor structure, and added a new preflight endpoint for transfer readiness checks.
What changed?
/v1/discovery/incoming/syncto/v1/sync/incoming_statefor consistency/v1/discovery/preflightendpoint to check transfer readinesstotal_n_subchannelstoskip_subchannel_discoveryboolean flagskip_channel_discoveryflag to optimize channel discoverymax_note_indexto optimize note scanning with exponential probingmax_readsfrom 1000 to 50 (capped at 100) for better request sizingHow to test?
/v1/sync/incoming_stateendpoint to discover incoming notes/v1/sync/outgoing_stateendpoint to discover outgoing channels/v1/discovery/preflightendpoint with:{ "sender_address": "0x...", "viewing_key": "0x...", "recipient": "0x...", "token": "0x..." }{ "block_ref": "0x...", "sender_registered": true, "channel_exists": true, "subchannel_exists": true }Why make this change?
These changes improve the API's consistency, efficiency, and usability:
This change is