Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add a bLIP for backwards-compatible inbound fees #22
base: master
Are you sure you want to change the base?
Add a bLIP for backwards-compatible inbound fees #22
Changes from 1 commit
aa0b229
dab43c2
9700967
5556f5e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
How can the node know what the rate limits are? They may be applied anywhere on the network. Or just a grace period?
Then if there are still senders who haven't received the update after the grace period, the node will start returning
fee_insufficient
and still see its reputation damaged because of its peer inbound fee update? Not sure if the incentives are properly aligned here.Does the delaying add complexity in the implementation because you need to keep track of history - potentially across restarts?
The situation that I described in the comment would be useful to add here too so that implementers understand why this is important. In the BOLTS I find that there isn't always enough rationale recorded, and it gets forgotten.
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.
That is up to individual nodes. Its deliberately phrased in terms of
channel_update
to indicate to nodes that they should use their existing rate-limiting logic they already have in place.Hmm? No, this is not the case, the downstream node now is the one that gets to send the failure message (as its the one that is spamming updates) the upstream node forwarded the HTLC with stale parameters so that it wasnt blamed.
No more than existing delays in channel_update, basically. I mostly reused the tracking logic from there.
Good point, added more details.
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.
What I mean is that a node's existing rate-limiting logic may not match what other nodes on the network do. The node broadcasts its
channel_update
, but then it is held back somewhere on the network between this node and a potential sender of a payment. How do you implement this concretely?Let's take the example A->B->C->D again. D set an inbound fee, C broadcasted a new
channel_update
.Then at some point, C receives an htlc to forward with an insufficient fee. There are two reasons why this could be:
Now what is C going to do? Return fee_insufficient and potentially damage its reputation because D wanted to change its inbound fee? Or forward an insufficient amount to D and punish D while B is at fault really.
If no node ever wants to return
fee_insufficient
, they can just keep forwarding an amount that is too small until the final destination is reached. Seems that things get a bit strange then?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.
This is no different from any other fee on the network today. Yes, there's active discussion in setting a more common rate-limit across the network, but in general senders have to be tolerant of this and recipients should expect it sometimes.
C can tell the difference, though! If B didn't forward enough to C, C will note that it didn't get enough fee compared to the forwarding instructions in the onion, and will then fail back with
fee_insufficient
.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.
The observed delay is also influenced by the peer that is charging the inbound fee for this node (grace period). If those periods don't line up, this node is going to return
fee_insufficient
and damage its reputation?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.
Ah, luckily there's a super trivial solution - wait until you also see the channel_update. I mentioned that now.
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 don't think it is that trivial at all. You can wait until you see the channel_update, but that doesn't tell you for how long your peer will underpay you to account for propagation of that update to the sender.
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.
No, it is trivial - the forwarder should wait to enforce it until it has a chance to broadcast a new
channel_update
, at which point it MUST enforce the update. The recipient/inbound-fee-setter should delay enforcement until it sees thechannel_update
+ 10 minutes (which is congruous with what it does forchannel_update
s normally). That shouldn't have any disagreement. If you prefer we could also apply the 10 minute timer on the forwarder's side, but its not a huge deal to send back the updatedchannel_update
when failing.