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

Nc 1942 Add account whitelisting and refactor into permissioning package #460

Merged
merged 40 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
334ced0
WS sync subscription delay added
Shinabyss Dec 4, 2018
7b52fd4
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 4, 2018
4acf4cf
WS sync subscription delay added with unit testing
Shinabyss Dec 9, 2018
0d517ba
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 9, 2018
1db0792
WS sync subscription delay added with unit testing
Shinabyss Dec 9, 2018
189b25a
Merge branch 'master' into NC-1361
Shinabyss Dec 10, 2018
462536b
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 10, 2018
3295b21
changed number to a constant in constructor
Shinabyss Dec 10, 2018
609cf0c
Merge remote-tracking branch 'origin/NC-1361' into NC-1361
Shinabyss Dec 10, 2018
ae5e2ce
Use default from websocket class instead of making new one
Shinabyss Dec 10, 2018
7b90fea
Merge branch 'master' into NC-1361
Shinabyss Dec 10, 2018
931af28
Merge branch 'master' into NC-1361
Shinabyss Dec 10, 2018
113ba99
Removed magic numbers
Shinabyss Dec 10, 2018
f8dcba8
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 10, 2018
35d3e7d
Merge remote-tracking branch 'origin/NC-1361' into NC-1361
Shinabyss Dec 10, 2018
00497f2
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 11, 2018
d7e5519
Added Controller
Shinabyss Dec 11, 2018
011b93d
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 12, 2018
3971892
Refactor permissioning config and account whitelist into permissionin…
Shinabyss Dec 18, 2018
677f511
Refactor permissioning config and account whitelist into permissionin…
Shinabyss Dec 18, 2018
5ac5f04
Refactor permissioning config and account whitelist into permissionin…
Shinabyss Dec 18, 2018
a0fa0d2
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 18, 2018
9afbde7
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 18, 2018
8d6d97d
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 18, 2018
e270cf9
Iron out merge conflict introduced bugs
Shinabyss Dec 18, 2018
d94d186
Iron out merge conflict introduced bugs
Shinabyss Dec 19, 2018
6d65170
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 19, 2018
54e5235
Iron out merge conflict introduced bugs
Shinabyss Dec 19, 2018
2cbd358
PR Change request actioned
Shinabyss Dec 19, 2018
f388b41
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 19, 2018
8e5b91e
PR Change request actioned
Shinabyss Dec 19, 2018
1690f21
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 20, 2018
1cf498e
PR Change request actioned
Shinabyss Dec 20, 2018
0715b2d
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 20, 2018
1e57049
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 20, 2018
2e9804d
PR Change request actioned
Shinabyss Dec 20, 2018
3b6f92b
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 20, 2018
26f83ed
updated node whitelist acceptance test to conform to refactored permi…
Shinabyss Dec 20, 2018
bc1f782
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
Shinabyss Dec 20, 2018
bacf2cb
text change
Shinabyss Dec 20, 2018
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
2 changes: 1 addition & 1 deletion acceptance-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
testImplementation project(':ethereum:core')
testImplementation project(':ethereum:blockcreation')
testImplementation project(':ethereum:jsonrpc')
testImplementation project(':ethereum:p2p')
testImplementation project(':ethereum:permissioning')
testImplementation project(':metrics')
testImplementation project(':pantheon')
testImplementation project(':util')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import tech.pegasys.pantheon.ethereum.core.Util;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.Condition;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.PantheonWeb3j;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transaction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import tech.pegasys.pantheon.ethereum.core.MiningParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.GenesisConfigProvider;

class PantheonFactoryConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import tech.pegasys.pantheon.ethereum.core.MiningParametersTestBuilder;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.GenesisConfigProvider;

import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.RunnableNode;

Expand Down
1 change: 1 addition & 0 deletions ethereum/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
implementation project(':crypto')
implementation project(':ethereum:rlp')
implementation project(':ethereum:trie')
implementation project(':ethereum:permissioning')
implementation project(':metrics')
implementation project(':services:kvstore')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator;
import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason;
import tech.pegasys.pantheon.ethereum.mainnet.ValidationResult;
import tech.pegasys.pantheon.ethereum.permissioning.AccountWhitelistController;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
import java.util.Set;

import org.apache.logging.log4j.Logger;
Expand All @@ -47,6 +49,7 @@ public class TransactionPool implements BlockAddedObserver {
private final ProtocolSchedule<?> protocolSchedule;
private final ProtocolContext<?> protocolContext;
private final TransactionBatchAddedListener transactionBatchAddedListener;
private Optional<AccountWhitelistController> accountWhitelistController = Optional.empty();

public TransactionPool(
final PendingTransactions pendingTransactions,
Expand Down Expand Up @@ -131,6 +134,13 @@ private ValidationResult<TransactionInvalidReason> validateTransaction(
return basicValidationResult;
}

String sender = transaction.getSender().toString();
if (accountIsNotWhitelisted(sender)) {
return ValidationResult.invalid(
TransactionInvalidReason.TX_SENDER_NOT_AUTHORIZED,
String.format("Sender %s is not on the Account Whitelist", sender));
}

final BlockHeader chainHeadBlockHeader = getChainHeadBlockHeader();
if (transaction.getGasLimit() > chainHeadBlockHeader.getGasLimit()) {
return ValidationResult.invalid(
Expand All @@ -147,6 +157,20 @@ private ValidationResult<TransactionInvalidReason> validateTransaction(
pendingTransactions.getNextNonceForSender(transaction.getSender()));
}

private boolean accountIsNotWhitelisted(final String account) {
if (useWhitelist()) {
if (!accountWhitelistController.get().contains(account)) {
return true;
}
}
return false;
}

public boolean useWhitelist() {
return (accountWhitelistController.isPresent()
&& accountWhitelistController.get().isAccountWhiteListSet());
}

private Account getSenderAccount(
final Transaction transaction, final BlockHeader chainHeadHeader) {
final WorldState worldState =
Expand All @@ -163,4 +187,8 @@ public interface TransactionBatchAddedListener {

void onTransactionsAdded(Iterable<Transaction> transactions);
}

public void setAccountWhitelist(AccountWhitelistController accountWhitelist) {
accountWhitelistController = Optional.of(accountWhitelist);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ enum TransactionInvalidReason {
NONCE_TOO_LOW,
INCORRECT_NONCE,
INTRINSIC_GAS_EXCEEDS_GAS_LIMIT,
EXCEEDS_BLOCK_GAS_LIMIT
EXCEEDS_BLOCK_GAS_LIMIT,
TX_SENDER_NOT_AUTHORIZED
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import static org.mockito.Mockito.when;
import static tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason.EXCEEDS_BLOCK_GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason.NONCE_TOO_LOW;
import static tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason.TX_SENDER_NOT_AUTHORIZED;
import static tech.pegasys.pantheon.ethereum.mainnet.ValidationResult.valid;

import tech.pegasys.pantheon.crypto.SECP256K1.KeyPair;
Expand All @@ -40,6 +41,7 @@
import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSpec;
import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator;
import tech.pegasys.pantheon.ethereum.mainnet.ValidationResult;
import tech.pegasys.pantheon.ethereum.permissioning.AccountWhitelistController;
import tech.pegasys.pantheon.util.uint.UInt256;

import java.util.List;
Expand Down Expand Up @@ -70,6 +72,8 @@ public class TransactionPoolTest {
private final Transaction transaction2 = createTransaction(2);
private TransactionPool transactionPool;
private long genesisBlockGasLimit;
private final AccountWhitelistController accountWhitelistController =
mock(AccountWhitelistController.class);

@Before
public void setUp() {
Expand Down Expand Up @@ -355,6 +359,45 @@ public void shouldNotNotifyBatchListenerIfNoTransactionsAreAdded() {
verifyZeroInteractions(batchAddedListener);
}

@Test
public void shouldAllowWhitelistedTransactionWhenWhitelistEnabled() {
transactionPool.setAccountWhitelist(accountWhitelistController);
givenTransactionIsValid(transaction1);

when(accountWhitelistController.isAccountWhiteListSet()).thenReturn(true);
when(accountWhitelistController.contains(transaction1.getSender().toString())).thenReturn(true);

assertThat(transactionPool.addLocalTransaction(transaction1)).isEqualTo(valid());

assertTransactionPending(transaction1);
}

@Test
public void shouldRejectNonWhitelistedTransactionWhenWhitelistEnabled() {
transactionPool.setAccountWhitelist(accountWhitelistController);
givenTransactionIsValid(transaction1);

when(accountWhitelistController.isAccountWhiteListSet()).thenReturn(true);
when(accountWhitelistController.contains(transaction1.getSender().toString()))
.thenReturn(false);

assertThat(transactionPool.addLocalTransaction(transaction1))
.isEqualTo(ValidationResult.invalid(TX_SENDER_NOT_AUTHORIZED));

assertTransactionNotPending(transaction1);
verifyZeroInteractions(batchAddedListener);
}

lucassaldanha marked this conversation as resolved.
Show resolved Hide resolved
@Test
public void shouldAllowTransactionWhenAccountWhitelistControllerIsNotPresent() {
givenTransactionIsValid(transaction1);
assertThat(transactionPool.useWhitelist()).isFalse();

assertThat(transactionPool.addLocalTransaction(transaction1)).isEqualTo(valid());

assertTransactionPending(transaction1);
}

private void assertTransactionPending(final Transaction t) {
assertThat(transactions.getTransactionByHash(t.hash())).contains(t);
}
Expand Down
1 change: 1 addition & 0 deletions ethereum/eth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {
implementation project(':ethereum:core')
implementation project(':ethereum:p2p')
implementation project(':ethereum:rlp')
implementation project(':ethereum:permissioning')
implementation project(':metrics')
implementation project(':services:kvstore')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import tech.pegasys.pantheon.ethereum.p2p.api.PeerConnection;
import tech.pegasys.pantheon.ethereum.p2p.config.DiscoveryConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.NetworkingConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.RlpxConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.netty.NettyP2PNetwork;
import tech.pegasys.pantheon.ethereum.p2p.peers.DefaultPeer;
Expand All @@ -46,6 +45,7 @@
import tech.pegasys.pantheon.ethereum.p2p.peers.PeerBlacklist;
import tech.pegasys.pantheon.ethereum.p2p.permissioning.NodeWhitelistController;
import tech.pegasys.pantheon.ethereum.p2p.wire.messages.DisconnectMessage.DisconnectReason;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem;
import tech.pegasys.pantheon.util.bytes.BytesValue;

Expand Down
1 change: 1 addition & 0 deletions ethereum/p2p/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jar {
dependencies {
implementation project(':crypto')
implementation project(':ethereum:core')
implementation project(':ethereum:permissioning')
implementation project(':ethereum:rlp')
implementation project(':metrics')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
*/
package tech.pegasys.pantheon.ethereum.p2p.permissioning;

import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.peers.DefaultPeer;
import tech.pegasys.pantheon.ethereum.p2p.peers.Peer;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;

import java.net.URI;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import tech.pegasys.pantheon.ethereum.p2p.api.PeerConnection;
import tech.pegasys.pantheon.ethereum.p2p.config.DiscoveryConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.NetworkingConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.RlpxConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.netty.NettyP2PNetwork;
import tech.pegasys.pantheon.ethereum.p2p.netty.exceptions.IncompatiblePeerException;
Expand All @@ -38,6 +37,7 @@
import tech.pegasys.pantheon.ethereum.p2p.wire.PeerInfo;
import tech.pegasys.pantheon.ethereum.p2p.wire.SubProtocol;
import tech.pegasys.pantheon.ethereum.p2p.wire.messages.DisconnectMessage.DisconnectReason;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem;
import tech.pegasys.pantheon.util.bytes.BytesValue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import tech.pegasys.pantheon.ethereum.p2p.api.P2PNetwork;
import tech.pegasys.pantheon.ethereum.p2p.config.DiscoveryConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.NetworkingConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.discovery.PeerDiscoveryServiceException;
import tech.pegasys.pantheon.ethereum.p2p.netty.NettyP2PNetwork;
import tech.pegasys.pantheon.ethereum.p2p.peers.PeerBlacklist;
import tech.pegasys.pantheon.ethereum.p2p.permissioning.NodeWhitelistController;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem;
import tech.pegasys.pantheon.util.NetworkUtility;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

import tech.pegasys.pantheon.crypto.SECP256K1;
import tech.pegasys.pantheon.ethereum.p2p.config.DiscoveryConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.Packet;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PacketType;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PingPacketData;
import tech.pegasys.pantheon.ethereum.p2p.peers.Endpoint;
import tech.pegasys.pantheon.ethereum.p2p.peers.PeerBlacklist;
import tech.pegasys.pantheon.ethereum.p2p.permissioning.NodeWhitelistController;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.util.bytes.BytesValue;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import tech.pegasys.pantheon.ethereum.p2p.api.MessageData;
import tech.pegasys.pantheon.ethereum.p2p.api.PeerConnection;
import tech.pegasys.pantheon.ethereum.p2p.config.DiscoveryConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.FindNeighborsPacketData;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.NeighborsPacketData;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.Packet;
Expand All @@ -31,6 +30,7 @@
import tech.pegasys.pantheon.ethereum.p2p.wire.Capability;
import tech.pegasys.pantheon.ethereum.p2p.wire.PeerInfo;
import tech.pegasys.pantheon.ethereum.p2p.wire.messages.DisconnectMessage.DisconnectReason;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.util.bytes.BytesValue;

import java.net.SocketAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import static tech.pegasys.pantheon.ethereum.p2p.NetworkingTestHelper.configWithRandomPorts;

import tech.pegasys.pantheon.crypto.SECP256K1;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.discovery.PeerDiscoveryEvent.PeerBondedEvent;
import tech.pegasys.pantheon.ethereum.p2p.peers.Peer;
import tech.pegasys.pantheon.ethereum.p2p.peers.PeerBlacklist;
import tech.pegasys.pantheon.ethereum.p2p.permissioning.NodeWhitelistController;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
import static org.mockito.Mockito.when;

import tech.pegasys.pantheon.crypto.SECP256K1;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.Packet;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PacketType;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PeerDiscoveryController;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PeerTable;
import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PingPacketData;
import tech.pegasys.pantheon.ethereum.p2p.peers.PeerBlacklist;
import tech.pegasys.pantheon.ethereum.p2p.permissioning.NodeWhitelistController;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;

import java.util.Collections;
import java.util.concurrent.TimeUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import static org.mockito.Mockito.when;

import tech.pegasys.pantheon.crypto.SECP256K1;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.discovery.DiscoveryPeer;
import tech.pegasys.pantheon.ethereum.p2p.discovery.PeerDiscoveryAgent;
import tech.pegasys.pantheon.ethereum.p2p.discovery.PeerDiscoveryStatus;
Expand All @@ -37,6 +36,7 @@
import tech.pegasys.pantheon.ethereum.p2p.peers.Peer;
import tech.pegasys.pantheon.ethereum.p2p.peers.PeerBlacklist;
import tech.pegasys.pantheon.ethereum.p2p.permissioning.NodeWhitelistController;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.util.bytes.Bytes32;
import tech.pegasys.pantheon.util.bytes.BytesValue;
import tech.pegasys.pantheon.util.bytes.MutableBytesValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
import static org.mockito.Mockito.when;

import tech.pegasys.pantheon.crypto.SECP256K1;
import tech.pegasys.pantheon.ethereum.p2p.config.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.discovery.DiscoveryPeer;
import tech.pegasys.pantheon.ethereum.p2p.discovery.PeerDiscoveryAgent;
import tech.pegasys.pantheon.ethereum.p2p.discovery.PeerDiscoveryTestHelper;
import tech.pegasys.pantheon.ethereum.p2p.peers.PeerBlacklist;
import tech.pegasys.pantheon.ethereum.p2p.permissioning.NodeWhitelistController;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.util.bytes.BytesValue;

import java.util.ArrayList;
Expand Down
Loading