-
Notifications
You must be signed in to change notification settings - Fork 130
added --nodes-whitelist param to CLI and NodeWhitelistController #346
Conversation
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 raised a few points for discussion.
names = {"--nodes-whitelist"}, | ||
paramLabel = "<enode://id@host:port>", | ||
description = | ||
"Comma separated enode URLs for Permissioned networks. " + "Default is an empty list.", |
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.
It might be just me, but 'Default is an empty list' gives me a false impression that the default behaviour is not whitelisting anyone, therefore, not talking to any node. If the user doesn't use the 'nodes-whitelist' property, we won't do any permissioning.
Do you think this can be misleading or is it just me? :P
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.
it now says "you may specify an empty list"
pantheon/src/main/java/tech/pegasys/pantheon/controller/NodeWhitelistController.java
Show resolved
Hide resolved
...e/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/PermissioningConfiguration.java
Show resolved
Hide resolved
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. I've got one question related to the validation of the enode URL format.
|
||
@Test | ||
public void setNodeWhitelist() { | ||
final String[] nodes = {"enode://001@123:4567", "enode://002@123:4567", "enode://003@123:4567"}; |
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.
Question: should we validate if the enode in the config file is valid? We are planning to validate it in the JSON-RPC API so maybe it makes sense to do the same when reading from the file.
Thoughts?
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.
PR description
Add --nodes-whitelist parameter for permissioning.
Fixed Issue(s)
NC-1936