Closed otherview closed 2 months ago
Attention: Patch coverage is 5.26316%
with 36 lines
in your changes are missing coverage. Please review.
Project coverage is 61.35%. Comparing base (
2441238
) to head (12816f0
).
Files | Patch % | Lines |
---|---|---|
cmd/thor/utils.go | 0.00% | 34 Missing :warning: |
cmd/thor/main.go | 0.00% | 1 Missing :warning: |
p2psrv/server.go | 66.66% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
heya, do we need up update any README or docs.vechain.org for this?
We already have a --bootnode
flag that does part of the feature but does not limit other connections. I would consider adding a new flag --no-discovery
that disables the discovery feature.
As the --bootnode
flag indicates bootstrapping/discovery node, might not be ideal to indicate that it's the nodes that used to be connecting via peer-to-peer network, a new flag can be added for the designated feature.
And for the --no-discovery
option, I think it's better to be a hidden flag, as it won't be a general usage and shouldn't be used in general cases.
Myself and @libotony did a pair-prog on this, due to flag behaviours we ended up agreeing on allow-peers-only
as a flag that only allows connectivity to certain peers.
The TLDR is that --no-discovery + --bootnodes in certain cases can still allow connections to other nodes.
Myself and @libotony did a pair-prog on this, due to flag behaviours we ended up agreeing on
allow-peers-only
as a flag that only allows connectivity to certain peers.The TLDR is that --no-discovery + --bootnodes in certain cases can still allow connections to other nodes.
About the last line, is it because this is only an outgoing connection restricted list and so it doesn't imply that another node could start an incoming connection with the node (even if not in the allow-peers flag)?
Description
Adds a new flag that limits the connections of a node. This features help and allows for a few features like bootstrapping to be limited to a single node (good for metrics), DMZ's and traffic-shapping in general is now easier.
Flags accept a list of enodes :
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?