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

[NC-2110] Removed CLI options for --nodes-whitelist and --accounts-wh… #694

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import tech.pegasys.pantheon.cli.EthNetworkConfig;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -75,17 +74,6 @@ public void startNode(final PantheonNode node) {
params.add("--bootnodes");
params.add(String.join(",", node.bootnodes().toString()));

final PermissioningConfiguration permissioningConfiguration =
node.getPermissioningConfiguration();
if (permissioningConfiguration.isNodeWhitelistSet()) {
params.add("--nodes-whitelist");
params.add(String.join(",", permissioningConfiguration.getNodeWhitelist().toString()));
}
if (permissioningConfiguration.isAccountWhitelistSet()) {
params.add("--accounts-whitelist");
params.add(String.join(",", permissioningConfiguration.getAccountWhitelist().toString()));
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that we have --permissions-nodes-enabled and --permissions-accounts-enabled, we need to set those here instead

if (node.jsonRpcEnabled()) {
params.add("--rpc-enabled");
params.add("--rpc-listen");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,29 +453,6 @@ private Long configureRefreshDelay(final Long refreshDelay) {
)
private final Boolean permissionsAccountsEnabled = false;

// Permissioning: A list of whitelist nodes can be passed.
@Option(
names = {"--nodes-whitelist"},
description =
"Comma separated enode URLs for permissioned networks. "
+ "Not intended to be used with mainnet or public testnets.",
split = ",",
arity = "0..*",
converter = EnodeToURIPropertyConverter.class
)
private final Collection<URI> nodesWhitelist = null;

@Option(
names = {"--accounts-whitelist"},
paramLabel = "<hex string of account public key>",
description =
"Comma separated hex strings of account public keys "
+ "for permissioned/role-based transactions. You may specify an empty list.",
split = ",",
arity = "0..*"
)
private final Collection<String> accountsWhitelist = null;

@Option(
names = {"--privacy-url"},
description = "The URL on which enclave is running "
Expand Down
2 changes: 0 additions & 2 deletions pantheon/src/test/resources/everything_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ miner-extra-data="0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C
min-gas-price="1"

# Permissioning
accounts-whitelist=["0x0000000000000000000000000000000000000009"]
nodes-whitelist=["all"]
permissions-nodes-enabled=false
permissions-accounts-enabled=false

Expand Down