-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
POC: Upfront Fees to Mitigate Channel Jamming #7339
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
carlaKC
force-pushed
the
jamming-upfrontfees
branch
from
January 18, 2023 20:54
0bceef6
to
9bdeb22
Compare
Add upfront fees, as parsed out of extra data TLVs, to update_add_htlc. An aliased type is used because it will later be important to be able to distinguish between a zero value and the absence of the field.
This commit adds the unconditional fees that are optionally included in UpdateAddHtlc's extra data TLVs to our payment descriptor struct and accounts for them in balance calculations for calculating our new commit view.
Refactor our payload creation to perform tlv parsing and validation in separate steps. This will become useful when we need to compare fields in our onion payload with the fields that were transmitted to us in update_add_htlc (rather than needing to pass the incoming htlc all the way down to parsing, which is a clumsy layering violation).
TODO: I haven't run through this properly, need to check each state update in more detail!
carlaKC
force-pushed
the
jamming-upfrontfees
branch
from
January 18, 2023 21:10
9bdeb22
to
4c43aed
Compare
saubyk
added
fees
Related to the fees paid for transactions (both LN and funding/commitment transactions)
channel jamming
Issues related to channel jamming mitigation
labels
Jan 19, 2023
Closing for now since this is just a POC, won't be actively developed anytime soon! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
channel jamming
Issues related to channel jamming mitigation
fees
Related to the fees paid for transactions (both LN and funding/commitment transactions)
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.
This PR is a proof of concept for the proposal outlined in lightning/bolts/pull/1052.
It needs no reviewer attention - really just squatting here to aid discussion (thanks for having me, as usual).
There are various very proof-of-concpety things about this:
But it does have an itests which passes, which is nice.