-
Notifications
You must be signed in to change notification settings - Fork 47
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
blip-0033: commit fees channel flag #33
base: master
Are you sure you want to change the base?
Conversation
7e1ef8a
to
3b7b625
Compare
Standard lightning channels require the channel opener to pay the mining fees for the commitment transaction and mutual close transaction. This requirement forces the channel opener to contribute to the funding transaction and makes it impossible to open channels by only purchasing inbound liquidity from a remote node. We want to allow nodes to opt into paying the commitment transaction fees even though they're not the channel opener.
3b7b625
to
6be0958
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.
I understand that supporting non_initiator_pays_commit_fees
is not an universal feature and could be negotiated between the two channel parties. However, given that we require that (s)ome messages that should be sent first by the channel opener are instead sent first by the node paying the commitment fees
, it seems that this is not a purely additive feature, but could interfere with other protocols/bLIPs.
Given this is a rather fundamental change regarding a major assumption of the Lightning protocol, I wonder if it would be reasonable to add this as an optional feature to the BOLTs directly rather than making it a bLIP?
That's true in theory, but in practice the risk of that should be pretty low, especially given that this bLIP is a temporary measure that won't be necessary anymore once we move to 0-fee commit txs. We can also just keep this bLIP updated whenever a feature is added to the BOLT that interferes with this bLIP, but there are none pending right now, so we're probably ok.
I'd like to avoid that since I hope we can instead switch to 0-fee commit txs and then remove this bLIP! |
I think I'm a bit more skeptical regarding the zero-fee commitment transaction timeline. Yes, first steps towards package relay will ship in Bitcoin Core 0.28, but it will be quite some time (as in multiple years, no?) until we will be able to really lean on it and actually ship, let alone require zero-fee commit txs? So, I'm not so sure how 'temporary' this change will be? And given how fundamental the change in the implementations' channel state machine/logic would be, it 'feels' to me a bit unsuited for a bLIP, but I might be wrong. |
I'd like to avoid cluttering the BOLTs with something that we know will be temporary (even if temporary means a couple of years), but if others also feel like this should be in the BOLTs, I'll move it there! |
Not sure I understand the motivation here - if you want to buy inbound liquidity, you should have the inbound-liquidity-seller initiate the channel open from the lightning PoV. I assume that that liquidity seller is also the one who will want to pay the fees. |
IIUC, this is necessary as we want to build on Liquidity Ads in which the buyer adds a |
Agreed with @tnull here, that's one of the reasons for it: in the liquidity ads flow, it's the initiator who is buying liquidity, doing it the other way around is clunky: you cannot send But that's actually what we initially tried for Phoenix: current Phoenix wallets send a |
I'm very, very, very much not a fan of touching the channel state machine just to avoid a round-trip when opening a non-JIT channel. Further, for JIT channels we need some kind of
Yea, its definitely more code to add a new place to put state while claiming a channel, but we need that for JIT flows anyway. Given that code will already exist, why not use it for the non-JIT flow and avoid the need for channel changes? |
The only thing it's changing in the channel state machine is that instead of gating operations based on whether the current node is the channel opener, you simply gate them on a different boolean that is defined immediately after exchanging open/accept (and should be stored in the static channel parameters). This is very straightforward, as the eclair PR shows! Using some kind of
It doesn't have to be that way though once we start relying on liquidity ads, which contains all the negotiation we need? That was only true when there was no dual-funding nor liquidity ads protocol available (and is why we also initially shipped with a message like this)? |
I'm quite confident it'll be similarly simple code in LDK, though not quite as trivial since we have to pipe that bool through to multiple different systems (ie off and on-chain enforcement) and serialize it everywhere, but...
Hmm? Even with liquidity ads if I want to receive a JIT channel I need to exchange some message with the LSP, telling them I want to take advantage of their liquidity offer, track the fee I committed to pay, make sure I connect to this node even though I don't have a channel with them, etc, etc. I don't see how that changes this? |
What I mean is that you don't need any custom message for all of those points outside of the official BOLT messages:
That uses the standard liquidity ads flow and doesn't require additional changes to the channel state machine. Note that this is because liquidity purchases are always driven by the user (you could also design a different scheme where liquidity decisions are driven by the LSP, but I think that only works in a model where the user pays a % fee from every HTLC they receive - which could be an interesting model, but it's not the one we chose to experiment with). |
@niftynei , @vincenzopalazzo told me that you might be the right person to give a feedback from the perspective of Core-Lightning |
After discussion at the summit we concluded that we can avoid this if we move to zero-fee commitment txn, which we agreed loosely to do. |
We will indeed be able to get rid of this with 0-fee commitment transactions. But since this is what we're currently using for Phoenix, I think it makes sense to keep the PR open so that it is specified somewhere (but no need to merge it). I'll close it when we're able to migrate to 0-fee commitment transactions. |
Standard lightning channels require the channel opener to pay the mining fees for the commitment transaction and mutual close transaction. This requirement forces the channel opener to contribute to the funding transaction and makes it impossible to open channels by only purchasing inbound liquidity from a remote node.
We want to allow nodes to opt into paying the commitment transaction fees even though they're not the channel opener.