-
Notifications
You must be signed in to change notification settings - Fork 36.4k
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
p2p: standardize outbound full/block relay connection type naming #20729
Conversation
Concept ACK: consistent is better than inconsistent |
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. |
59c288a
to
0d4926c
Compare
rebased |
@@ -31,7 +31,7 @@ | |||
|
|||
const std::vector<std::string> CONNECTION_TYPE_DOC{ | |||
"outbound-full-relay (default automatic connections)", | |||
"block-relay-only (does not relay transactions or addresses)", | |||
"outbound-block-relay (does not relay transactions or addresses)", |
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 might be easier to confuse with peers that request blocks only (#20726)
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.
Yes, the script can be updated depending on what is decided there.
While doing this, I wonder if it would make sense to also standardise the prefix (eg, "outbound-feeler") |
0d4926c
to
4c8605b
Compare
Rebased.
Yes, on the user-facing side, that may be where it's heading. For instance, in #20764 the |
🕵️ @fanquake @harding @jonasschnelli @sipa @hebasto have been requested to review this pull request as specified in the REVIEWERS file. |
de0f38d
to
bb9f28e
Compare
Had to update the script for other changes per The script may be verified locally with |
bb9f28e
to
2645217
Compare
Rebased following the merge of #20828. The script may be verified locally with
|
-BEGIN VERIFY SCRIPT- s() { git grep -l "$1" src test/functional doc/files.md doc/reduce-*.md | xargs sed -i "s/$1/$2/g"; } s 'ConnectionType::OUTBOUND ' 'ConnectionType::OUTBOUND_FULL_RELAY ' s 'IsFullOutboundConn' 'IsOutboundFullRelayConn' s 'GetExtraFullOutboundCount' 'GetExtraOutboundFullRelayCount' s 'full_outbound_peers' 'outbound_full_relay_peers' s 'GetTryNewOutboundPeer' 'GetTryNewOutboundFullRelayPeer' s 'SetTryNewOutboundPeer' 'SetTryNewOutboundFullRelayPeer' s 'm_try_another_outbound_peer' 'm_try_another_outbound_full_relay_peer' s 'outbound (full-relay)' 'outbound-full-relay' s 'outbound full-relay' 'outbound-full-relay' s 'outbound, full-relay' 'outbound-full-relay' s 'outbounds' 'outbound-full-relay connections' s 'f"outbound: ' 'f"outbound-full-relay: ' s ' full-relay' ' outbound-full-relay' s 'to an extra outbound peer' 'to an extra outbound-full-relay peer' s 'try another outbound peer' 'try another outbound-full-relay peer' s '(tx, block, addr) outbound' '(tx, block, addr)' s 'we deal with extra outbound peers' 'we deal with extra outbound-full-relay peers' s 'outbound peers we have in excess' 'outbound-full-relay peers we have in excess' s 'some outbound connections are not' 'some outbound-full-relay connections are not' s 'or this is a' 'or if this is an' s 'ConnectionType::BLOCK_RELAY' 'ConnectionType::OUTBOUND_BLOCK_RELAY' s ' BLOCK_RELAY' ' OUTBOUND_BLOCK_RELAY' s 'IsBlockOnlyConn' 'IsOutboundBlockRelayConn' s 'GetExtraBlockRelayCount' 'GetExtraOutboundBlockRelayCount' s 'block_relay_peers' 'outbound_block_relay_peers' s 'MAX_BLOCK_RELAY_ONLY_ANCHORS' 'MAX_OUTBOUND_BLOCK_RELAY_ANCHORS' s 'MAX_BLOCK_RELAY_ONLY_CONNECTIONS' 'MAX_OUTBOUND_BLOCK_RELAY_CONNECTIONS' s 'EXTRA_BLOCK_RELAY_ONLY_PEER_INTERVAL' 'EXTRA_OUTBOUND_BLOCK_RELAY_PEER_INTERVAL' s 'm_start_extra_block_relay_peers' 'm_start_extra_outbound_block_relay_peers' s 'outgoing block-relay-only' 'outbound-block-relay' s 'outbound block-relay-only' 'outbound-block-relay' s 'outbound block-relay' 'outbound-block-relay' s 'block-relay only outbound' 'outbound-block-relay' s 'block-relay-only outgoing' 'outbound-block-relay' s 'block-relay only peers' 'outbound-block-relay peers' s 'block-relay-only' 'outbound-block-relay' s ' a outbound' ' an outbound' -END VERIFY SCRIPT-
2645217
to
c3e3a16
Compare
6th rebase. The scripted diff may be verified locally with:
Thanks @ariard for the review! I'd be happy to do @luke-jr's suggestion in a follow-up. This patch requires frequent rebasing, so if anyone is against it or would like it to be modified (e.g. to some other naming), please LMK (I won't bite 🐕) to economize rebasing it into the void of the abyss 🌌 |
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
Code Review ACK c3e3a16 |
Lack of rebase is blocking my re-review of this PR :) |
Thanks everyone for the reviews and ACKs but this commit continually needs rebasing and the issue and diff have become too large without separating this into smaller changes. Up for grabs or maybe will re-open as smaller changes but I'm not sure there is enough support to fix/clean this up. |
We've accumulated many different ways of referring to outbound full relay and outbound block relay connection types in the codebase. In places, it is becoming less clear which type of connection is referred to. This PR proposes standardizing the naming to
outbound-{full, block}-relay
with a scripted diff as follows: