Uh oh!
There was an error while loading. Please reload this page.
Group channel funding transaction fields (small refactor) [splicing] - #2736
Group channel funding transaction fields (small refactor) [splicing]#2736optout21 wants to merge 1 commit into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
optout21
commented
Nov 17, 2023
Thx for the comments, some reactions:
I will rework in light of the above. |
2918c4a to
97c3969Compareoptout21
commented
Nov 17, 2023
Reworked, simplified. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
97c3969 to
c0784b6CompareCodecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@## main #2736 +/- ##
==========================================
+ Coverage 88.55% 88.56% +0.01%
==========================================
Files 113 113 Lines 89330 89409 +79 Branches 89330 89409 +79 ==========================================
+ Hits 79110 79189 +79 + Misses 7849 7847 -2 - Partials 2371 2373 +2 ☔ View full report in Codecov by Sentry. |
c0784b6 to
11bbc01Comparedevrandom
commented
Nov 20, 2023
you might be interested in how we did it in the VLS project - https://gitlab.com/lightning-signer/validating-lightning-signer/-/blob/2023-09-funding6-signing/vls-core/src/channel.rs?ref_type=heads#L477-481 (although you have somewhat different needs than us) |
| struct TransactionConfirmation { | ||
| /// The transaction, or None. | ||
| transaction: Option<Transaction>, | ||
| /// The hash of the block in which the transaction was included, or None. | ||
| confirmed_in: Option<BlockHash>, | ||
| /// The height of the block in which the transaction was included, or 0. | ||
| confirmation_height: u32, | ||
| } |
There was a problem hiding this comment.
If there are a distinct set of possibilities for how these are set and well-defined transitions, we may want to consider using an enum instead.
There was a problem hiding this comment.
Would make a lot of sense, but as I see currently the transitions are not so well defined... Doing this would require a much bolder change with a larger impact.
11bbc01 to
401254fCompareoptout21
commented
Nov 22, 2023
Cleaned up, adjusted description/title, marked ready. |
wpaulino
commented
Nov 22, 2023
Do we plan to track a |
optout21
commented
Nov 22, 2023
Yes, that's the idea. It is true that only one can get confirmed, but in some rare edge cases, due to reorg, a confirmed candidate can become unconfirmed, and theoretically another candidate can get confirmed. So I think it is needed to keep track of confirmation status of all candidates. |
wpaulino
commented
Nov 22, 2023
Right, but they can't happen at the same time. We must first see the reorg before seeing the new confirmation, and by then the confirmation status should have been reset, so I don't see the benefit to tracking the confirmation status individually per transaction candidate. |
optout21
commented
Nov 23, 2023
I think this small change makes sense even without considering Dual funding or Splicing. But you may be right that per-candidate confirmation tracking will not be needed. |
optout21
commented
Dec 7, 2023
Closing. Now I'm less sure that this would be needed in Splicing, and outside of Splicing it brings only minor benefits. |
Groups three
Channelfields storing funding transaction status into a separate structureTransactionConfirmation. This is a small refactor with very minimal code logic change.Motivation:
funding_transaction,funding_tx_confirmed_in,funding_tx_confirmation_height).Changes:
TransactionConfirmationstruct, with fields fortransaction,confirmed_in, andconfirmation_heightNote: The serialization format is untouched.
See also #2743 .