Skip to content
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
wants to merge 17 commits into from

Conversation

carlaKC
Copy link
Collaborator

@carlaKC carlaKC commented Jan 18, 2023

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.

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!
@saubyk 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
@carlaKC
Copy link
Collaborator Author

carlaKC commented Jul 11, 2023

Closing for now since this is just a POC, won't be actively developed anytime soon!

@carlaKC carlaKC closed this Jul 11, 2023
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants