-
Notifications
You must be signed in to change notification settings - Fork 24
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
Splice with htlcs #568
Splice with htlcs #568
Conversation
1545b47
to
674cde5
Compare
src/commonMain/kotlin/fr/acinq/lightning/channel/Commitments.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/channel/Commitments.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/channel/Commitments.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/channel/InteractiveTx.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/channel/InteractiveTx.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/channel/InteractiveTx.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/channel/InteractiveTx.kt
Outdated
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/serialization/v4/Deserialization.kt
Show resolved
Hide resolved
src/commonMain/kotlin/fr/acinq/lightning/serialization/v4/Serialization.kt
Show resolved
Hide resolved
@t-bast sorry for the delay in getting the rebased version. I'm getting an error with the I don't think it makes sense here that the checkpoint should exactly match all future states. I believe we should remove these assert lines otherwise it will always fail when we change the state data structures, even if backwards compatibility is preserved. |
Sure, modify what you need to modify to get the rebase working, and then we'll see during the review. |
b72530d
to
61f3082
Compare
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.
Looking good, I improved the tests and found a small bug in b7b4364, which you can probably apply to your branch and then squash with the existing commit?
src/commonTest/kotlin/fr/acinq/lightning/channel/states/SpliceTestsCommon.kt
Outdated
Show resolved
Hide resolved
src/commonTest/kotlin/fr/acinq/lightning/channel/states/SpliceTestsCommon.kt
Outdated
Show resolved
Hide resolved
src/commonTest/kotlin/fr/acinq/lightning/channel/states/SpliceTestsCommon.kt
Show resolved
Hide resolved
src/commonTest/kotlin/fr/acinq/lightning/channel/states/SpliceTestsCommon.kt
Outdated
Show resolved
Hide resolved
src/commonTest/kotlin/fr/acinq/lightning/channel/states/SpliceTestsCommon.kt
Outdated
Show resolved
Hide resolved
src/commonTest/kotlin/fr/acinq/lightning/channel/states/SpliceTestsCommon.kt
Outdated
Show resolved
Hide resolved
src/commonTest/kotlin/fr/acinq/lightning/channel/states/SpliceTestsCommon.kt
Outdated
Show resolved
Hide resolved
61f3082
to
699d52f
Compare
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 699d52f, let's wait to make sure liquidity ads is stable before merging this to master
, but it's looking good to me 👍
bb8f36a
to
a0d78d2
Compare
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.
LGTM!
This PR builds on splices #430 to account for pending htlcs that may exist if the channel has first negotiated quiescence #558. This PR is modeled after Eclair PR # 2720.
The helper function
makeCommitTxsWithoutHtlcs
is renamed tomakeCommitTxs
and uses the set of committed htlcs that exist whenInteractiveTxSigningSession
is instantiated for a splice.A new attribute
htlcsAmount
is added toInteractiveTxOutput.Shared
to account for the value committed to htlcs from the shared funding input but not assigned tolocalAmount
orremoteAmount
.This PR assumes the
quiescence
feature is mandatory rather than handle splices without exchangingstfu
.Updated tests for #421 with a pending splice with 5 instead of 6 htlcs maximum on each side.