Implemented a JSON RPC method "net_services" that takes no input
parameter and returns an object
containing a list of enabled services (jsonrpc, p2p, ws, metrics) with
"host" and "port", as show below;
{
"id":1,
"jsonrpc": "2.0",
"result": {
"jsonrpc": {"host": "127.0.0.1", "port":3000},
"p2p":{"host": "127.0.0.1", "port":3000},
"ws":{"host": "127.0.0.1", "port":3000},
"metrics":{"host": "127.0.0.1", "port":3000}
}
}
In case a service is not enabled, that will not be included in the list;
{
"id":1,
"jsonrpc": "2.0",
"result": {}
}
Fixes PAN-2485
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Increase total difficulty threshold required to switch sync targets.
Increase threshold for changing sync target based on height to 200.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Use default enclave public key to generate eea_getTransactionReceipt
* Update the docs to reflect the changes
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Testing shows that the memory growth of 5.17.2 tends to exceed the
memory of a t3.large amazon instance. Not sure if it is a misconfigured
cache, leaked native/java resource, or a deep rocksdb leak. But rolling
back increased stability.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Move RocksDBStats to it's own module. This also brings metrics to
metrics:core since none of our other module have nested modules but
they have peer modules.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Use labelled timer to differentiate between metrics of public and private db
* Update the label names
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* clean PantheonCommand class
- organize imports
- move `RpcApisConverter` and `RpcApisConversionException` to separate files
* spotlessApply
* register converters
* Revert "register converters"
This reverts commit aec47350792273615aeb2daab484799be928b47a.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Only specify discovery port explicitly when the discovery port differs
from the listening port.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
There is one check that has issues in Java 12 and has yet to be fixed.
Disable it when we detect we are being built on Java 12.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Because of deep issues sometimes we get duplicate Peers that differ
in small ways. Tweak the test to verify we get all of the peers
we are expecting and to be tolerant of quasi-duplicate peers.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* move subclass
* Update Transaction.java
* fix 500 error on tx not found
Returns a JSON RPC error instead of failing due to NPE.
* Handle reason on revert operation
Implement reason string on revert operation as in the following EIP :
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-140.md
* Update MessageFrame.java
* Update RevertOperationTest.java
* fix PR discussion
* fix PR
* Update DebugTraceTransaction.java
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
There is no need to keep entire blocks during import after they have
been imported. Keep just the hashes instead.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PRIV-41] Use metrics system for private state db
- Use PrivacyParametersBuilder to build PrivacyParameters
- refactor PrivacyParameters to expose default options
- refactor test builders to use PrivacyParameters.DEFAULT
- Use URI in Enclave
* Fix: enclave tests from bad merge
* Fix privacy acceptance tests after db configuration changes
* Switch to use nested class for PrivacyParametersBuilder
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add clarity to error messages in eea_sendRawTransaction
* Refactor private acceptance tests and add tests for exception
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>