Ibft is required to validate a block upon reception, but not import
it until a later time.
As such, IBFT will require validation and importing to be separated.
The validator has been exposed as part of the ProtocolSpecification.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Implement a new endpoint for privacy (#PRIV-5)
Create new package for implement privacy isolate, add new EeaSendSawTransaction.java and EeaSendSawTransactionTest.java
Create a new RpcApis category: EEA
Make changes to expose the endpoint in JsonRpcMethodsFactory.java, RpcApis.java and PatheonCommand.java
Create basic unit tests to call and get the response of the endpoint and call manualy and get the response
* Fix tests build failure and run gradlew spotlessApply
Also resolve merge duplication
* Remove the EEA from default APIs
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Implemented list/add/remove accounts from whitelist
* Including account whitelist methods in the JSON-RPC API
* Fixing json rpc response for eth_sendrawTransaction with account not authorized
* Refactoring TransactionPool account whitelist logic
* Acceptance test for accounts whitelist
* Errorprone
* Fixed account nonce tracking in ATs
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
The total difficulty of mainnet is larger than a signed long, so we
need to adjust the way we get the number.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Initial implementation of ibft_getValidatorsByBlockHash
* Added in missing method to blockchain queries and cleaned up code.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Put and remove are currently available on the KeyValueStorage interface
as non-transactional calls. These are used nowhere other than test
code, all our production write calls are to the transactional interface.
* Remove the non-transactional mutation APIs from the interface
* Update the tests to use transactional writes
* Update getStartTransaction to just be startTransaction since it is
not a property but a method.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* ensure bootnodes are in nodes-whitelist
* added test for network config eg ropsten with --node-whitelist
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Upgrade errorprone
* Upgrade errorprone from 2.3.1 to 2.3.2
* Upgrade Jenkinsfile so that CI will use Java 11
* Suppress these new rules:
* EqualsGetClass
* ImmutableEnumChecker
* UnnecessaryParentheses
* Change code to conform to these new rules:
* BadImport
* BadInstanceof
* InconsistentHashCode
* LockNotBeforeTry
* MathAbsoluteRandom
* ModifiedButNotUsed
* UndefinedEquals
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Creating EnodeURLProperty and custom converter
* Replacing String for URI when parsing EnodeURL
* Fixing acceptance test bootnode config
* Removing invalid empty bootnode property from docker script
* Validating nodeId in Enode URL
* Adding final to method param
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* WS sync subscription delay added
* WS sync subscription delay added with unit testing
* WS sync subscription delay added with unit testing
* changed number to a constant in constructor
* Use default from websocket class instead of making new one
* Removed magic numbers
* Made error message use const as well
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Received New Round messages require significant validation to ensure their content is consistent and valid with regard the current state of the system.
This commit includes a class (and tests) which ensures illegally constructed NewRound messages are identified.
This does not include the action to be taken upon detection of an illegal New Round message.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* basic updatdes
* spotless inter alia
* building successfully
* funtioning
* minor update to docs
* rebased in previous commit, attempt to pass build server
* eliminate distanceSortedPeers
* spotless update
* revamp outstanding requests
* implementation of timeoutTask and corresponding test
* use setPeriodic
* testing with DiscoveryPeer
* remove commenceTimeoutTask from constructor
* isolate clock functionality out of recursive state
* update to docs
* validate size of outstandingrequestlist
* improve sanity check test
* remove extraneous copy
* add accurate interface parameters
* finalize
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* use Peer for enode not String
* moved NodeWhitelistController and PermissionConfig to p2p/permissioning
* reject messages if not from a whitelisted peer
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Time all tasks
This is fairly high touch consisting of 3 things:
* Moving to Prometheus's Summary for timers
* Timing at .2, .5, .8, .9, .99, and 1.0 (1.0 actually gets max I believe)
* Timing all abstract EthTasks
* The bulk of the changes: plumbing the timing context everywhere we need it
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* NC-1880 High TX volume swamps block processing
Move transaction processing into its own thread(s).
Size of txWorkerExecutor thread pool can be independently configured.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Plumb in three more metrics
* add blockchain_height gauge
* add blockchain_difficulty_total gauge
* add blockchain_announcedBlock_ingest histogram
This involved some deep pluming such that the metrics system needs to be
created in the PantheonCommand, along with trickle down effects into other
consensus engines. This is likely where it should live anyway.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [MINOR] no fixed ports in tests
First enable "0" port in PeerDiscoveryAgent so it binds to
an open port. Then change the test to use two PeerDiscoveryAgents
The change to zero is accomplished by populating the endpoint with
the actual bound socket instead of the value passed in. If it is
zero the value will change otherwise it will be the value passed in.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* render error message to System.err instead of .out
* log and check exception type
* add else
* simplification of explanitory comment
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Metrics being captured initially:
Total number of peers ever connected to
Total number of peers disconnected, by disconnect reason and whether the disconnect was initiated locally or remotely.
Current number of peers
Timing for processing JSON-RPC requests, broken down by method name.
Generic JVM and process metrics (memory used, heap size, thread count, time spent in GC, file descriptors opened, CPU time etc).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Upgrade dependency versions
* All version information is merged into one place
* Upgrade most version to their latest non-test version.
* dependencies are now sorted
Two dependencies were not upgraded:
errorprone - There are new checks that require build or source changes.
vertex - The license to eclipse 2.0 which is not in our current approved license list.
The change is trivial but for tracability it should be done alone.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>