* 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>
* [PAN-2786] Stop Transaction Pool Queue from Growing Unbounded
- use a `ArrayBlockingQueue` with a fixed size to limit the transaction task queue
- expose a method in `MonitoredExecutors` to create a working queue with a maximum capacity
- update `EthScheduler` to use a limited working queue for the `txWorkerExecutor`
* [PAN-2786] Implement a bounded timed queue
- implement a custom bounded queue
- use a time based policy with keep alive configuration
- implement eviction process based on the policy
- add metrics
* use field instead of parameter
* fix PR pass 1
- use concrete class instead of interface
- change metric name to comply with global policy
- update unit test
- wrap `Runnable` into `scheduleTxWorkerTask`
* fix PR
- remove time based policy
- use raw `Runnable`
- make a room for a new element at full capacity
* Update BoundedQueueTest.java
invert condition
* fix PR comments
- remove Mock class
- make logic more thread safe, avoid race condition
- remove element until the new one is accepted
* Update ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthScheduler.java
Co-Authored-By: Adrian Sutton <adrian@symphonious.net>
* spotless apply
* fix nit comments
- use assertj assertions for better readability
- improve unit test
* spotless apply
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PAN-2803] Update generate-blockchain-config CLI help
- provide more accurate description of the command
- update help ( FILE ==> DIRECTORY )
* fix unit tests on help command
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PAN-2630] Synchronizer should disconnect the sync target peer on invalid block data
- check if headers are sequential
- if sequential, check if they form a chain, if not, disconnect the peer
* update behaviour and add tests
- change checks order
- add log message
- write tests
* disconnect sync target when InvalidBlockException
* remove power mockito
- remove powermockito
- write tests in subclasses of the `AbstractGetHeadersFromPeerTaskTest`
* fix Exception check bug
* fix PR discussion first pass
- add assertion to check when the peer is disconnected
- add assertion to check the peer has not been disonnected
- undo remove final on class
- remove sync target field
* remove spy invocation
* spotlessApply
* shouldDisconnectPeerIfInvalidBlockException
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add eea_getPrivacyPrecompileAddress API in pantheon
* Return error is privacy is not enabled
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Make MetricCategory an interface so it isn't locked into the pantheon specific categories.
* Split categories into StandardMetricCategory and PanteonMetricCategory to separate the common and Pantheon specific categories.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Query params can be used to adjust the number of peers required and number of blocks tolerance to be considered in sync.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Renaming local config ATˆ
* Base work for account permissioning
* Updating simple account permissioning smart contract and genesis file
runtime bytecode
* Updating account ATs to use account object
* Fix isAllowed account permissioning transaction
* Fix allow/forbid account tx
* Updated node builder for account permissioningˆ
* Updated threaded and process AT node runners for account permissioning
* Created condition for checking balance not changing after some time
* Smart contract based account permissioning ATs
* Spotless
* Moved AccPermController build into RunnerBuilder
* Fix ProcessPantheonNodeRunner account permissioning setup
* Spotless
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
- 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>