-
Notifications
You must be signed in to change notification settings - Fork 37.7k
doc: Better document features of feelers #19958
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
doc: Better document features of feelers #19958
Conversation
50a89f4
to
1cc4b92
Compare
Not quite sure what the travis error is. It produces a huge log while executing the diff script though, maybe it's sending output to stdout accidentally or such? |
5589252
to
e895da0
Compare
It seems this unconditionally renames all uses of "feeler" to "probe". How does that clarify anything? |
The |
e895da0
to
7a8dbdf
Compare
|
Concept ACK: disambiguation is good |
I'm definitely in favor of fixing the documentation- thanks :) I'm not entirely convinced about the rename. I understand how its confusing with the context of terminology presented in the paper, but from a codebase perspective it doesn't feel super different to say "probes have two functions" vs "feelers have two functions". If the goal of the rename to disambiguate, why not separate the two? |
"feelers have two functions" is incorrect because the paper which is often referred to (and introduced them) says that feelers have 1 function. Also, just by meaning, imo "feeler" well describes the first feature and not the second.
You suggesting having 2 ConnTypes? I don't see a problem with having PROBE allowing both features, let's just not call them feelers, as per above. If we have 2 ConnTypes, it will be |
Agree here, I think as long as the same concept is used, and documented, consistently, it's good. You could, for example, add a note in a comment that it's referred to differently in the paper. Splitting the ConnTypes into more specific cases would also be acceptable, if it clarifies things. A wholesale search/replace over the source code is not the kind of change we usually merge. For example it causes conflicts with other PRs that make more significant changes. |
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.
I think this is confusing for now to have a connection type bearing both the name of a first function and also executing a second different function. It would be better to move towards the paper as these connection strategies design goals are clearly explained there. I'm fine with the current renaming as a way to dissociate ambiguity.
Note, introducing yet another connection type (ConnectionType::TEST_COLLISION
) would work too but I fear the proliferation of connection types in the near-term (like anchors, negotiated-block-relay-only, ...) might hinder the code clarification improvement from the connection refactor.
src/net.cpp
Outdated
} else if (nTime > next_probe_time) { | ||
next_probe_time = PoissonNextSend(nTime, PROBE_INTERVAL); | ||
conn_type = ConnectionType::PROBE; | ||
make_probe = true; |
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.
I've already made the point elsewhere that it would be better to use IsProbeConn()
here. We can't right now because type asserting methods are part of CNode
not ConnectionType
but maybe we could move them there and make CConnman
a friend class ? Just saying if you have room somewhere on one of your PRs :)
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.
ACK 7a8dbdf
I think this is an improvement on its own, and separating them into two connection types might be a further improvement for observing and testing them.
I don't have a strong opinion on renaming feeler to probe. I just to provide some background on why I decided to reuse feeler connections for test-before-evict.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
7a8dbdf
to
aa64b59
Compare
Since there was a significant hesitation to renaming enums, and even more hesitation to splitting the enums into two, I'd just take the least intrusive approach: just improve the documentation. We can make those other clarifications later, although keep in mind it's better be done before exposing conn-types in RPC. So if you strongly want to see those changes, please let us know (maybe once again?). |
aa64b59
to
ed737a9
Compare
ed737a9
to
2ea62ca
Compare
ACK 2ea62ca |
ACK 2ea62ca. thank you! |
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 change does a better job explaining feeler connections
@sdaftuar do you have an opinion here? |
utACK, looks good to me. |
2ea62ca Improve docs about feeler connections (Gleb Naumenko) Pull request description: "feeler" and "test-before-evict" are two different strategies suggest in [Eclipse Attacks on Bitcoin’s Peer-to-Peer Network](https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-heilman.pdf). In our codebase, we use `ConnType::FEELER` to implement both. It is confusing, up to the point that our documentation was just incorrect. This PR: - ~clarifies this aspect by renaming "ConnType::FEELER" to "ConnType::PROBE", meaning that this connections only probes that the node is operational, and then disconnects.~ - fixes the documentation ACKs for top commit: amitiuttarwar: ACK 2ea62ca. thank you! practicalswift: ACK 2ea62ca Tree-SHA512: c9c03c09eefeacec28ea199cc3f697b0a98723f2f849f7a8115edc43791f8165e296e0e25a82f0b5a4a781a7de38c8954b48bf74c714eba02cdc21f7460673e5
Summary: This is a backport of [[bitcoin/bitcoin#19958 | core#19958]] Test Plan: proof-reading Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10402
"feeler" and "test-before-evict" are two different strategies suggest in Eclipse Attacks on Bitcoin’s Peer-to-Peer Network. In our codebase, we use
ConnType::FEELER
to implement both.It is confusing, up to the point that our documentation was just incorrect.
This PR:
clarifies this aspect by renaming "ConnType::FEELER" to "ConnType::PROBE", meaning that this connections only probes that the node is operational, and then disconnects.