Commit 0b8494d
Revert "perf(rpc): search the block log for a record instead of scanning it"
This reverts 539d8da. The change duplicates #87, which was opened two days
earlier and makes the same argument: `record_for_hash` has the height from the
block tree, the log is ordered by height, so the lookup is a search.
#87 also covers `Context::block_hash_at_height`, which 539d8da missed.
What 539d8da had and #87 does not - a benchmark, the sweep-against-a-scan
equivalence tests, `block_by_height_without_an_applied_tip_reads_the_log`, and
five further mutations - moves to #87 rather than being dropped.
This branch keeps only the chain-info fold, which nothing else covers.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 539d8da commit 0b8494d
5 files changed
Lines changed: 52 additions & 455 deletions
File tree
- crates
- node/src
- rpc
- benches
- src
- docs/benchmarks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
301 | 342 | | |
302 | 343 | | |
303 | 344 | | |
| |||
306 | 347 | | |
307 | 348 | | |
308 | 349 | | |
309 | | - | |
310 | 350 | | |
311 | 351 | | |
312 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
This file was deleted.
0 commit comments