- Previously you had to sign the private transaction with the same key as the privacy marker transaction.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* streamline `JsonRpcParameter.required` method
* add test cases for PAN-2721
* clarify TopicParameter parsing comments
* consume end of array in TopicParameter custom deserializer
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Return specific error for enclave
* Serialize into error object instead of regex to find the error.
* Return EnclaveException for errors in Enclave
* Fix enclave error response after rebase
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Previously it was possible for a transaction to be "missed" by this call if it was added to a block between when we checked the blockchain and when we checked the pending transaction pool.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Don't create a new SecureRandom instance every time a filter ID is generated.
Fix intermittency in FilterIdGeneratorTest - quantity values omit leading 0s.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Connection ID is now tracked as a property of the subscription rather than as a separate map, so we can use a single concurrent map to track all details of subscriptions.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Prevents intermittent `eth_getFilterLogs` failure when the `filterId`
began with a hex 0. Previously leading 0's were not trimmed so depending
on the randomly generated value, a filter could appear to not exist in
the `FilterRegistry`
* standardize Quantity.format to Quantity.create
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Validate private transaction nonce before submitting to Transaction Pool
* Update tests for Incorrect Nonce and Nonce Too Low exceptions
* Differentiate Incorrect Nonce and Nonce Too Low error messages
* Fixed flaky tests
* Change log level from Info to Debug
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Per the eth JSON-RPC spec all values are strings, not raw json numbers, hence eth_protocolVersion is a Quantity ("0x3f"), not an Integer (63)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Don't copy collections if we don't need to. Change types higher up if needed.
* Don't use Guava's Object.equal, use Java's Objects.equals.
** add errorprone test to enforce the banning of Guava's Objects class.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Change all Stream<?> getX() and Stream<?> x() methods to Stream<?> streanX methods, such as `Stream<Peer> streamIdlePeers()`
* Update coding conventions to reflect this.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Implements a GraphQL interface to expose data that conforms to EIP-1767. As the EIP specifies, the implementation should allow “a complete replacement to the read-only information exposed via the present JSON-RPC interface”.
Supported CLI options:
* `--graphql-http-enabled` to enable GraphQL
* `--graphql-http-host` and `--graphql-http-port` to configure the host and port.
* `--graphql-http-cors-origins` to set the CORS-origin policies
* The `--host-whitelist` option is respected. This option also applies to JSON-RPC and WS-RPC endpoints.
Default port is 8547. The endpoint is `/graphrpc`, so the default URL is typically `http://127.0.0.1:8547/graphql`
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* 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>