Skip to content

listhtlcs pagination #8166

New issue

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

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

Already on GitHub? # 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 2 times, most recently from cc2e043 to d59e2bc Compare April 16, 2025 04:13
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch 4 times, most recently from c1be2c6 to 2f1c2b1 Compare April 24, 2025 06:38
Otherwise it can get included in contrib/msggen/msggen/schema.json!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
This prepares us for doing listhtlcs pagination.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `wait` now supports the `htlcs` (`listhtlcs`) subsystem.
…cs).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch from 2f1c2b1 to 42f6fca Compare April 25, 2025 00:52
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch from 42f6fca to c1baf6d Compare April 25, 2025 02:52
@cdecker
Copy link
Member

cdecker commented Apr 25, 2025

ACK c1baf6d

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants