Moves init code into a separate builder instead of a static init method, with common code in an abstract base class and subclasses of the builder for each of the consensus variants.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
It's now entirely handled through settings in the genesis config which --network DEV handles so no need for an additional boolean devMode flag.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Use default enclave public key to generate eea_getTransactionReceipt
* Update the docs to reflect the changes
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Move RocksDBStats to it's own module. This also brings metrics to
metrics:core since none of our other module have nested modules but
they have peer modules.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Only specify discovery port explicitly when the discovery port differs
from the listening port.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PRIV-41] Use metrics system for private state db
- Use PrivacyParametersBuilder to build PrivacyParameters
- refactor PrivacyParameters to expose default options
- refactor test builders to use PrivacyParameters.DEFAULT
- Use URI in Enclave
* Fix: enclave tests from bad merge
* Fix privacy acceptance tests after db configuration changes
* Switch to use nested class for PrivacyParametersBuilder
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add clarity to error messages in eea_sendRawTransaction
* Refactor private acceptance tests and add tests for exception
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Biggest change is that UnusedVariable and UnusedMethod went to WARN by
default. Since our build is a no warning build this means we either need
to turn them off or fix them. I mostly opted for the latter. Test code
was mostly fixed, unused loggers were deleted, and other shipped code
was mostly suppressed.
Two less noisy fixes to not use `SortedSet` and to use zero based
comparable results instead of -1, 0, and 1. Also a compiler nit in
errorprone was suppressed, per the description it won't affect us.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* refactor NodeWhitelistController -> NodeLocalConfigPermissioningController
* added smart contract permissioning config
* only use SyncStatusProvider if Smart Contract Permissioning enabled
* check we are not adding self enode
* local permissioning controller isPermitted() should return true if either source OR destination is permitted
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
start() guarantees ports are open before it returns but doesn't block until shutdown. Then awaitStop can be used by callers who want to block until Pantheon exits.
Fixes intermittency regression in RunnerTest with thanks to @usmansaleem for reporting via #1067.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
With the removal of the ottoman command line option, Pantheon lost the
ability to synchronise with Quorum.
This change allows Pantheon to synchronise with quorum via the
IbftLegacyPantheonController, which uses an Instanbul64 protocol
manager in place of the EthProtocolManager.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
The P2P and discovery ports are now always dynamically assigned (set to port 0 when starting pantheon) to guarantee they always select an available port.
This however means you can't determine the ports that will be used or the enode URL for a node before it has started. The main effect of this is that nodes have to use the peer discovery process to discover each other rather than having every node in the network in the boot nodes list. A single node is started first with no bootnodes, then other nodes are started with that node as their bootnode and use peer discovery to find the other nodes as they start.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Implement admin_nodeInfo RPC call. This involved bringing data from the
ethNetworkConfig and genesis json into the rpc call, so it had a lot of
testing side effects.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PAN-2341] Created mechanism to publish sync status
* Refactoring WebSockets syncing subscription to respond to SyncStatus events
* Removing rpc-ws-refresh-delay option
* Removing ws-refresh-delay option from ATs
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Wait for IBFT network to start generating blocks.
* Ignore CliqueGetSignersRpcTest until it gets reworked to not hard code the block numbers
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Set system property correctly so acceptance tests actually use the process runner.
* Update ProcessPantheonNodeRunner to use the new CLI options and support additional features now required.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>