This repository was archived by the owner on Jul 1, 2025. It is now read-only.
Commit 506fa71
Add GetBodiesFromPeerTask (#8040)
* 7311: Add PeerTask system for use in future PRs
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Clean up some warnings
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add feature toggle for enabling use of the peertask system where available
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Remove log used for testing, apply spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add private constructor to PeerTaskFeatureToggle to prevent instantiation
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Switch to logging a warning instead of throwing an exception when initializing PeerTaskFeatureToggle multiple times
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Update javadoc to match previous commit
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix broken BesuCommandTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: add class
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Move PeerTaskFeatureToggle to more appropriate location
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: add X prefix to peertask-system-enabled
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Move --Xpeertask-system-enabled out of BesuCommand and make hidden
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add GetReceiptsFromPeerTask
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Move isPeerTaskSystemEnabled to SynchronizerOptions
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix javadoc issue
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix javadoc issue
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Move PeerTaskFeatureToggleTestHelper to TestUtil and fix RunnerTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Remove PeerTaskFeatureToggle in favor of including isPeerTaskSystemEnabled in SynchronizerConfiguration
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Adjust to the removal of PeerTaskFeatureToggle and use SynchronizerConfiguration to get the toggle instead
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Reduce timeout in PeerTaskRequestSender to 5s
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Refactor PeerManager to be an interface
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix up compile errors after merge
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix MetricsAcceptanceTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix MetricsAcceptanceTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix DownloadReceiptsStep when using peer task system
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Rename PeerManager to PeerSelector
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Reword PeerSelector javadoc to avoid implementation details
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Use ConcurrentHashMap in DefaultPeerSelector
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Reword trace log in DefaultPeerSelector
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Remove unused imports
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Use a 1 second delay between retries in PeerTaskExecutor to match old implementation
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add testGetPeerButNoPeerMatchesFilter to DefaultPeerSelectorTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add testGetPeerButNoPeerMatchesFilter to DefaultPeerSelectorTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix MetricsAcceptanceTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix MetricsAcceptanceTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Modify PeerTaskExecutor metric to include response time from peer
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Use SubProtocol instead of subprotocol name string in PeerTask
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: rename timing context to ignored to prevent intellij warnings
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Use constants for number of retries
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Convert PeerTaskExecutorResult to a record
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Rename PeerTaskBehavior to PeerTaskRetryBehavior
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Move peer selection logic to PeerSelector
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix up everything broken after merge
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Attempt to improve performance of peer task system in pipeline
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: fix compile check
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix broken workflow
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Reduce logging in JsonRpcExecutor to trace level
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: More changes in DownloadReceiptsStep
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Rework DownloadReceiptsStep
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Make changes as discussed in walkthrough meeting
Remove DefaultPeerSelector, make EthPeers implement PeerSelector interface, and add PeerTask.getPeerRequirementFilter
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Update after merge and make discussed changes from walkthrough discussion
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Change to regular HashMap
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Remove runtime exception again
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Rename getPeerTaskBehavior to getPeerTaskRetryBehavior
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Rename getPeerTaskBehavior to getPeerTaskRetryBehavior
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Rework PeerTaskExecutor retry system to be 0-based
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix up compile errors after merge
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix broken DownloadReceiptsStepTest test
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Move GetReceipts to services worker for parallelism
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Refactor peer task system usage in DownloadReceiptsStep to better match old system
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Remove unused async methods in PeerTaskExecutor
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Return Optional<EthPeer> in PeerSelector.getPeer and utilise existing peer selection behavior in EthPeers
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Update after merge
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Redo getPeer again to include hasAvailableRequestCapacity check
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add protocol spec supplier to GetReceiptsFromPeerTask
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Rework getPeer again to use LEAST_TO_MOST_BUSY comparator
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Import PeerNotConnected class instead of using fully qualified class name
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Change to specifying retry counts in PeerTask instead of behavior enums
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: clean up after merge
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: clean up after merge
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix up javadoc
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add additional metrics to PeerTaskExecutor
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add Predicate to PeerTask to check for partial success
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix incorrect name on isPartialSuccessTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Implement isPartialSuccess and add unit tests
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add partialSuccessCounter and inflightRequestGauge in PeerTaskExecutor
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Also filter by whether a peer is fully validated
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Remove unneeded throws in RunnerTest
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix up inflight requests gauge in PeerTaskExecutor
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Update plugin api hash
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Update plugin api hash
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add javadoc to LabelledGauge.isLabelsObserved
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Update plugin-api hash
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Update changelog
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Handle headers with no receipts as a special case in DownloadReceiptsStep
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Complete merge
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Use taskName instead of className for labelNames
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Use snake_case for metric names
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Use _total metric name suffix
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: rework partial success handling
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Update GetReceiptsFromPeerTask with partialSuccess changes
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Add default implementation to LabelledGauge.isLabelsObserved
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix broken unit test
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Rename parseResponse to processResponse
Signed-off-by: Matilda Clerke <[email protected]>
* add possibility to use the new peer task system when downloading the bodies
Signed-off-by: [email protected] <[email protected]>
* fix loop
Signed-off-by: [email protected] <[email protected]>
* 7311: Wrap peer task system usage in ethScheduler call to match other usages
Signed-off-by: Matilda Clerke <[email protected]>
* small fixes
Signed-off-by: [email protected] <[email protected]>
* update API change
Signed-off-by: [email protected] <[email protected]>
* spotless
Signed-off-by: [email protected] <[email protected]>
* 7311: apply spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Move check for empty trie hash into GetReceiptsFromPeerTask and update unit test to test for this functionality
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix compile issue after merge
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Remove BodyValidator and update code and test to match
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: spotless
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix up pre-fill and add test to test failure scenario
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Use ProtocolSchedule.anyMatch to find if any ProtocolSpecs are PoS, remove new usages of currentProtocolSpecSupplier
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Only attempt to remove headers on successful requests
Signed-off-by: Matilda Clerke <[email protected]>
* 7311: Fix broken stuff after merge
Signed-off-by: Matilda Clerke <[email protected]>
* spotless
Signed-off-by: [email protected] <[email protected]>
* Fix up compile errors after merge
Signed-off-by: Matilda Clerke <[email protected]>
* Add PeerTaskExecutor usage for GetBodies in DownloadHeaderSequenceTask
Signed-off-by: Matilda Clerke <[email protected]>
* Add PeerTaskExecutor usage for GetBodies in ForwardSyncStep and apply spotless
Signed-off-by: Matilda Clerke <[email protected]>
* Allow custom retries against other peers in GetBodiesFromPeerTask
Signed-off-by: Matilda Clerke <[email protected]>
* Fix infinite loop in CheckPointSyncChainDownloaderTest
Signed-off-by: Matilda Clerke <[email protected]>
* spotless
Signed-off-by: Matilda Clerke <[email protected]>
* Update CompleteBlocksWithPeerTask.getBlocks to retrieveBlocksFromPeers and add javadoc
Signed-off-by: Matilda Clerke <[email protected]>
* Add javadoc to GetBodiesFromPeerTask
Signed-off-by: Matilda Clerke <[email protected]>
* 7582: Simplify withdrawals validation
Signed-off-by: Matilda Clerke <[email protected]>
---------
Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
Co-authored-by: [email protected] <[email protected]>1 parent 11bf6aa commit 506fa71
File tree
19 files changed
+970
-51
lines changed- ethereum/eth/src
- main/java/org/hyperledger/besu/ethereum/eth
- manager/peertask/task
- sync
- backwardsync
- fastsync
- fullsync
- tasks
- test/java/org/hyperledger/besu/ethereum/eth
- manager/peertask/task
- sync
- backwardsync
- checkpointsync
- fullsync
- tasks
19 files changed
+970
-51
lines changedLines changed: 163 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | | - | |
47 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
48 | 68 | | |
49 | 69 | | |
Lines changed: 46 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
86 | 113 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
96 | 123 | | |
97 | 124 | | |
98 | 125 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncDownloader.java
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
0 commit comments