Skip to content

listhtlcs pagination #8166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

Long requested, adds wait/pagination support to listhtlcs.

@rustyrussell rustyrussell added this to the v25.05 milestone Mar 18, 2025
@rustyrussell rustyrussell requested a review from cdecker as a code owner March 18, 2025 04:30
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch 5 times, most recently from 22ccf70 to 670a36a Compare March 20, 2025 01:27
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch from 670a36a to c49ccbb Compare April 4, 2025 04:07
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch from c49ccbb to cc2e043 Compare April 15, 2025 07:16
Otherwise it can get included in contrib/msggen/msggen/schema.json!

Signed-off-by: Rusty Russell <[email protected]>
The last argument is a pointer, but we were handing `false`.  Which, for
terrible historic reasons, gets treated as NULL.

Signed-off-by: Rusty Russell <[email protected]>
It makes the schema simpler, and indeed, expressable by GRPC.

Changelog-Added: JSON-RPC: `wait` now has separate `invoices`, `forwards` and `sendpays` objects for each subsystem.
Changelog-Deprecated: JSON-RPC: `wait` reply `details` object: use subsytem specific object instead.
Signed-off-by: Rusty Russell <[email protected]>
We're not going to increment one at a time for bulk deletion of htlcs
when a channel closes.  There could be millions of HTLCs!

Signed-off-by: Rusty Russell <[email protected]>
This prepares us for doing listhtlcs pagination.

Signed-off-by: Rusty Russell <[email protected]>
Note that documentation says invoice expiries can batch, but that's no
longer true, so delete it.  Usually, we miss a number because the
change is too fast.

This adds the wait interface, but it doesn't actually fire until the next
commit, which wires it into the db code.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Added: JSON-RPC: `wait` now supports the `htlcs` (`listhtlcs`) subsystem.
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Added: JSON-RPC: `listhtlcs` has `created_index` and `updated_index` fields.
Changelog-Added: JSON-RPC: `listhtlcs` supports `index`, `start` and `end` parameters for pagination support.
Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch from cc2e043 to d59e2bc Compare April 16, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant