* Use the external jars to provide the plugin libraries.
* Add mavenLocal to local repositories to aid development
* Remove the :plugins project
* Move the PantheonPluginContextImpl into :pantheon
* rename a few files
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
In most places the RPC gets dropped. In a few places it made more sense
to rename to GraphQLHttp when we are talking about the HTTP Server and
service.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* It returns for any block we would broadcast to other peers, when
we would broadcast them.
* It returns a JSON String containing hash, number, and timestamp
* This event data is not set in stone, it may change in type or content.
* Acceptance tests and unit tests got a re-work away from the assumption
that there is only one plugin type.
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>
* Add slf4j to log4j bindings as a runtime dependency so any libraries that log to slf4j have their logs output to Pantheon's logs properly.
* Set a default exception handler to ensure uncaught exceptions wind up in the Pantheon logs.
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>
Provides better control over the maximum number of concurrent requests to a peer.
Gives a fairer allocation of peers to requests being made.
Avoids a task failing because all peers are busy which then introduces a delay before the request is retried.
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>
* [PAN-1878] Provide error message when invalid key specified in key file
- display explicit message when invalid key file is specified
* Update KeyPairUtilTest.java
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's now entirely handled through settings in the genesis config which --network DEV handles so no need for an additional boolean devMode flag.
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>
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>
* 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>