* Download receipts
* store blocks without processing transactions
* Only apply light validation during fast sync.
* Mark fast sync chain download as complete when pivot block has been reached.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Metrics Service configuration incorrect
--metrics-push-enabled is not eabling metrics push and --metrics-enabled
is enabling push instead of polling.
* formatting
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
fixes NC-1737 by adding an option dependency mechanism for "enabled" options
This mechanism is aimed at preventing the use of options if the associated
service is disabled. This is not a generic system as our need is simple here.
But in future version of PicoCLI some options dependency mechanism may be
implemented that could replace this.
See https://github.com/remkop/picocli/issues/295
Our current mechanism apply to p2p, rpc (http+ws), mining, privacy and metrics.
It logs a warning wherever some options are used that require another one to be enabled.
Also renamed inconsistent isRpcHttpEnabled option variable and moved
--privacy-enabled option to be on top of other privacy options.
injects a Logger in PantheonCommand constructor to log and also provides injection capabilities for a mock in tests.
adds unit tests
updates tests logger name to TEST_LOGGER to prevent confusion with the mock
remove --max-trailing-peers after merge with master where it was deleted
updated rules for metrics
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Don't overload `--metrics-host` and `--metrics-port` for push mode, instead add '--metrics-push-enabled' , `--metrics-push-host` and `--metrics-push-port`, rename `--metrics-prometheus-job` to `--metrics-push-prometheus-job` and remove `--metrics-mode`
* Show an error if both metrics and metrics-push are enabled.
* Allow shutdown if we cannot communicate with the Push Gateway.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
fixed NC-2206 remove --max-trailing-peers
Replaces the option by a constant.
Removes option test.
Doc update
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* create permissioning config from toml file
* added CLI options for separately enabling node and account permissioning
* moved check for bootnodes on whitelist out of CLI
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>
Messages which originate with the current node are logged in the
gossiper such that if a remote peer sends a packet which originated
from the local back to the local node, it should not go back out
again.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Messages which originate with the current node are logged in the
gossiper such that if a remote peer sends a packet which originated
from the local back to the local node, it should not go back out
again.
It was found that if a non-existent account sent a transaction via
JSON RPC - the transction would be rejected, even if the upfront cost
of the transaction was 0 (0 gasprice, and 0 value).
This was because the sender was deemed to not exist, therefore not
have the required funds.
If the tranasaction was received via block propogation, this problem
would not be hit (as the sender account would be created in the world
state prior to validating the transaction). Local/remote transactions
did not have access to the world state to do this.
MainnetTransactionValidator has been updated to allow a 'null' sender
to create a transaction if the price is zero (and the nonce is acceptable
from the standpoint of a default/initial account state).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Separate the management of sync target and actual import from the rest of the Downloader logic in preparation for introducing a fast sync chain downloader.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
fixes NC-2120 --discovery-enabled option refactoring
now able to have --discovery-enabled option with true as default
and --discovery-enabled=true or --discovery-enabled=false on CLI
and discovery-enabled=true or discovery-enabled=false in YAML config file.
updates doc
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>