Skip to content
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

Investigate the splice reestablish branch #96

Draft
wants to merge 76 commits into
base: master
Choose a base branch
from

Conversation

ksedgwic
Copy link

DON'T MERGE THIS, we'll cherry-pick things upstream and eventually hard-reset a remote-hsmd branch to something ...

- Add instruction to generate `primitives_pb2.py` file,
- Import `grpc` in the Python script.

Changelog-None
@ksedgwic ksedgwic force-pushed the 2023-11-splice_reestablish branch from 8060cff to 5463c04 Compare November 15, 2023 04:29
ksedgwic and others added 9 commits November 15, 2023 18:42
Fixes ElementsProject#6866

Changelog-Fixed: The WIRE_HSMD_SIGN_SPLICE_TX HSM capability is now correctly checked.
Closes ElementsProject#6844

Changelog-Added: Cln-RPC: Add `fetchinvoice` method to cln-rpc and cln-grpc.
Fixes ElementsProject#6792

Changelog-Added: Cln-RPC: Add `wait` system to cln-rpc and cln-grpc.
…esting

`poetry update` did not change the poetry.lock file for contrib/pyln-testing
because it already has `requests`.
- cln-grpc certificate reuse
- new certificate generation
- `GET` and `POST` requests
- websocket server
- config options and HTTP headers

Link to ElementsProject#6436.
It already throws an exception or error, or decodes the JSON response:
we can simply pass it through.

Signed-off-by: Rusty Russell <[email protected]>
We have a global JSON encoder hack, which means that any field ending in msat gets special treatment (so we can safely talk to lightningd, even if a field expects satoshi amounts, we are explicit).  However, requests uses the JSON parser and DOES NOT want this conversion when sending it out as an HTTP response!

The simplest local fix we could find was Shahana's suggestion to iterate and covert away from Millisatoshi(): the reverse of what our JSON encoder does.

Fixes: ElementsProject#6848
Signed-off-by: Rusty Russell <[email protected]>
@ksedgwic ksedgwic force-pushed the 2023-11-splice_reestablish branch from da8dcd5 to 0d049fb Compare November 16, 2023 10:03
This will allow users to use clnrest with c-lightning-REST without conflicts.
It was required for applications to have enough time for migrating from c-lightning-REST to clnrest.

Changelog-Changed:
config option `rest-certs` changed to `clnrest-certs`
config option `rest-protocol` changed to `clnrest-protocol`
config option `rest-host` changed to `clnrest-host`
config option `rest-port` changed to `clnrest-port`
config option `rest-cors-origins` changed to `clnrest-cors-origins`
config option `rest-csp` changed to `clnrest-csp`
@ksedgwic ksedgwic force-pushed the 2023-11-splice_reestablish branch from 0d049fb to 5463c04 Compare November 16, 2023 11:31
Add a version bump for clnrest and the main poetry.lock to the makefile
and update the release checklist to include the new target.

Signed-off-by: Peter Neuroth <[email protected]>
@ksedgwic ksedgwic force-pushed the 2023-11-splice_reestablish branch 2 times, most recently from 55ef722 to d9a7d12 Compare November 16, 2023 19:13
ddustin and others added 4 commits November 16, 2023 14:25
Adds tests for when the connection fails during
1) splice tx_signature
2) splice commitment_signed

Fleshed out the reestablish flow for these two cases and implemented the fixes to make these reestablish flows work.

Part of this work required changing commit process for splices: Now we send a single commit_part for the splice where previously we sent all commits, and accordingly, we no longer revoke in response.

Changelog-Fixed: Implemented splicing restart logic for tx_signature and commitment_signed. Splice commitments are reworked in a manner incompatible with the last version.
@ksedgwic observed that commitments using an old commitment index were incorrectly using a fresh commitment_point.

This commit updates the commitment related methods to explicitly state which commitment point is being worked on, and, correctly specifies which point should be used.
@ksedgwic ksedgwic force-pushed the 2023-11-splice_reestablish branch from d9a7d12 to a8532b3 Compare November 16, 2023 19:34
ksedgwic and others added 22 commits November 17, 2023 15:53
- "channel stub can only return point for commitment number zero"
- likely caused by CLN commit c0cc285
- possibly we relax the check, may not be security critical
- See issue https://gitlab.com/lightning-signer/validating-lightning-signer/-/issues/245
Revert "splicing: Skip splice test until splicing is supported"

This reverts commit bd9494c.
@ksedgwic ksedgwic force-pushed the 2023-11-splice_reestablish branch 7 times, most recently from 0f006e2 to b1d16de Compare November 19, 2023 16:23
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.

10 participants