Uh oh!
There was an error while loading. Please reload this page.
Feature bit unification and renaming - #571
Conversation
4131dfa to
b2de709CompareRename `globalfeatures` to `channelfeatures` and `localfeatures` to `nodefeatures`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
You can still gossip. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
b2de709 to
14ced3bComparet-bast
commented
May 28, 2019
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. |
rustyrussell
commented
Jul 8, 2019
I like |
Roasbeef
commented
Jul 12, 2019
Thanks for those examples! I understand the underlying motivation now after reading through them. As for names, my vote goes for |
Roasbeef
commented
Jul 12, 2019
It seems the only "pure" link feature we have is |
t-bast
commented
Jul 12, 2019
I think I also think that |
cfromknecht
commented
Jul 15, 2019
As discussed on IRC, the naming that makes the most sense to me personally is:
To me |
cfromknecht
left a comment
There was a problem hiding this comment.
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
Uh oh!
There was an error while loading. Please reload this page.
| - 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.
this seems like a good change, we probably shouldn't be forwarding messages that we were unable to parse
| 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.
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.
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.
In due time we may discover, I see arguments for both sides 🤷♂️
t-bast
commented
Aug 5, 2019
I quite like renaming |
Roasbeef
commented
Aug 8, 2019
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: