Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

added --nodes-whitelist param to CLI and NodeWhitelistController #346

Merged
merged 5 commits into from
Dec 3, 2018
Merged

added --nodes-whitelist param to CLI and NodeWhitelistController #346

merged 5 commits into from
Dec 3, 2018

Conversation

macfarla
Copy link
Contributor

@macfarla macfarla commented Dec 2, 2018

PR description

Add --nodes-whitelist parameter for permissioning.

Fixed Issue(s)

NC-1936

@CLAassistant
Copy link

CLAassistant commented Dec 2, 2018

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@lucassaldanha lucassaldanha left a 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.",
Copy link
Contributor

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

Copy link
Contributor Author

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"

@ajsutton ajsutton added the enhancement New feature or request label Dec 2, 2018
Copy link
Contributor

@lucassaldanha lucassaldanha left a 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"};
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macfarla macfarla merged commit e3a58b6 into PegaSysEng:master Dec 3, 2018
@macfarla macfarla deleted the NC-1936-whitelist-nodes branch December 3, 2018 02:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request permissioning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants