-
Notifications
You must be signed in to change notification settings - Fork 902
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
listpeerchannels: split conversion into stages #5825
listpeerchannels: split conversion into stages #5825
Conversation
7b37e0e
to
6bb311e
Compare
f4956d0
to
dc560d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the messy history, I should do a better job with it and make life easier for everybody.
I think the last change that this PR needs is
rm contrib/pyln-testing/pyln/testing/node_pb2.py
and make -j$(nproc) check DEVELOPER=1
this will regenerate the python code that we had, maybe this works also without removing the file?
OK, I've further diagnosed the bookkeeper issue. What happens (once listpeers is faster due to removal of channels[]):
Before (all settled before unilateral close):
After (one settled by unilateral close):
|
dc560d7
to
91928a3
Compare
I've rebased this onto master; it deprecates the schema and doesn't remove it now. We don't have deprecations for parameter removal, so that still gets removed entirely. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the bookkeeper error is hide under the following one
=========================== short test summary info ============================
FAILED tests/test_connection.py::test_wumbo_channels - KeyError: 'channels'
============ 1 failed, 499 passed, 54 skipped in 1863.02s (0:31:03) ============
I think this is one reason to prioritize this PR and not merge it close to the end of the merge windows, this PR will break many (if not all) others PRs
We're soon going to call json_add_unsaved_channel and json_add_uncommitted_channel from a new place, where we want the peer state directly included. Based on patch by @vincenzopalazzo. Signed-off-by: Rusty Russell <[email protected]>
Changelog-Added: JSON-RPC: new command `listpeerchannels` now contains information on direct channels with our peers. Signed-off-by: Vincenzo Palazzo <[email protected]>
Instead of returning a peers -> channels heirarchy, return (as callers want!) a flat array of channels. This is actually most of the transition work to make them work with listpeerchannels. Signed-off-by: Rusty Russell <[email protected]>
…nels(). This way we always have an SCID and a direction. Signed-off-by: Rusty Russell <[email protected]>
Don't parse the listpeers.channels output ourselves: with two extra fields we can simply reuse json_to_listpeers_channels(). Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
With the next change (which, as a side-effect, speeds up listpeers), we seem to hit a race in this test. The bookkeeper doesn't get to process the final payment before the node is shutdown. Signed-off-by: Rusty Russell <[email protected]>
Changelog-Deprecated: JSON-RPC: `listpeers` `channels` array: use `listpeerchannels` Signed-off-by: Vincenzo Palazzo <[email protected]>
Some are best copied into the schema, but some are already out-of-date, so cleanest to remove them and rely on the generated (and thus, checked!) fields. Signed-off-by: Rusty Russell <[email protected]>
These changes always find things that have changed since I did the initial sweep! No big deal, I'm re-testing now, rebased on master. |
91928a3
to
6b41666
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 6b41666
This is #5568 split into simple commits. Hopefully this will not just help with review, but with debugging!