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>
A service like the JSON-RPC service is opened up, only serving /metrics
requests in a file format for prometheus.
New CLI flags are --metrics-enabled and --metrics-listen, just like the
--rpc and --ws variants of the same.
--host-whitelist is respected the same as the JSON-RPC endpoint.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Refactoring PantheonNodeFactory and adding PermissioningConfiguration
* Created ClusterConfiguration
* Acceptance test for nodes whitelist
* Fixing constructor
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Creating EnodeURLProperty and custom converter
* Replacing String for URI when parsing EnodeURL
* Fixing acceptance test bootnode config
* Removing invalid empty bootnode property from docker script
* Validating nodeId in Enode URL
* Adding final to method param
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* WS sync subscription delay added
* WS sync subscription delay added with unit testing
* WS sync subscription delay added with unit testing
* changed number to a constant in constructor
* Use default from websocket class instead of making new one
* Removed magic numbers
* Made error message use const as well
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Plumb in three more metrics
* add blockchain_height gauge
* add blockchain_difficulty_total gauge
* add blockchain_announcedBlock_ingest histogram
This involved some deep pluming such that the metrics system needs to be
created in the PantheonCommand, along with trickle down effects into other
consensus engines. This is likely where it should live anyway.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Use the Idiomatic builder pattern for PantheonControllerBuilder and
RunnerBuilder. This reduces the number of test touch points when a new
object is added to the builder.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Refactoring and removing the duplicate call to web3j
* Single shared variable for the private key for the first genesis account
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Upgrade dependency versions
* All version information is merged into one place
* Upgrade most version to their latest non-test version.
* dependencies are now sorted
Two dependencies were not upgraded:
errorprone - There are new checks that require build or source changes.
vertex - The license to eclipse 2.0 which is not in our current approved license list.
The change is trivial but for tracability it should be done alone.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* EthGetTransactionReceipt Acceptance test added
* GetTransactionReceipt Acceptance Test updated to conform to new dsl
* Update to new dsl
* Update to new dsl
* Update to new dsl - spotless applied
* Naming convention corrected
* Naming convention corrected
Deleted obsolete test cases
added assertion for status code
* Naming convention corrected
Deleted obsolete test cases
added assertion for status code
* Naming convention corrected
* Removed sender field to make test more efficient
* Removed sender field to make test more efficient
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* IoC for deploying the smart contract
* Smart contract deploy as a Transaction
* Consistent transaction naming
* Avoiding a resource leak with lazy creation of Web3j connections
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
fixes#233 Allow nodekey to be specified separately to --datadir
Add a `--node-private-key <FILE>` option on CLI to enable the use of a custom key file.
if not set, uses the default "key" file in the data dir
if set but doesn't exist, creates a new key file
if set and exists, uses the specified key file
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Ban Peers via CLI
As part of working on #251 I needed to be able to ban certain nodes from my
connection pool and let others connect. This is a general solution to add
a --banned-nodeids CLI flag where the nodeIds of banned nodes are listed.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* EthGetWork Added with Unit and acceptance tests
* EthGetWork Added with Unit and acceptance tests
* EthGetWork Added with Unit and acceptance tests
* EthGetWork Added with Unit and acceptance tests
Debugged
* EthGetWork Added with Unit and acceptance tests
Debugged
Change Requests Actioned
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [minor] distribution tweaks
* the 'pantheon:client' project is empty, and results in an empty jar, delete
* clique hard codes a version, delete so the parent takes effect
* clique does not describe it's jar, add description
* evmtools does not describe it's jar, add description.
results in
* clique-1.0.0-SNAPSHOT -> pantheon-clique-0.8.0-RC
* evmtools-0.8.0-SNAPSHOT -> pantheon-evmtools-0.8.0-RC
* client-0.8.0-SNAPSHOT -> *deleted*
* spotless formatting on the gradle file
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Release plugin and rework of the Bintray plugin in Gradle, in-code ignoring tests that were being ignored at runtime on the CI.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>