You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We replace the previous pay-to-open protocol with a new protocol that
only relies on liquidity ads for paying fees. We simply transmit HTLCs
that cannot be relayed on existing channels with a new message called
`will_add_htlc` that contains all the HTLC data.
The recipient can verify that the HTLC that would match this promise is
valid, and if it wishes to accept that payment, it can trigger a channel
open or a splice to purchase the required inbound liquidity. Once that
transaction completes, the sender will relay HTLCs matching the proposed
`will_add_htlc`, which completes the payment.
If the fees for the inbound liquidity purchase couldn't be paid from the
previous channel balance, they can be taken from the HTLCs relayed after
the funding transaction. When that happens, one side needs to trust that
the other will comply. Each side can independently configure the options
they're comfortable with, depending on whether they trust their peer or
not.
Copy file name to clipboardExpand all lines: src/commonMain/kotlin/fr/acinq/lightning/NodeParams.kt
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -176,6 +176,8 @@ data class NodeParams(
176
176
require(!features.hasFeature(Feature.ZeroConfChannels)) { "${Feature.ZeroConfChannels.rfcName} has been deprecated: use the zeroConfPeers whitelist instead" }
177
177
require(!features.hasFeature(Feature.TrustedSwapInClient)) { "${Feature.TrustedSwapInClient.rfcName} has been deprecated" }
178
178
require(!features.hasFeature(Feature.TrustedSwapInProvider)) { "${Feature.TrustedSwapInProvider.rfcName} has been deprecated" }
179
+
require(!features.hasFeature(Feature.PayToOpenClient)) { "${Feature.PayToOpenClient.rfcName} has been deprecated" }
180
+
require(!features.hasFeature(Feature.PayToOpenProvider)) { "${Feature.PayToOpenProvider.rfcName} has been deprecated" }
179
181
Features.validateFeatureGraph(features)
180
182
}
181
183
@@ -197,15 +199,15 @@ data class NodeParams(
197
199
Feature.RouteBlinding to FeatureSupport.Optional,
198
200
Feature.DualFunding to FeatureSupport.Mandatory,
199
201
Feature.ShutdownAnySegwit to FeatureSupport.Mandatory,
202
+
Feature.Quiescence to FeatureSupport.Mandatory,
200
203
Feature.ChannelType to FeatureSupport.Mandatory,
201
204
Feature.PaymentMetadata to FeatureSupport.Optional,
202
205
Feature.ExperimentalTrampolinePayment to FeatureSupport.Optional,
203
206
Feature.ZeroReserveChannels to FeatureSupport.Optional,
204
207
Feature.WakeUpNotificationClient to FeatureSupport.Optional,
205
-
Feature.PayToOpenClient to FeatureSupport.Optional,
206
208
Feature.ChannelBackupClient to FeatureSupport.Optional,
207
209
Feature.ExperimentalSplice to FeatureSupport.Optional,
208
-
Feature.Quiescence to FeatureSupport.Mandatory
210
+
Feature.OnTheFlyFunding to FeatureSupport.Optional,
Copy file name to clipboardExpand all lines: src/commonMain/kotlin/fr/acinq/lightning/channel/ChannelException.kt
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,8 @@ data class ToSelfDelayTooHigh (override val channelId: Byte
28
28
data classMissingLiquidityAds (overridevalchannelId:ByteVector32) : ChannelException(channelId, "liquidity ads field is missing")
29
29
data classInvalidLiquidityAdsSig (overridevalchannelId:ByteVector32) : ChannelException(channelId, "liquidity ads signature is invalid")
30
30
data classInvalidLiquidityAdsAmount (overridevalchannelId:ByteVector32, valproposed:Satoshi, valmin:Satoshi) : ChannelException(channelId, "liquidity ads funding amount is too low (expected at least $min, got $proposed)")
31
+
data classUnexpectedLiquidityAdsFundingFee (overridevalchannelId:ByteVector32, valfundingTxId:TxId) : ChannelException(channelId, "unexpected liquidity ads funding fee for txId=$fundingTxId (transaction not found)")
32
+
data classInvalidLiquidityAdsFundingFee (overridevalchannelId:ByteVector32, valfundingTxId:TxId, valpaymentHash:ByteVector32, valexpected:Satoshi, valproposed:MilliSatoshi) : ChannelException(channelId, "invalid liquidity ads funding fee for txId=$fundingTxId and paymentHash=$paymentHash (expected $expected, got $proposed)")
31
33
data classChannelFundingError (overridevalchannelId:ByteVector32) : ChannelException(channelId, "channel funding error")
32
34
data classRbfAttemptAborted (overridevalchannelId:ByteVector32) : ChannelException(channelId, "rbf attempt aborted")
33
35
data classSpliceAborted (overridevalchannelId:ByteVector32) : ChannelException(channelId, "splice aborted")
data classNotEnoughFunding(valfundingAmount:Satoshi, valnonFundingAmount:Satoshi, valprovidedAmount:Satoshi) : FundingContributionFailure() { overridefuntoString(): String="not enough funds provided (expected at least $fundingAmount + $nonFundingAmount, got $providedAmount)" }
230
-
data classNotEnoughFees(valcurrentFees:Satoshi, valexpectedFees:Satoshi) : FundingContributionFailure() { overridefuntoString(): String="not enough funds to pay fees (expected at least $expectedFees, got $currentFees)" }
0 commit comments