This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Commit 92633bb
authored
chainHead: Add support for storage pagination and cancellation (#14755)
* chainHead/api: Add `chain_head_unstable_continue` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/subscriptions: Register operations for pagination
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/subscriptions: Merge limits with registered operation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/subscriptions: Expose the operation state
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/storage: Generate WaitingForContinue event
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead: Use the continue operation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/tests: Adjust testing to the new storage interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/config: Make pagination limit configurable
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/tests: Adjust chainHeadConfig
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/tests: Check pagination and continue method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/api: Add `chainHead_unstable_stopOperation` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/subscription: Add shared atomic state for efficient alloc
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead: Implement operation stop
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/tests: Check that storage ops can be cancelled
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/storage: Change docs for query_storage_iter_pagination
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/subscriptions: Fix merge conflicts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead: Replace `async-channel` with `tokio::sync`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chainHead/subscription: Add comment about the sender/recv continue
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>1 parent 6b07b97 commit 92633bb
File tree
6 files changed
+749
-152
lines changed- client/rpc-spec-v2/src/chain_head
- subscription
6 files changed
+749
-152
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 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 | + | |
122 | 149 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
| 94 | + | |
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
| |||
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
103 | 114 | | |
104 | 115 | | |
105 | 116 | | |
| |||
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
| 138 | + | |
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
| |||
232 | 244 | | |
233 | 245 | | |
234 | 246 | | |
235 | | - | |
| 247 | + | |
236 | 248 | | |
237 | 249 | | |
238 | 250 | | |
| |||
243 | 255 | | |
244 | 256 | | |
245 | 257 | | |
| 258 | + | |
| 259 | + | |
246 | 260 | | |
247 | 261 | | |
248 | 262 | | |
| |||
252 | 266 | | |
253 | 267 | | |
254 | 268 | | |
255 | | - | |
| 269 | + | |
256 | 270 | | |
257 | 271 | | |
258 | 272 | | |
| |||
268 | 282 | | |
269 | 283 | | |
270 | 284 | | |
271 | | - | |
| 285 | + | |
272 | 286 | | |
273 | 287 | | |
274 | 288 | | |
275 | 289 | | |
276 | 290 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 291 | + | |
281 | 292 | | |
282 | 293 | | |
283 | 294 | | |
| |||
337 | 348 | | |
338 | 349 | | |
339 | 350 | | |
340 | | - | |
| 351 | + | |
341 | 352 | | |
342 | 353 | | |
343 | 354 | | |
| |||
349 | 360 | | |
350 | 361 | | |
351 | 362 | | |
352 | | - | |
353 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
354 | 369 | | |
355 | 370 | | |
356 | | - | |
| 371 | + | |
357 | 372 | | |
358 | 373 | | |
359 | 374 | | |
360 | 375 | | |
361 | 376 | | |
362 | | - | |
| 377 | + | |
363 | 378 | | |
364 | 379 | | |
365 | 380 | | |
| |||
379 | 394 | | |
380 | 395 | | |
381 | 396 | | |
382 | | - | |
| 397 | + | |
383 | 398 | | |
384 | 399 | | |
385 | 400 | | |
| |||
401 | 416 | | |
402 | 417 | | |
403 | 418 | | |
| 419 | + | |
404 | 420 | | |
405 | 421 | | |
406 | 422 | | |
407 | 423 | | |
408 | 424 | | |
409 | 425 | | |
410 | | - | |
| 426 | + | |
411 | 427 | | |
412 | 428 | | |
413 | 429 | | |
414 | 430 | | |
415 | 431 | | |
416 | | - | |
| 432 | + | |
417 | 433 | | |
418 | 434 | | |
419 | 435 | | |
420 | 436 | | |
421 | 437 | | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
| 438 | + | |
426 | 439 | | |
427 | 440 | | |
428 | 441 | | |
| |||
443 | 456 | | |
444 | 457 | | |
445 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
446 | 490 | | |
0 commit comments