lnd
lnd copied to clipboard
Enforce channel disable at the link level
This PR tackles https://github.com/lightningnetwork/lnd/issues/5088
To check for disabled channel status, we append the disabled info to ForwardingPolicy on the ChannelLink config and perform a check when performing an HTLC forward.
Known Bugs To Fix
- [x]
rpcServer.UpdateChannelPolicywill reset allForwardingPolicyfor specified channels (including all channels if so set) to Disabled = false - [x]
UpdatePolicychanges occasionally are not recognized byhtlc.Switch, allowing for disabled channels to accept HTLC forwards - [x] Proper failure codes are not adequately returned to peers
Pull Request Checklist
- [X] All changes are Go version 1.15 compliant
- [x] Your PR passes all CI checks. If a check cannot be passed for a justifiable reason, that reason must be stated in the commit message and PR description.
- [X] If this is your first time contributing, we recommend you read the Code Contribution Guidelines
- [X] The code being submitted is commented according to Code Documentation and Commenting
- [X] Commits have a logical structure according to Ideal Git Commit Structure
- [X] For new code: Code is accompanied by tests which exercise both the positive and negative (error paths) conditions (if applicable)
- [X] For bug fixes: If possible, code is accompanied by new tests which trigger the bug being fixed to prevent regressions
- [X] Any new logging statements use an appropriate subsystem and logging level
- [X] For code and documentation: lines are wrapped at 80 characters (the tab character should be counted as 8 characters, not 4, as some IDEs do per default)
Visit https://dashboard.github.orijtech.com?back=0&pr=5565&remote=true&repo=arshbot%2Flnd to see benchmark details.
@arshbot just chiming in here to let you know that after you merge to master, you'll have the baseline for benchmarks to start appearing :-) If you add it for this repository you'll have all PRs automatically. Currently you won't see results for https://dashboard.github.orijtech.com/benchmark/f1a052eb498a46ccb963655f2c28a360. We plan on actually doing this automatically but that'll be added next week, thanks for trying bencher :-)
@arshbot here is an exhibit of the performance of this repo after the ~latest code at 449f207217bb9d04229c71be5ef7665549f96cd3, changed from https://github.com/lightningnetwork/lnd/commit/031d7b1d556a65d7efc993f194f624216d9f59b3
https://dashboard.github.orijtech.com/benchmark/f599c2cf80b945ef9c2444e0c866c954

I'll actually file a bug.
Wrapped all the known bugs listed initially, and addressed all PR comments. Ready for another pass!
Did another pass, couldn't find the merge commit you mentioned (maybe I unintentionally undid it? I've been rebasing like crazy) -- please confirm. In any case, I did rebase to tip.
At the point the only lingering bit is the addition of FetchOutgoingChannelEdge for unit testing purposes
Did another pass, couldn't find the merge commit you mentioned
Yeah, a rebase gets rid of such merge commits, so it's gone now :+1:
Addressed all comments, redid the commits to work itests into their proper commit messages! Anything left at this point?
Just did another pass! Was unable to get my docker setup up and running locally, so I'm relying on CI tests atm
The new itest seems to fail at the moment.
Can you re-request review once the itests are fixed please?
Sorry, wrong button.
Finally came back to this one, PTAL!
@arshbot, remember to re-request review from reviewers when ready
@arshbot, remember to re-request review from reviewers when ready
@arshbot, remember to re-request review from reviewers when ready
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity