Some more logging level downgrades.
* At steady state we should get only one info level log per new block
* We don't need to know about peer stuff at info
* Caught up to best peer fires for every block
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Update value returned by web3_clientVersion to be ethstats friendly
* Version part starts with a v
* SNAPSHOT builds report 32 bits of the git hash
* OS and architecture are sniffed out and reported
* JVM version and branding are sniffed out and reported
Example values (not all real):
pantheon/v0.9.0-dev-f800a0b1/osx-x86_64/oracle-java-1.8
pantheon/v0.9.0-dev-27960b57/osx-x86_64/zulu-java-11
pantheon/v0.9.0/linux-arm64/openjdk-java-12
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>
Replace the JNI based snappy library with an all Java version.
This will help work on #251 because the error messages are more reasonable
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Add tests that hit the retry failure case
Move "complete what we just got" semantic into the
DownloadHeaderSequenceTask. Previously it was completing everything
in the chunk it was assigned.
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>
* Introduce ProtocolScheduleBuilder and use it for Clique, MainNet, IBFT and dev.
* Remove default milestone blocks and simplify MainnetProtocolSchedule. All milestone blocks must now be defined in the genesis file (previously ethash chains would get Mainnet milestone blocks by default).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Make GenesisConfigFile responsible for handling all the content in the genesis config file and rename GenesisConfig to GenesisState as it is now just responsible for creating the initial state at genesis.
* In CliqueProtocolController, pass the network ID to EthProtocolManager instead of the chain ID and use downloader parallelism setting instead of network ID for the number of threads.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Gradle 4.10.2 issues deprecation warnings. Based on the Gradle
documentation, enable the STABLE_PUBLISHING feature preview to
fix this. This is essentially a no-op as no Maven publications
are published.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
As recommended in #231 alter the API so that the
subclasses always return their list from executePeerTask in the
`CompletableFuture` and reset the retry in `#executeTask()` when any
non-empty list is returned.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Fix corner case where Memory did not clear target destination if the new bytes to set was empty.
* Use BytesValue.EMPTY instead of Bytes32.EMPTY to make it clear that it's a 0 length BytesValues rather than 32 bytes of zeross.
* Treat outputLength for call operations as a maximum length - when the actual data to output is shorter than outputLength, do not zero out the tail end of the memory range.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
A more robust fix: be tolerant of partial success. Instead of counting
every call as a limited retry change the semantics of
AbstractRetryingPeerTask such that it's retryCounter may be reset on a
partial success. Hence the limit is on consecutive zero progress
retries and large blocks dribbled in one at a time are not penalized.
Undo temp fix. Restore retries to 3 in a row.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Don't rely on sun.security.krb5.Confounder.bytes.
It's not reflected as part of the JDK platform and makes IDEs cranky.
* Use a better SecureRandom factory.
* spotless
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Since docker image is now provided in the Jenkins build process repos, this
image is not used anymore and may confuse users as it doesn't behaves the same
way as the one we published on Docker Hub
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* remove the import-blockchain command. Right now it's not useful
enough to support. Maybe it will return in the future.
* Remove the import-blockchain command.
Also remove BlockchainImporter that was backing the command.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Introduce classes to wrap JSON config instead of accessing it directly in multiple places.
* Fix discrepancy in how CliqueProtocolSchedule and CliquePantheonController loaded the block period configuration.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
We create our own instance of Clock. However the java.time.Clock
provides what is needed and already exists on the platform.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Introduce createInMemoryBlockchain test utility and use it everywhere appropriate.
* Inject BlockchainStorage into DefaultMutableBlockchain.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Replace explicit usages of RocksDbKeyValueStorage with the more generic but now just as capable KeyValueStorage.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Includes a reusable OperationBenchmarkHelper to make writing EVM opcode benchmarks easier in future.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>