POC: Upfront Fees to Mitigate Channel Jamming#7339
Closed
carlaKC wants to merge 17 commits intolightningnetwork:masterfrom
Closed
POC: Upfront Fees to Mitigate Channel Jamming#7339carlaKC wants to merge 17 commits intolightningnetwork:masterfrom
carlaKC wants to merge 17 commits intolightningnetwork:masterfrom
Conversation
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!
9bdeb22 to
4c43aed
Compare
Collaborator
Author
|
Closing for now since this is just a POC, won't be actively developed anytime soon! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.