Repository navigation
feat(ledger): search by recipient and timestamp interval - #169
Merged
ChesterRa merged 3 commits intoOct 23, 2026
Merged
Conversation
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.
ledger_searchfilters senders but cannot restrict a query to one recipient or time interval. Callers must fetch broad pages and discard unrelated events themselves.The operation now accepts
to,since_tsanduntil_ts.tomatches an exact stored member ofevent.data.to, without expanding selectors. Time bounds are inclusive RFC3339 instants; equivalent offsets compare correctly. The fields combine with existing filters before the limit in both cursor directions. Omitted or null fields preserve current behavior. Invalid types, blank values and reversed intervals returninvalid_args. The HTTP search endpoint forwards the same fields.How we built it. The existing search query validates the three arguments and applies them beside the sender filter. Pagination order and event-ID cursor semantics remain unchanged. The IPC contract describes the parameters and HTTP behavior. This removes caller-side filtering loops; it does not replace the existing ledger index or change server retention.
How we tested it.
c1f5062166f764916c256ecde84e9a16b7ade884passed all six jobs, includingrust-linux: run39774146102. The test-only reference run39763094446, based on upstream maina212cb04before it advanced tof1d27838, fails exactly the three added tests while the other 2,715 pass; it is historical baseline evidence, not a test of current main.Tested on: GitHub-hosted Ubuntu 24.04 x86_64 runners, 4 vCPUs, Rust 1.88.0 (daemon probes); fork CI also passes Windows smoke.