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

Upgrade to lightning-kmp 1.8.2 #116

Merged
merged 3 commits into from
Oct 10, 2024
Merged

Upgrade to lightning-kmp 1.8.2 #116

merged 3 commits into from
Oct 10, 2024

Conversation

dpad85
Copy link
Member

@dpad85 dpad85 commented Oct 10, 2024

This PR upgrades phoenixd to use lightning-kmp v1.8.2. The main change with v1.8.0 is that the mining fee incurred by a liquidity purchase event triggered by a swap-in must be split between the two payments (lest it's counted twice).

There are side effects on other splice operations, which means we have a new localMiningFees field to store in the database.

To store this data in a backward compatible way, we do not store the local fee directly. Instead, we store the full mining fee (as before), and we retrieve the local fee by subtracting the purchase fee from the full fee.

pm47 and others added 3 commits October 10, 2024 11:27
With ACINQ/lightning-kmp#709 and
ACINQ/lightning-kmp#710, the mining
fee for liquidity events is split between local and purchase
fee. However, we don't directly store the split fees, for
backward compatibility reasons. Thus, to get the local fee
from the database, we must compute it back.
@pm47 pm47 marked this pull request as ready for review October 10, 2024 12:04
@dpad85 dpad85 changed the title Upgrade to lightning-kmp 1.8.1 Upgrade to lightning-kmp 1.8.2 Oct 10, 2024
@@ -244,6 +244,7 @@ class Phoenixd : CliktCommand() {
maxAbsoluteFee = liquidityOptions.maxMiningFee,
maxRelativeFeeBasisPoints = liquidityOptions.maxRelativeFeeBasisPoints,
skipAbsoluteFeeCheck = false,
considerOnlyMiningFeeForAbsoluteFeeCheck = true,
Copy link
Member

@pm47 pm47 Oct 10, 2024

Choose a reason for hiding this comment

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

This preserves the same behavior as before lightning-kmp 1.8.

@dpad85 dpad85 merged commit f92c6a9 into master Oct 10, 2024
@dpad85 dpad85 deleted the lightning-kmp-1.8.1 branch October 10, 2024 12:07
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.

2 participants