This repository was archived by the owner on Jul 4, 2022. It is now read-only.
Commit dbe2031
client/network: Use request response for block requests (#7478)
* client/network: Add scaffolding for finality req to use req resp
#sc
* client/network/src/finality_requests: Remove
* client/network/src/behaviour: Pass request id down to sync
* client/network: Use request response for block requests
* client/network: Move handler logic into *_*_handler.rs
* client/network: Track ongoing finality requests in protocol.rs
* client/network: Remove commented out finalization initialization
* client/network: Add docs for request handlers
* client/network/finality_request_handler: Log errors
* client/network/block_request_handler: Log errors
* client/network: Format
* client/network: Handle block request failure
* protocols/network: Fix tests
* client/network/src/behaviour: Handle request sending errors
* client/network: Move response handling into custom method
* client/network/protocol: Handle block response errors
* client/network/protocol: Remove tracking of obsolete requests
* client/network/protocol: Remove block request start time tracking
This will be handled generically via request-responses.
* client/network/protocol: Refactor on_*_request_started
* client/network: Pass protocol config instead of protocol name
* client/network: Pass protocol config in tests
* client/network/config: Document request response configs
* client/network/src/_request_handler: Document protocol config gen
* client/network/src/protocol: Document Peer request values
* client/network: Rework request response to always use oneshot
* client/network: Unified metric reporting for all request protocols
* client/network: Move protobuf parsing into protocol.rs
* client/network/src/protocol: Return pending events after poll
* client/network: Improve error handling and documentation
* client/network/behaviour: Remove outdated error types
* Update client/network/src/block_request_handler.rs
Co-authored-by: Ashley <[email protected]>
* Update client/network/src/finality_request_handler.rs
Co-authored-by: Ashley <[email protected]>
* client/network/protocol: Reduce reputation on timeout
* client/network/protocol: Refine reputation changes
* client/network/block_request_handler: Set and explain queue length
* client/service: Deny block requests when light client
* client/service: Fix role matching
* client: Enforce line width
* client/network/request_responses: Fix unit tests
* client/network: Expose time to build response via metrics
* client/network/request_responses: Fix early connection closed error
* client/network/protocol: Fix line length
* client/network/protocol: Disconnect on most request failures
* client/network/protocol: Disconnect peer when oneshot is canceled
* client/network/protocol: Disconnect peer even when connection closed
* client/network/protocol: Remove debugging log line
* client/network/request_response: Use Clone::clone for error
* client/network/request_response: Remove outdated comment
With libp2p v0.33.0 libp2p-request-response properly sends inbound
failures on connections being closed.
Co-authored-by: Addie Wagenknecht <[email protected]>
Co-authored-by: Ashley <[email protected]>1 parent 1b840aa commit dbe2031
File tree
17 files changed
+774
-1293
lines changed- .maintain/sentry-node
- client
- network
- src
- gossip
- service
- test
- src
- service/src
17 files changed
+774
-1293
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
62 | | - | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 101 | + | |
114 | 102 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
119 | 106 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
124 | 113 | | |
125 | 114 | | |
126 | 115 | | |
| |||
180 | 169 | | |
181 | 170 | | |
182 | 171 | | |
183 | | - | |
184 | 172 | | |
185 | 173 | | |
186 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
187 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
188 | 183 | | |
189 | 184 | | |
190 | 185 | | |
191 | 186 | | |
192 | 187 | | |
193 | 188 | | |
194 | | - | |
195 | 189 | | |
196 | 190 | | |
197 | 191 | | |
| 192 | + | |
| 193 | + | |
198 | 194 | | |
199 | 195 | | |
200 | 196 | | |
| |||
236 | 232 | | |
237 | 233 | | |
238 | 234 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
246 | 243 | | |
247 | 244 | | |
248 | 245 | | |
| |||
331 | 328 | | |
332 | 329 | | |
333 | 330 | | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
355 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
356 | 345 | | |
357 | 346 | | |
358 | 347 | | |
| |||
401 | 390 | | |
402 | 391 | | |
403 | 392 | | |
404 | | - | |
405 | | - | |
| 393 | + | |
406 | 394 | | |
407 | | - | |
408 | | - | |
| 395 | + | |
409 | 396 | | |
410 | 397 | | |
411 | 398 | | |
412 | 399 | | |
413 | 400 | | |
414 | 401 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | 402 | | |
450 | 403 | | |
451 | 404 | | |
| |||
0 commit comments