* Number of metrics labels need to match up with constructor
* Number of labels must be consistant, so I split it into two metrics
* Also, naming best practices say that sum() and avg() of a metric
should be meaningful, separating into two metrics fixes that.
* fix style issues (finals, intellij warnings)
* Change NoOpMetrics to check label count.
* Cascading changes to support this in many support classes. Mostly places
we presumed all NoOpMetrics were equals.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Added ability to subscribe to dropped transactions from the transaction pending pool.
Implemented subscription webservice to support this.
* Added metrics to the pending transactions, tracking the number of local and remote transactions in the pool.
* Converted listener management in pending transactions to use the Subscribers util object.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Most peers discovered on the network only define a single UDP port and have no explicitly defined TCP port. At least some of these peers are listening on the TCP port matching the advertised UDP port so assume the ports are the same and attempt a connection.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Biggest change is that UnusedVariable and UnusedMethod went to WARN by
default. Since our build is a no warning build this means we either need
to turn them off or fix them. I mostly opted for the latter. Test code
was mostly fixed, unused loggers were deleted, and other shipped code
was mostly suppressed.
Two less noisy fixes to not use `SortedSet` and to use zero based
comparable results instead of -1, 0, and 1. Also a compiler nit in
errorprone was suppressed, per the description it won't affect us.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PAN-2343] some stubs in progress
* [PAN-2343] getting close to what could be a working contract controller
* [PAN-2343] added the permissioning provider interface to the smart contract controller
* [PAN-2343] smart permissioning queryer works
* [PAN-2343] docs for the smart contract permissioning controller
* [PAN-2343] removed some bad debugging
* [PAN-2343] docs
* [PAN-2343] final
* [PAN-2343] charsets
* [PAN-2343] dependencies that are missing
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Store the instant that a pending transaction is added to the txpool, and expose this out through the api.
* Clock.systemUTC only used once.
* TestClock class added with a factory method for a fixed clock.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* PAN-2057: Accept transactions in the pool with nonce above account sender nonce
* Simplifying if statement
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Create a new PrivateContractAddress generation
* Remove resolveAccountFromPublicState
* Change method sign to BytesValue
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PAN-2341] Created mechanism to publish sync status
* Refactoring WebSockets syncing subscription to respond to SyncStatus events
* Removing rpc-ws-refresh-delay option
* Removing ws-refresh-delay option from ATs
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Adds a PeerValidator that, when the Dao fork milestone is in use, checks that the Dao block is present on each peer when they connect and disconnects them if they are on the wrong chain.
Also:
* Make GetHeadersFromPeer task stricter in validating response matches.
* Update BlockHeadersMessage to return a list of headers
* Add more controls to DeterministicEthScheduler test util
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Skip requesting data we already have but continue to walk the tree to ensure we have all child nodes.
* Don't delete fast sync state on stop. Allow resuming world state downloads.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Return world states as an optional to allow code to handle world states not be available cleanly.
A world state is considered available if it's root node is available.
Delay storing the root hash when fast syncing a world state until the download completes so it isn't considered available and skip downloading world states that are already available.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add Message Frame to Pre compiled contracts
* Wire up Private Transaction Processor
* Add Privacy Precompiled contract Test
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Two changes:
* Stream chains now take up less vertical lines, only breaking on
stream operations.
* Long annotations that span multiple lines no longer have a dangling
parentesis and indent 4 spaces.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Log the milestone blocks in use at startup.
* Remove duplicate word "key" in log message when new key is generated.
* Don't log that mining is paused while behind chain head when mining is not enabled.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add PrivateTransactionHandler
* Implementing PrivateTransactionHandler
* Send Privacy Marker Transaction to Privacy Precompile Smart Contract
* Tests Handler
* Fix up Private Transaction Handler Test
* Remove wildcard import
* Remove Orion tests from PrivateTransactionHandler
* Fix test exception
* Return error if orion call fails
* Fix PrivateTransactionHandler implementation
- The whole base64 rlp encoded private transaction should be sent to Orion rather than the base64 encoded input of the private transaction.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Download receipts
* store blocks without processing transactions
* Only apply light validation during fast sync.
* Mark fast sync chain download as complete when pivot block has been reached.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>