* make spotless groovy formatter ignore compilation errors
* move errorprone FieldCanBeFinal to off for performance reasons.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* 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>