* Fix eea transaction count if account is null in privacy group state
* Fix failing acceptance test
- expected value was generated with the wrong privacy group
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* combine bootnodes and staticNodes and pass the combined collection when building permissioning config; renamed error code that specifically called out bootnodes
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
DebugTraceBlockByNumber now requires hex numbers as input instead of decimal and supports shortcuts like 'latest' consistent with other methods like EthGetBlockByNumber.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Moves init code into a separate builder instead of a static init method, with common code in an abstract base class and subclasses of the builder for each of the consensus variants.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
It turns out we don't have the p2p host and port at RPC initialization.
To fix this change to query hosts and ports at method invocaiton time
instead of whent he constructor is called.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
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>
* 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>
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>
Only specify discovery port explicitly when the discovery port differs
from the listening port.
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>
* [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>
* Added ability to subscribe to dropped transactions from the transaction pending pool.
Implemented subscription webservice to support this.
* Added metrics to the pending transactions, tracking the number of local and remote transactions in the pool.
* Converted listener management in pending transactions to use the Subscribers util object.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
When receiving an AddPeer, or when loading the static-nodes.json file, pantheon
should not accept its own NodeID as a valid connection (however, this should not invalidate the static-nodes file).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
When RemovePeer is invoked, the specified peer is removed from the "Maintained" connections in NettyP2p, and the connection to said peer is disconnected.
The peer is not added to the blacklist, on the premise that this behaviour will typically be used when peer-discovery is disabled, thus no future connection to the peer in question will be attempted (except via an AddPeer JSON RPC call).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Biggest change is that UnusedVariable and UnusedMethod went to WARN by
default. Since our build is a no warning build this means we either need
to turn them off or fix them. I mostly opted for the latter. Test code
was mostly fixed, unused loggers were deleted, and other shipped code
was mostly suppressed.
Two less noisy fixes to not use `SortedSet` and to use zero based
comparable results instead of -1, 0, and 1. Also a compiler nit in
errorprone was suppressed, per the description it won't affect us.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* refactor NodeWhitelistController -> NodeLocalConfigPermissioningController
* added smart contract permissioning config
* only use SyncStatusProvider if Smart Contract Permissioning enabled
* check we are not adding self enode
* local permissioning controller isPermitted() should return true if either source OR destination is permitted
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Store the instant that a pending transaction is added to the txpool, and expose this out through the api.
* Clock.systemUTC only used once.
* TestClock class added with a factory method for a fixed clock.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>