-
Notifications
You must be signed in to change notification settings - Fork 378
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
Rename instances of is_public
to is_announced
#3257
Rename instances of is_public
to is_announced
#3257
Conversation
fd416ea
to
564cdb1
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3257 +/- ##
==========================================
+ Coverage 89.82% 90.92% +1.10%
==========================================
Files 125 126 +1
Lines 102867 112889 +10022
Branches 102867 112889 +10022
==========================================
+ Hits 92398 102646 +10248
+ Misses 7753 7725 -28
+ Partials 2716 2518 -198 ☔ View full report in Codecov by Sentry. |
Maybe |
Mh, true, but it's referred to announced channels in the spec and in many other places, so introducing yet another terminology might also lead to more confusion? FWIW, if we want to go this direction |
I feel like "public channels" is much more common terminology (outside the spec, maybe) than "announced channels", but we shouldn't worry too much about the common name here, IMO, though we should note the other names in documentation. |
would differently named accessor methods help that simply return the same variable? Though it might either make using the API simpler, or more confusing. |
Alright. I think I'd prefer
I don't think so: we try to improve clarity by reducing the use of misleading terminology. Just allowing all ways just makes it more ambiguous/confusing, IMO. |
Referring to announced/unannounced channels as 'public'/'private' regularly leads to confusion on what they are and when which should be used. To avoid perpetuating this confusion, we should avoid referring to announced channels as 'public' in our API. Here we rename the recently introduced field in `OpenChannelRequest` (which doesn't break released API), and will align the pre-existing instances of `is_public` in the following commit (which will break API).
564cdb1
to
ae47e47
Compare
Rebased on |
Referring to announced/unannounced channels as 'public'/'private' regularly leads to confusion on what they are and when which should be used. To avoid perpetuating this confusion, we should avoid referring to announced channels as 'public' in our API. Here we rename `ChannelDetails::is_public` (which breaks previously-released API) to align it with the changes in `OpenChannelRequest`.
ae47e47
to
b3abb19
Compare
IMO, |
Yea, is_forwarding sounds fine to me too.
Right, but the fact that its gossipsed is a side-effect of the fact that the channel intends to route payments for others, not the other way around.
Sounds like we should unify around one term and use it consistently everywhere :)
Hmm, not sure either, but pretty sure I've heard "public channel" and "public node" most commonly, so if we want to go based on "common parlance" we should probably stick to the way it is now. That said, I'm not sure we should go based on "common parlance" as long as its understandable to people who are used to lightning terminology. We should generally prefer the clearest terms, IMO.
Hmm, but if you're "forwarding" a payment, you're definitely not doing it for yourself? You're clearly forwarding for someone else.
I disagree with this - you can have a node that has "forwarding" channels and non-"forwarding" channels on the same node (though its not particularly common). "Public"/"announced" could describe a node (i.e. it has more than zero channels which are gossiped, making the node publicly visible), too. I think one argument for public/announced over routing/forwarding for a channel is that you can disable routing/forwarding for a public/announced channel by setting the fees to infinite, though that's maybe also a reason why we shouldn't call it public/announced - we should discourage people from announcing channels that aren't going to forward. |
How are you defining "forwarding"? Or more specifically, when is a channel not a forwarding channel? If a node has only one channel, and that channel is announced, is that a forwarding channel? |
In this case a channel is not a "forwarding" channel if we will not accept HTLCs to it. Though I guess its a bit more complicated based on Maybe
You can happily forward over a single channel, not sure why you would, but I do see HTLCs occasionally come into my node from one peer and go straight back out the same channel. |
Alright, excuse the delay here. I personally would prefer to change
Yes, I strongly agree with this, and this PR is one step towards discouraging it further. I think we really want to make it clear that you have no business announcing channels unless you intend to run a 24/7 LSP or forwarding node and that doing so could have a series of repercussions that aren't immediately clear. So, with some time passed, how do we conclude @TheBlueMatt, @jkczyz? Leave it |
My 2 cents is that Either way, we need to just stick with one term throughout the project as Matt pointed out. |
Maybe |
I'm ok with this too. |
@TheBlueMatt FYI this is not entirely accurate since one can forward through an unannounced channel if the two nodes have another announced channel. (IIRC the name is non-strict forwarding.) Last time I checked (several years ago) it was supported by LND and Eclair.
There's currently incentive to announce channels even if you're doing shitty forwarding job to gain plausible deniability since then it's much harder for neighboring nodes to identify your payments. So if you want to discourage people from announcing them you need to figure out how to avoid leaking information by using unannounced channels. |
Yes, I mentioned this above (in LDK its controlled by
Sure, there may be routing nodes that are bad because they want to be a routing node for plausible deniability, but they're still routing, and the announcement is for the routing thing, not for the privacy. The privacy comes from the routing. |
That's a good point that the better you forward the more privacy you gain. Still it sucks that this is required. I was thinking that wallets could open channels to multiple LSPs and use some kind of service where they occasionally interactively ask "privacy providers" to route through them by giving them routing hints to confuse the LSPs (assuming no two nodes are cooperating on breaking the privacy of the user). |
If you're just looking for plausible deniability you could just announce and be a "normal" routing node but fail usually....but also please please don't do that. Flooding the network with garbage "routing" nodes is really bad for the network. |
Exactly, and that's why I don't want people to do it, so I was trying to come up with other solutions. (Also ideally LN should be robust against this kind of griefing but I understand it's hard.) |
Lightning nodes with proper graph-scoring datasets are robust against it, but its still noise that probers have to ignore and more crap....anyway, all the more reason I think the naming here should focus on "routing" not public/announced :) |
Maybe "spamming" ;) But more seriously "gossiped"? |
The point of gossip is for routing...if you're not routing, you're spamming, and our documentation should nudge users towards not doing that :) |
I'm in favor of keeping
I'm not sure introducing new terminology helps, TBH. The "for forwarding" clarification can just be included in the docs, IMO. When helping a user debug an issue, I'm going to ask if they have an "announced channel", not a "channel announced for forwarding." |
After the interaction with @Kixunil above I feel even more confident that we shouldn't just call it announced. Documentation or not, people read based on what the variable names are, and calling these things "announced" is a misnomer that gives the wrong impression of what the thing is for. I don't think common terminology is the right way to decide naming, but rather whether it is the clearest name that correctly communicates the intent and won't confuse people (eg by being toooo far from common terminology). |
The misleading thing about other names is that |
But what exactly is the wrong impression that is given? |
It implies a specific kind of !forwarding - !forwarding for a third party (though it may still forward to or from the channel, but only "for" that channel). I dunno how to properly communicate that, though...
That the intent here is to announce the channel and that you might want to announce the channel for various reasons. The intent of a channel announcement, and the only reason you should ever announce a channel, is to forward payments for unrelated third parties over that channel. Once you've decided to forward payments over the channel, announcement is just a byproduct. |
The name |
Hmm, well I guess in theory there could be some other kind of announcement, but currently there isnt :). As for |
Non-strict forwarding is forwarding for a third party though. Though I now realized why there's confusion. I think |
By "for a third party" I mean "neither the sender nor recipient of the payment are the channel counterparty". |
In this context we always know the channel is ours. If the channel isn't ours, then its in our network graph and by definition publicly announced :) |
IIRC non-strict forwarding allows it.
Haven't looked into the code and I assumed the case when you know about a channel from routing hints exists. |
I'm not referring to another type of announcement, just the reason for it. A value of false doesn't preclude that the node was announced for a different reason from the reader's perspective. |
In theory, yes, in practice, its not ever done.
Right, and that's precisely the misconception we should counter here. If they're doing it for some other reason, they're wrong, and they actually did it for forwarding :). |
But can you see how a value of |
Right, but if I were confused about it, I'd assume there would be some |
I'm sympathetic to the argument of having |
So, to summarize, we so far discussed the following alternatives and people voiced their support for: keep Let me know if I misrepresented/forgot something, but at least by number of votes |
Every name is fine for me, I think we should just make more docs (if there are no already) about the field and maybe add a separate section that describes a little bit what is the "public/announced" definition. From my point of view, I think in this case is hard to define what is confusing the user, because (sorry if am missing some previous message) we do not know what is the kind of user and if it has some previous familiarity with other lightning implementation. e.g: if I am a core lightning user I am used to opening a private channel, not a not announced channel. So for this kind of user |
Also use |
f81fc40
to
b8190ab
Compare
As discussed offline, I now added a commit renaming Didn't touch other fields (as for example |
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. Please squash.
.. we rename the flag configuring whether we announce a channel or not.
8a2b3ed
to
5928063
Compare
Squashed without further changes. |
Referring to announced/unannounced channels as 'public'/'private' regularly leads to confusion on what they are and when which should be used. To avoid perpetuating this confusion, we should avoid referring to announced channels as 'public' in our API.
Here we rename the recently introduced field in
OpenChannelRequest
(which doesn't break released API), and align the pre-existing instances ofis_public
in the following commit (which breaks API).Tagging this 0.0.124 as this is just a minor change and doing it before the changes from #3019 ship would be nice.