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>
* added JsonRpcHttpService.isPermitted(User, JsonRpcMethod) and JsonRpcMethod.getPermissions() and unit tests
* 401 if no auth token
* added DSL condition for NetVersion to fail because Unauthorized
* Added DSL conditions to do login and set auth token, and AwaitLoginResponse
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Two changes:
* Stream chains now take up less vertical lines, only breaking on
stream operations.
* Long annotations that span multiple lines no longer have a dangling
parentesis and indent 4 spaces.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* created fixed difficulty calculator.
* Use fixed calculator at the right spot.
* Use fixeddifficulty in the main dev.json file.
* Removed development difficulty calculators.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
fixes NC-2026 adds a `--network` option instead of separated options
Networks are now defined using a `--network` option that takes the case insensitive
name of an enum values as input : MAINNET, RINKEBY, ROPSTEN, GOERLI, DEV
These presets are a set of network-id, genesis file and boonodes list.
If the `--genesis-file` is provided with a valid JSON genesis file,
Pantheon uses it instead of the default network. An empty bootnodes list is then
the default value and network id is the chain id found in the genesis file.
`--network-id` and `--bootnodes` options can override these defaults.
You can of course also override the `--network-id` and `--bootnodes` for a
predefined known network (using `--network`).
User have no reason to set `--network` and `--genesis-file` options at the same
time that would lead to misunderstandings so we raise an error to prevent both
options to be defined at the same time on the command line.
Also fixes NC-2189 renaming --private-genesis-file to --genesis-file
Updates a lot of doc according to the options changes
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* added test and DSL for node with --no-discovery
* reversed boolean for discovery
* changed to Boolean and arity = 1
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Implemented list/add/remove accounts from whitelist
* Including account whitelist methods in the JSON-RPC API
* Fixing json rpc response for eth_sendrawTransaction with account not authorized
* Refactoring TransactionPool account whitelist logic
* Acceptance test for accounts whitelist
* Errorprone
* Fixed account nonce tracking in ATs
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>