-
Notifications
You must be signed in to change notification settings - Fork 911
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
channel type support #4616
channel type support #4616
Conversation
4acf4ae
to
587056a
Compare
587056a
to
2c138ea
Compare
Trivial rebase now #4615 is merged |
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 2c138ea
I think we need to add only the feature supports_open_accept_channel_types
in the python test.
P.S: Unfortunately we need another rebase here
This is updated to match the new spec, finally! |
57e2dfd
to
e340364
Compare
I've tested e340364 against eclair (ACINQ/eclair#1867) and I've found some issues (sorry!). I have activated anchor outputs in both c-lightning and eclair to be able to test a wide range of cases.
|
@rustyrussell do you think you will have time this week to fix the issues I reported earlier? It would be great to finalize compatibility testing and be able to merge lightning/bolts#880 during the next spec meeting! |
f9d568e
to
3379cb2
Compare
Openingd can query them itself (as dualopend already does). And move the two feature args next to each other on the wire. Signed-off-by: Rusty Russell <[email protected]>
We want to use this to handle the simple description for channel_type. It also needs to handle variable-size types (just like subtypes). Signed-off-by: Rusty Russell <[email protected]>
We make it a first-class citizen internally, even though we won't use it over the wire (at least, non-experimental builds). This scheme follows the latest draft, in which features are flagged compulsory. We also add several helper functions. Since uses the *even* bits (as per latest spec), not the *odd* bits, we have some other fixups. Signed-off-by: Rusty Russell <[email protected]>
… bools. Signed-off-by: Rusty Russell <[email protected]>
Instead of explicit option_static_remotekey and option_anchor_outputs flags. Signed-off-by: Rusty Russell <[email protected]>
3379cb2
to
e493c25
Compare
Currently we actually insist it's the default, but in future it could be different. We also need to tell openingd what the channel_type was, if we resume via openingd_funder_complete(). Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
It was merged (but this doesn't update the BOLT quotes, that's in another patch). Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: We now send and support channel_type in channel open (not dual-funding though).
e.g. you can negotiate anchor_outputs, but still ask for a non-anchor-output channel. If/when we make those features compulsory, downgrade will not be allowed. Signed-off-by: Rusty Russell <[email protected]>
It's not a separate option, but lnprototest needs it to know to expect the tlvs. Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
This was just a minor leak, found by CI for test_openchannel_hook_chaining. We didn't call negotiation_aborted which frees various fields: negotiation_failed() does that for us. ``` MEMLEAK: 0x55b0f2d5f3c8 label=common/channel_type.c:19:struct channel_type backtrace: ccan/ccan/tal/tal.c:442 (tal_alloc_) common/channel_type.c:19 (channel_type_none) common/channel_type.c:27 (channel_type_static_remotekey) common/channel_type.c:136 (channel_type_accept) openingd/openingd.c:844 (fundee_channel) openingd/openingd.c:1240 (handle_peer_in) openingd/openingd.c:1510 (main) parents: openingd/openingd.c:1414:struct state ``` Signed-off-by: Rusty Russell <[email protected]>
e493c25
to
707164f
Compare
This is now fixed. Initially we only allowed the default type, now we allow downgrades.
This is also fixed: we correctly respond with the empty channel (at least for now: we may required static_remotekey soon). |
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.
Very nice cleanup, I'm starting to like the channel_type
proposal after all 😉
ACK 707164f
&supports_shutdown_script)) { | ||
if (!fromwire_openingd_funder_start_reply(fc, resp, | ||
&fc->funding_scriptpubkey, | ||
&supports_shutdown_script, |
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.
I take it that the upfront shutdown script is negotiated independently of the channel_type? Or could it be removed and passed via the channel_type instead?
Based on #4615