-
Notifications
You must be signed in to change notification settings - Fork 407
Replace opt_anchors
with ChannelTypeFeatures
#2361
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
Replace opt_anchors
with ChannelTypeFeatures
#2361
Conversation
If we want to do this it has to happen in 116. Its by no means blocking 116, but tagging it as 116 so that we don't forget it just by accident. Will take a look when its non-draft/CI passes. |
bf40449
to
51be419
Compare
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2361 +/- ##
==========================================
+ Coverage 90.28% 91.11% +0.82%
==========================================
Files 106 106
Lines 54323 63856 +9533
Branches 54323 63856 +9533
==========================================
+ Hits 49047 58180 +9133
- Misses 5276 5676 +400
☔ View full report in Codecov by Sentry. |
d3e1130
to
0821c74
Compare
Hey @devrandom @ksedgwic, tagging you here to let you know that this is the serialization-changing PR I was talking about. |
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.
One minor drawback of using ChannelTypeFeatures
instead of our own enum of supported channel types is that we'll store the full feature bit vector in all these different places. We're already up to 8 bytes per occurrence and it will only get bigger with new features, but not something we really need to worry about for now.
52c6e24
to
d4b6b8b
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.
This really needs to be more than one commit
It's not really super splittable. I could modify the adjusted structs one by one, but the unit test modification onus would still be quite major for each commit, and it would make less sense than modifying all six structs at once. The only thing that really lends itself to a split is the new feature and the new methods on channel type features. |
You could do some of the new utility functions separately. The biggest issue with it all being in the same commit isn't the raw diff size but more the various different changes across different files in the same commit. A commit that is super repetitive and just making the same change over and over again in a ton of places is fine, but limiting the number of different changes is good. |
a65221d
to
a602822
Compare
I will squash the last two commits into the others later. Just wanna run cloud CI first before messing up too much at once. |
869f240
to
4655816
Compare
Needs rebase now that anchors handling bits landed. |
Yeah I can see that |
4655816
to
c5b915e
Compare
Fixes #1971 |
80ec785
to
d7064c7
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.
You still have a commit which isn't word-wrapped at 60 chars.
d7064c7
to
a271abc
Compare
Specifically, introduce a new constructor for an anchors- supporting feature set, as well as methods that will maintain forwards-compatible deserialization in older versions.
a271abc
to
9abdd4c
Compare
(10, built, required), | ||
(12, htlcs, vec_type), | ||
(14, opt_anchors, option), | ||
(16, opt_non_zero_fee_anchors, option), |
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.
Won't we break VLS if they're setting this and storing them?
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.
they did say they weren't, but we should confirm @devrandom @ksedgwic
fff7da5
to
4b1f6ca
Compare
This change modifies six structs that were keeping track of anchors features with an `opt_anchors` field, as well as another field keeping track of nonzero-fee- anchor-support.
4b1f6ca
to
82b5359
Compare
This is meant to replace #2321.
Fixes #1971.