-
Notifications
You must be signed in to change notification settings - Fork 491
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
Feature bit unification and renaming #571
Feature bit unification and renaming #571
Conversation
4131dfa
to
b2de709
Compare
Rename `globalfeatures` to `channelfeatures` and `localfeatures` to `nodefeatures`.
Signed-off-by: Rusty Russell <[email protected]>
You can still gossip. Signed-off-by: Rusty Russell <[email protected]>
If we really want a new gossip message which old nodes will ignore, we'll use a new type, so having it discard unknown features is overzealous. Each feature can itself specify how it's advertized here: an key-exchange-instead-of-hash-preimage feature would need to advertize as even (you need to understand it to use it), for example, but a wumbo feature would advertize as odd. Signed-off-by: Rusty Russell <[email protected]>
This lets you find out what nodes support what node features, rather than connecting and probing. Like channel_announcement, we won't use feature bits for incompatible changes; we'll use a separate type. So don't discard messages with unknown ones. Similarly, you can try to connect to a node with unknown bits; you might fail, but that's OK. Either it was an unknown node feature, and you'll find out from their init msg, or it's a channel feature and you won't be able to open a channel. Signed-off-by: Rusty Russell <[email protected]>
b2de709
to
14ced3b
Compare
I think this is a good clarification. |
As discussed in the IRC meeting, people still find the names confusing so here are my suggestions, I'll let the consensus judge if they're better or worse ;)
I'll edit this comment if I have other ideas. |
I like |
Thanks for those examples! I understand the underlying motivation now after reading through them. As for names, my vote goes for |
It seems the only "pure" link feature we have is |
I think I also think that |
As discussed on IRC, the naming that makes the most sense to me personally is:
To me |
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.
unification changes look pretty good, maybe still some bikeshedding to be done on naming tho :) i have a few other questions i've left inline
- MUST NOT parse the remainder of the message. | ||
- MAY discard the message altogether. | ||
- SHOULD NOT connect to the node. | ||
- MAY forward `node_announcement`s that contain an _unknown_ `features` _bit_, |
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 seems like a good change, we probably shouldn't be forwarding messages that we were unable to parse
@@ -316,12 +317,6 @@ The receiving node: | |||
any future fields appended to the end): | |||
- SHOULD fail the connection. | |||
- MUST NOT process the message further. | |||
- if `features` field contains _unknown even bits_: |
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.
if i understand correctly, this will removes the ability to partition the gossip network as a result of nodes not understanding an even feature bit? do we still want to retain the ability to do so via unknown TLV types?
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.
Hmm, that's an excellent question! I... don't know. Allowing "invalid" TLVs to propagate seems like a burden on implementations, but maybe it's a feature somehow?
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.
In due time we may discover, I see arguments for both sides 🤷♂️
I quite like renaming |
node+connection SGTM! |
This is 5 commits, each standalone:
"local" features only affect direct peers. That still stands, but the new names are clearer.
Note: There are still no "channel" features defined.
channelfeatures
. This justmeans you can't open a channel. Unknown node features means you can't even talk.
know to use that specific channel, or might be required, depending on the feature itself. Removes
the "don't relay these if they have an unknown feature" rule.
node_announcement
(usually as optionalfeatures, of course). This lets you find nodes with specific features.
Concrete Examples
Consider a node which supports a d-log-HTLC channel, and doesn't support legacy HTLCs on that channel:
Now, consider a node which can create wumbo (> 2^24 satoshi) channels:
Finally, consider a node which can handle wumbo HTLCs: