We are growing our list of metrics by the day, and some of them we don't
always need. So we should provide a way to trim them.
* If metrics are not enabled we supply a no-op metrics
* If only select metric categories are enabled we supply real metrics
for the selected metrics and no-op metrics for all the rest
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Use a single thread to persist received world state nodes to avoid RocksDB timeouts due to contention on the write lock.
* Fix RocksDbTaskQueue so it doesn't read stale data when resuming a transfer.
* Skip downloading empty trie nodes.
* Log unhandled errors from world state download requests
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Sometimes we get very short and unhelpful exceptions from deep in
pantheon ('null' for example). This change makes it so that if
--logging is at DEBUG, TRACE, or ALL then the stack trace that caused
the exit will also be printed.
This is done by providing our own impl of defaultExceptionHandler that
is aware of the logLevel in PantheonCommand.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Add RLP encoding subcommand for at least ibftExtraData to be inserted in genesis file.
There's only one encodable type for the moment, however the `--type` option is already there with a default value on this type. We'll add more possible types later if needed and the current type will remain the default one.
The file output is optional and it writes to standard output by default, same for
standard input or a file.
Tests and doc change.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Instantiate individual metrics where they're used
* Cache prometheus metrics to allow "duplicate" creation of metrics
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Adds a PeerValidator that, when the Dao fork milestone is in use, checks that the Dao block is present on each peer when they connect and disconnects them if they are on the wrong chain.
Also:
* Make GetHeadersFromPeer task stricter in validating response matches.
* Update BlockHeadersMessage to return a list of headers
* Add more controls to DeterministicEthScheduler test util
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* RocksDB uses synchronized methods so can use plain long instead of AtomicLong.
* Synchronize close method and use simple boolean instead of AtomicBoolean.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* RTD activated custom 404 a few days ago and our custom 404 broke
This custom template was never tested on RTD before as it was not taken in
account but now that it is, we can see it fails.
* update the url to use config
* removed issue tracker link as we will change it soon.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
add public key address export subcommand
make the file output optional and write to standard output by default
code, tests and doc changes
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Do parallel extract signatures in the parallel block importer.
* remove the extraction from FullSyncBlockHandler
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>