* [PAN-2853] Create a metric tracking DB size
- create a Prometheus long gauge to track the database size
- `rocksdb.live-sst-files-size` : 872a261ffc/include/rocksdb/db.h (L685)
- use `rocksdb.live-sst-files-size` property rather than `rocksdb.total-sst-files-size` (performance purpose: see warning 872a261ffc/include/rocksdb/db.h (L680))
- add tests to check creation of metrics
* fix wildcard import
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* add json rpc method to change the logs without restarting the client
* Update ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/AdminChangeLogLevel.java
change the log level from DEGUB to OFF
Co-Authored-By: Danno Ferrin <danno.ferrin@shemnon.com>
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
BlockDataGenerator (a testing util) uses the default key generation code, which
is set to a production grade SecureRandom seed by default. However this creates
non-deterministic results with the block data.
This changes the generator for test data to use a deterministic set of key
pairs.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Add tolerance delta in test. Generated transaction data sizes are sometimes differents, the number of transactions in each batch may vary a bit, the tolerance delta helps dealing with such cases.
The most important thing in this test is the assertion verifying that the union of all batches equals to the original list of messages to send.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add privacy group id to private transaction
* Update enclave send methods to accept privacy group id
* Update eea sendRawTransaction endpoint
* extract privacy group id from private transaction if present
* extract privateFor/privateFrom if privacy group id is not present
* Fix tests
* Change abstract class invocation to concrete class.
* Utility method to load enclave public key
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Add support for working within Network Address Translation (NAT) environments.
This adds a CLI flag `--nat-method` with two options, `NONE` (the default and
current behavior) and `UPNP.` `--nat-method` will affect what IP address and
ports are advertised via the P2P discovery and other APIs that report the
address and port for P2P actions.
`UPNP` is intended for a typical home or small office environment where a
wireless router or modem provides NAT isolation.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Display World State Sync Progress in Logs
- compute estimated world state completion
- display estimated world state completion in the logs
- `CompleteTaskStep` now have access to a `LongSupplier` to retireve the number of pending requests
- use a `RunnableCounter` to trigger displaying every 1000 requests completed
- only show a new log when the estimation changes
- added test to check the estimation computation
* report using raw ratio rather than percentage
* resolve PR discussion
* rename getTotal to get
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* add dump sub command
* add getBlockHash method for the dump sub command
* Resolve review issues : Add the ability to export multiple blocks, Rename dump command to export command, Improve tests for the export command
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Also sanity check as part of build so we know if the checks start failing prior to the actual release.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Ensure the environment variable default provider is always used even if there is no config file.
* Remove static block.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
- Update SyncStatusNodePermissioningProvider to use URI (without discovery port) instead of EnodeURI to allow optimised permission checking of static nodes
- Add EnodeURL.toURIWithoutDiscoveryPort
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Update the reference tests to where they are pre-Istanbul.
One small error in ExtCodeHash is fixed.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Currently when json-rpc and ws services are configured with a port value of 0, the "net_services" endpoint will display their ports as "0". A configured port of "0" actually means "choose a random port". We need to get the actual port that those services are using displayed in the "net_services" JSON-RPC response.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
- refactor packages
- remove `PantheonExceptionHandler` inner class and create a separate class
- introduce subcommand package
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Add nonce too low unit tests to grahql and json-rpc
Also, add all the private transacton failures mappings to graphql
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PIE-1736] Implement incoming transaction messages CLI option as an unstable command.
`--tx-pool-keep-alive-seconds` should be a `-X` option.
- `tx-pool-keep-alive-seconds` is renamed to `incoming-tx-messages-keep-alive-seconds`
- `incoming-tx-messages-keep-alive-seconds` is an unstable command not visible for the user (`--Xincoming-tx-messages-keep-alive-seconds`)
* fix unit test & spotless apply
* use TransactionPoolConfiguration to hold unstable option.
* add tests
* remove unecessary mock stubbing
* spotless apply
* use real builder instead of mock
* remove commented code
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Updated TransactionValidationParams with checkLocalPermissioning flag
* Added TransactionValidationParam to TxProcessor
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Columnated storage to allow for iteration over world state
* change MetricsCategory to PantheonMetricsCategory
* consistency renaming of kvstores
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PAN-2850] Create a transaction pool configuration object
* fix unit test by adding equals and hash code methods
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add eea_createPrivacyGroup endpoint
* Update orion version
* Fix the failing create privacy group test
* Add eea deletePrivacyGroup API in pantheon
* Update Orion to 1.1.0 release
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PIE-1710] Expose a CLI option to configure the life time of transaction messages.
- add a cli option `--tx-pool-message-keep-alive-seconds`
* rename cli option
* change cli option description
* spotless apply
* Update everything_config.toml
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* use MockitoJUnitRunner to run TransactionsMessageProcessor tests
* implement metrics counter and logging
* (format) replace statement by lambda expression
* (doc) fix javadoc
* spotless apply
* remove modulo and reset step counter to zero
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Add the needed Istanbul configuration options to the genesis file and needed
hooks in the protocol specs for Istanbul.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PIE-1707] Implement a timeout in TransactionMessageProcessor
- `processTransactionsMessage` now takes a `keepAlive` parameter
- don't process the message if expired
- add unit tests
- use a default timeout for transactions (1 minute)
* Update ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessorTest.java
Co-Authored-By: Nicolas MASSART <NicolasMassart@users.noreply.github.com>
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>