Adrian Sutton
bf710da941
Add metrics for EthScheduler executors ( #878 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
708e866c21
Reduce logging noise from invalid peer discovery packets and handshaking ( #876 )
...
* Reduce logging for invalid peer discovery packets. The message is enough to locate the source of the rejection.
* Reduce ECIESHandshaker logging to trace since it documents a normal flow through the handshake process.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
8df9a9622b
Ensure exceptions in suppliers passed to EthScheduler are propagated to the returned CompletableFuture. ( #884 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
1da0008666
[PAN-2305] Detect stalled world state downloads ( #875 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
312f285a15
[MINOR] Fixing file locations under docker ( #885 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
a2e187340d
More bootnodes for goerli ( #880 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
406c7f32f6
[PAN-2239] Disconnect peer removed from node whitelist ( #877 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
732ae450c4
[PAN-2270] Rename password hash command ( #879 )
...
* PAN-2270: Rename password hash command
* Fixing test
* PR review
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
MadelineMurray
1dd61a2a12
Added perm_reloadPermissionsFromFile
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
33e9f0e508
[PAN-2196] Implement world state cancel ( #867 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
bbcfbeac9e
Select new pivot block when world state becomes unavailable ( #869 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
463fc3994e
Introduce FutureUtils to reduce duplicated code around CompletableFuture ( #868 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
48986b70c2
[BUG] admin_addPeer isn't periodically checking maintained connections ( #871 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Trent Mohay
6af7ab1b93
Break out RoundChangeCertificate validation ( #864 )
...
With upcoming changes to remove the NewRound message, and place
the RoundChangeCertificate in the Proposal, it was decided to break
out the RoundChangeCertiifcate validation into a separate file
to minimise changes during message restructuring.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
60b0137368
Fix state download race condition by creating a TaskQueue API ( #853 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
c0291635d0
Renaming authentication config file cli command ( #865 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
556877209e
Disconnect peers where the common ancestor is before our fast sync pivot ( #862 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
MadelineMurray
af4d73bcf1
IBFT config options ( #861 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
S. Matthew English
aae9f5f90c
[NC-2058] initial scaffolding re block propagation ( #860 )
...
* o
* add test
* clean up
* scaffolding
* update
* update
* comments
* add test
* update
* update
* update
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
913c950276
Fix NullPointerException - complete future with fast sync state not null. ( #859 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
8ad0e4ab63
[NC-2046] check for invalid token ( #856 )
...
* check the token if authentication enabled, regardless of user optional status
* more tests
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
d3b9211b82
Moving NodeWhitelistController to permissioning package ( #855 )
...
* Moving NodeWhitelistController to permissioning package
* Refactoring unit tests
* Fix string.format
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
MadelineMurray
1dfe3e8eb7
Added tutorial to create permissioned network ( #850 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
90c4a925aa
Tidy-up FastSyncState persistence ( #845 )
...
* Make the use of an existing fast sync state more explicit - passing it into the FastSyncDownloader.start method.
* Simplify FastSyncState constructors.
* Move PivotHeaderStorage to be FastSyncStateStorage and fully encapsulate loading and storing of FastSyncState instances.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
e09461944e
Make default pivot distance from head much closer to the chain head to reduce the chance of pruning limiting it's availability before it's completed. ( #847 )
...
Request 384 nodes per request instead of 200 since that's how many geth will allow returning.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
38af7b0512
Support resuming fast-sync downloads ( #848 )
...
* 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>
6 years ago
Sally MacFarlane
9d69c8eaf1
changed / to : ( #852 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
d8cc56dd7f
Websocket acceptance tests now can use websockets ( #851 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mark-terry
3c7ed68be6
[NC-2218] RPC auth validation + tests. ( #846 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
MadelineMurray
68ad11e9fe
Genesis fix ( #835 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
92517350fb
[NC-2046] JWT authentication for JSON-RPC ( #815 )
...
* added JsonRpcHttpService.isPermitted(User, JsonRpcMethod) and JsonRpcMethod.getPermissions() and unit tests
* 401 if no auth token
* added DSL condition for NetVersion to fail because Unauthorized
* Added DSL conditions to do login and set auth token, and AwaitLoginResponse
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
9da64ef6e5
Store pivot block header once it's downloaded. ( #836 )
...
Allow fast sync to resume if chain head is not genesis but a fast sync is still in progress.
If present, use the stored pivot block header when restarting.
Extract the fast sync logic out of DefaultSynchronizer into it's own class.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
0f2d7d7c65
Speed up shutdown time ( #838 )
...
Modify EthScheduler to use shutdownNow immediately instead of trying shutdown first.
EthScheduler executes a lot of tasks which wait for responses from the network and may have a significant number of tasks queued. Using shutdown would wait for all network responses and all queued tasks to complete before exiting which almost always reaches the 2 minute timeout allowed before switching to shutdownNow. All tasks have to cope with being unexpectedly terminated (as would happen with a kill -9) so there's no reason to have this extra delay.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
2091cd0dc3
Extract creation and init of ProtocolContext into a re-usable method ( #828 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
b87df9281d
Handle unavailable world states ( #824 )
...
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>
6 years ago
S. Matthew English
1174e77873
Integration of RecursivePeerRefreshState and PeerDiscoveryController ( #420 )
...
* minimal changeset
* candidate.getPeer().getStatus().equals(PeerDiscoveryStatus.BONDED)
* update
* fix peerSeenTwice
* update++
* update
* update
* update
* yaya
g
* yaya
g
* Ensure round timers are cancelled and many other cleanups.
* Shutdown peer refresh state executors on stop.
* Trigger new recursive peer search when refreshing peer table. Reduce round timeout to 5 seconds.
* tests passing
* cleaning up
* remove useless, inbhibitive artifact from nearestPeers method
* add round cieling
* remove mock from test
* working
* revision to RecursivePeerRefreshStateTest
* test
* Use TimerUtil to schedule timeout instead of our own ScheduledExecutorService.
* Remove isBootstrap from Interaction. Start adding tests for RecursivePeerRefreshState.
* update to bootstrapPeersRetriesSent
* fics helper method
* cleaning up
* cleaning up tests
* implement shouldOnlyQueryClosestThreeNeighbours
* update to tests
* shouldBondWithNewNeighboursWhenSomeRequestsTimeOut
* increase test coverage
* spotless
* test update
* adding tests
* shouldNotQueryNodeThatIsAlreadyQueried
* shouldBondWithPeersInNeighboursResponseReceivedAfterTimeout
* simplification
* add tests
* Fix tests to handle whitelisting.
* Ensure late bonding or neighbours responses don't kick off a new round.
* cleaning up
* add for loop
* respoins with pong
* concis
* failing test
* test passing
* update
* fix to tableRefreshSingleNode
* update coment
* Update ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryControllerTest.java
Co-Authored-By: s-matthew-english <s.matthew.english@gmail.com>
* update
* tableRefreshSingleNode
* deconstructedIncrementalUpdateBootstrapPeersList
* setKeccak256
* Update ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/RecursivePeerRefreshStateTest.java
Co-Authored-By: s-matthew-english <s.matthew.english@gmail.com>
* Update ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/RecursivePeerRefreshStateTest.java
Co-Authored-By: s-matthew-english <s.matthew.english@gmail.com>
* Update ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/RecursivePeerRefreshStateTest.java
Co-Authored-By: s-matthew-english <s.matthew.english@gmail.com>
* Update ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/RecursivePeerRefreshStateTest.java
Co-Authored-By: s-matthew-english <s.matthew.english@gmail.com>
* synchronized
* update
* merge
* filtering out known peers
* update
* update
* update II
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
c996907e55
Add metrics to world state downloader to track number of pending requests, total requests completed and total requests retried. ( #837 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Danno Ferrin
a18f1663c6
shutdown improvements ( #841 )
...
* register sub tasks in ParalellImportChainSegmentTask
* rememger and shutdown eth services in EthScheduler
Fixes #768
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
026d157680
Remove unnecessary sleep ( #842 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Eric Kellstrand
2c8a607fd1
[797] "Good First Issue" Link is Broken in CONTRIBUTING.md ( #840 )
...
- Fixed the "Good First Issue" Link in "Your First Code Contribution" section of /CONTRIBUTING.md
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
6551183a8d
[NC-2118] Method to reload permissions file ( #834 )
...
* Extracting EnodeURL logic to specific object
* Moving permissioning config builder to permissioning package
* Validating accounts in permissions file
* Implemented controller reload method
* Reload whitelist from file API method
* Spotless
* Refactoring account validation
* Errorprone
* Fixing tests after rebase
* Spotless
* PR review
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Jason Frame
50c5baaf5a
Clique should use beneficiary of zero on epoch blocks ( #833 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Jason Frame
1bac2c4c67
Clique should ignore proposals for address 0 ( #831 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
MadelineMurray
dfdf994e2d
Permissioning overview ( #812 )
...
Added permissions doc
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
5a1389b970
[NC-2044] Added the authentication service to the websocket service and cli and acceptance tests ( #829 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
f6bb1b2279
Log errors that occur while finding a common ancestor ( #814 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
77581bcdfb
Attempt to fix intermittency in FullSyncDownloaderTest ( #830 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
42088311a6
When a new block message is received, update the peer's chain head to be the parent block, not the received block. ( #819 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Trent Mohay
ccbc879e32
Validate Ibft vanity data length ( #826 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Trent Mohay
ba9b648dc8
Shuffled log levels ( #813 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago