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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi: make legacy feature bits compulsory #8275
multi: make legacy feature bits compulsory #8275
Conversation
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.
Did a first pass, looks pretty good!
The linter/formatter CI step is failing due to a missing make fmt
run and the itests fail because of an itest case that needs to be removed. Other than that I think this is quite close already.
@ProofOfKeags, remember to re-request review from reviewers when ready |
368f7b7
to
e7baea9
Compare
701f61d
to
07103e1
Compare
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.
Looks good so far!
My main comment is regarding removing any logic that switches on LegacyPayload
.
Something I noticed in testing btw is the following:
If we have Alice running with a required bit and Bob with no knowledge of that bit, then if Alice tries to connect to Bob, the connection fails (which we expect) but if Bob tries to connect to Alice then that connection succeeds.... I think this might be incorrect behaviour. Not relevant to this PR though - just mentioning.
Just for future: it's generally good practice to make sure the CI is green before re-requesting review to help reduce the number of rounds :) There is currently a panic in the unit tests and the itests are all failing
@@ -24,7 +24,7 @@ var ( | |||
emptyFeatures = lnwire.NewFeatureVector(nil, lnwire.Features) |
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.
Did some testing with Alice running this PR and Bob running master with --protocol.legacy.onion
set and found that if Bob creates an invoice the Alice will refuse to pay it due to the face that Bob doesnt support the TLV onion option. This is expected but I think that means that we can remove a bunch of logic that switches on route.Hop.LegacyPayload
:
Lines 133 to 136 in 708bd05
// LegacyPayload if true, then this signals that this node doesn't | |
// understand the new TLV payload, so we must instead use the legacy | |
// payload. | |
LegacyPayload bool |
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.
Paging @Roasbeef to weigh in on ripping this code out.
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.
Have a slight pref for just kinda leaving it in, and also making sure the legacy protocol cfg stuff still works as well to enable, this way less sweeping itest changes are needed.
So I'm thinking:
- flip to required
- wait
- observe
- ???
- "enough time passes"
- rip out the code at the same time we start to repurpose the feature bits
173f514
to
66e3f24
Compare
847b01b
to
89afb29
Compare
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.
Two questions around interpreting @Roasbeef's comment re leaving the command line option or not.
Other than that LGTM 馃帀
06cb65c
to
5f50fe6
Compare
5b82ce4
to
dccd743
Compare
dccd743
to
721463c
Compare
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.
LGTM! 馃敟
SNED 馃殌 |
ACK 08c18a3 (post merge) |
Change Description
This PR makes some legacy feature bits compulsory. Closes #8048
var_onion_optin
gossip_queries
option_data_loss_protect
option_static_remote_key
Steps to Test
Steps for reviewers to follow to test the change.
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]
in the commit message for small changes.馃摑 Please see our Contribution Guidelines for further guidance.