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

Zero fee htlc prep #4: channel types everywhere, with protocol fixes :( #6136

Merged
merged 12 commits into from
Apr 10, 2023

Conversation

rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented Apr 1, 2023

Builds on #6120 so start from lightningd: expose default_locktime for wider usage. MERGED!

This puts channel_type in the db, rather than using separate flags, but doing so revealed that we didn't use it properly in several places. Those have been fixed, but some of it cannot be done immediately as that would break older nodes. @cdecker in particular will want to review this!

@rustyrussell rustyrussell added this to the v23.05 milestone Apr 1, 2023
@rustyrussell rustyrussell force-pushed the zero-fee-htlc-prep-4 branch 2 times, most recently from a6e630c to a463a62 Compare April 3, 2023 05:19
Copy link
Member

@cdecker cdecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK a463a62

Commonalizes a small piece of code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Happens more than I expected!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1. anchor_to_remote_redeem => bitcoin_wscript_to_remote_anchored,
   which matches other witness script producing functions and makes
   it clear that it's a to_remote variant.
2. is_anchor_witness_script => is_to_remote_anchored_witness_script
   makes it clear that it's about a to_remote output (as altered
   when anchors are enabled) not an anchor output!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…is too low.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This was confusing!  We reported every second one.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
It will append inputs to this PSBT instead of allocating a new one.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
I tested this indeed breaks if we don't accept it, then implemented
the code to accept it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: protocol: We now correctly accept the `option_scid_alias` bit in `open_channel` `channel_type`.
Changelog-Deprecated: protocol: Not setting `option_scid_alias` in `option_channel` `channel_type` for unannounced channels.
… really zeroconf.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Protocol: we will upfront reject channel_open which asks for a zeroconf channel unless we are going to do a zerconf channel.
This was always the intent, but now we have to reconstruct from the
disparate fields.

This means `option_anchor_outputs` is now redundant.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…ons.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell
Copy link
Contributor Author

Trivial rebase onto master to remove conflicts now previous is merged.

Ack 709c4ae

@rustyrussell rustyrussell merged commit 75ec1be into ElementsProject:master Apr 10, 2023
27 checks passed
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.

None yet

2 participants