Skip to content

[RFC] event: store the outpoint when is_manual_broadcast #3259

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

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

vincenzopalazzo
Copy link
Contributor

This should be trivial enough, but I would like to have some discussion on some of the
code that I implemented (I left some FIXME)

Commit ceab25c should have more context on the PR

Fixes: #3164

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 18 lines in your changes missing coverage. Please review.

Project coverage is 90.57%. Comparing base (b2cdc2c) to head (5e874c3).
Report is 54 commits behind head on main.

Files Patch % Lines
lightning/src/events/mod.rs 0.00% 17 Missing ⚠️
lightning/src/ln/channelmanager.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3259      +/-   ##
==========================================
+ Coverage   89.66%   90.57%   +0.90%     
==========================================
  Files         125      126       +1     
  Lines      102797   110724    +7927     
  Branches   102797   110724    +7927     
==========================================
+ Hits        92176   100288    +8112     
+ Misses       7908     7863      -45     
+ Partials     2713     2573     -140     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@valentinewallace valentinewallace added this to the 0.0.124 milestone Aug 21, 2024
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Much better, one more note on serialization.

@vincenzopalazzo vincenzopalazzo force-pushed the macros/dummy-tx branch 4 times, most recently from aa94d3b to d0db6d3 Compare August 27, 2024 08:22
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

TheBlueMatt
TheBlueMatt previously approved these changes Aug 27, 2024
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

LGTM, one comment about docs still but I can do it in a followup.

With [1], it's possible to specify `manual_broadcast` for
the channel funding transaction. When `is_manual_broadcast` is
set to true, the transaction in the `DiscardFunding` event is
replaced with a dummy empty transaction.

This commit checks if `is_manual_broadcast` is true and
stores the funding OutPoint in the DiscardFunding event instead.

[1] lightningdevkit#3024

Link: lightningdevkit#3164
Suggested-by: TheBlueMatt
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
write_tlv_fields!(writer, {
(0, channel_id, required),
(2, transaction, required)
(2, transaction, option),
(4, funding_info, required),
Copy link
Contributor

@valentinewallace valentinewallace Aug 27, 2024

Choose a reason for hiding this comment

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

Tried to look into ways to not break downgrades for this (i.e. writing a dummy or partially-dummy tx if unsafe_manual_funding_transaction_generated was used) but it doesn't seem worth it. So just noting that we'll need a release note for this since I don't see one in pending_changelog (can happen in follow-up).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can ask how the pending_changelog works? I could make the followup, sorry if I missed it

Copy link
Collaborator

Choose a reason for hiding this comment

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

We just put things in there to remember to include them in the changelog. I realized there was another issue so i went ahead and did the followup at #3275

@TheBlueMatt TheBlueMatt merged commit 5e62df7 into lightningdevkit:main Aug 27, 2024
20 of 21 checks passed
@vincenzopalazzo vincenzopalazzo deleted the macros/dummy-tx branch August 27, 2024 19:38
TheBlueMatt added a commit that referenced this pull request Aug 29, 2024
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.

#3024 exposes dummy tx in DiscardFunding
3 participants