Commit 9d069a9
authored
Fix electra light client types (#6361)
* persist light client updates
* update beacon chain to serve light client updates
* resolve todos
* cache best update
* extend cache parts
* is better light client update
* resolve merge conflict
* initial api changes
* add lc update db column
* fmt
* added tests
* add sim
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into persist-light-client-updates
* fix some weird issues with the simulator
* tests
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into persist-light-client-updates
* test changes
* merge conflict
* testing
* started work on ef tests and some code clean up
* update tests
* linting
* noop pre altair, were still failing on electra though
* allow for zeroed light client header
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into persist-light-client-updates
* merge unstable
* remove unwraps
* remove unwraps
* fetch bootstrap without always querying for state
* storing bootstrap parts in db
* mroe code cleanup
* test
* prune sync committee branches from dropped chains
* Update light_client_update.rs
* merge unstable
* move functionality to helper methods
* refactor is best update fn
* refactor is best update fn
* improve organization of light client server cache logic
* fork diget calc, and only spawn as many blcoks as we need for the lc update test
* resovle merge conflict
* add electra bootstrap logic, add logic to cache current sync committee
* add latest sync committe branch cache
* fetch lc update from the cache if it exists
* fmt
* Fix beacon_chain tests
* Add debug code to update ranking_order ef test
* Fix compare code
* merge conflicts
* merge conflict
* add better error messaging
* resolve merge conflicts
* remove lc update from basicsim
* rename sync comittte variable and fix persist condition
* refactor get_light_client_update logic
* add better comments, return helpful error messages over http and rpc
* pruning canonical non checkpoint slots
* fix test
* rerun test
* update pruning logic, add tests
* fix tests
* fix imports
* fmt
* refactor db code
* Refactor db method
* Refactor db method
* lc electra changes
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into light-client-electra
* add additional comments
* testing lc merkle changes
* lc electra
* update struct defs
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into light-client-electra
* fix merge
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into persist-light-client-bootstrap
* fix merge
* linting
* merge conflict
* prevent overflow
* enable lc server for http api tests
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into light-client-electra
* get tests working:
* remove related TODOs
* fix test lint
* Merge branch 'persist-light-client-bootstrap' of https://github.com/eserilev/lighthouse into light-client-electra
* fix tests
* fix conflicts
* remove prints
* Merge branch 'persist-light-client-bootstrap' of https://github.com/eserilev/lighthouse into light-client-electra
* remove warning
* resolve conflicts
* merge conflicts
* linting
* remove comments
* cleanup
* linting
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into light-client-electra
* pre/post electra light client cached data
* add proof type alias
* move is_empty_branch method out of impl
* add ssz tests for all forks
* refactor beacon state proof codepaths
* rename method
* fmt
* clean up proof logic
* refactor merkle proof api
* fmt
* Merge branch 'unstable' into light-client-electra
* Use superstruct mapping macros
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into light-client-electra
* rename proof to merkleproof
* fmt
* Resolve merge conflicts
* merge conflicts1 parent 40d3423 commit 9d069a9
File tree
14 files changed
+490
-185
lines changed- beacon_node
- beacon_chain
- src
- tests
- store/src
- consensus/types/src
- testing/ef_tests
- src
- cases
- tests
14 files changed
+490
-185
lines changedLines changed: 17 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
21 | 15 | | |
22 | | - | |
| 16 | + | |
23 | 17 | | |
24 | 18 | | |
25 | 19 | | |
| |||
69 | 63 | | |
70 | 64 | | |
71 | 65 | | |
72 | | - | |
| 66 | + | |
73 | 67 | | |
74 | | - | |
75 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
76 | 72 | | |
77 | 73 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 74 | | |
84 | 75 | | |
85 | 76 | | |
| |||
413 | 404 | | |
414 | 405 | | |
415 | 406 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | 407 | | |
421 | 408 | | |
422 | 409 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
426 | 413 | | |
427 | 414 | | |
428 | 415 | | |
429 | 416 | | |
430 | 417 | | |
431 | 418 | | |
432 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
433 | 425 | | |
434 | 426 | | |
435 | | - | |
| 427 | + | |
436 | 428 | | |
437 | 429 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 430 | + | |
| 431 | + | |
444 | 432 | | |
445 | 433 | | |
446 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | 209 | | |
217 | 210 | | |
218 | 211 | | |
| |||
353 | 346 | | |
354 | 347 | | |
355 | 348 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | 349 | | |
362 | 350 | | |
363 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
641 | 640 | | |
642 | 641 | | |
643 | 642 | | |
644 | | - | |
| 643 | + | |
645 | 644 | | |
646 | 645 | | |
647 | 646 | | |
648 | 647 | | |
649 | 648 | | |
650 | 649 | | |
651 | | - | |
652 | | - | |
| 650 | + | |
653 | 651 | | |
654 | 652 | | |
655 | 653 | | |
| |||
677 | 675 | | |
678 | 676 | | |
679 | 677 | | |
680 | | - | |
| 678 | + | |
681 | 679 | | |
682 | 680 | | |
683 | 681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2506 | 2506 | | |
2507 | 2507 | | |
2508 | 2508 | | |
2509 | | - | |
2510 | | - | |
2511 | | - | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
2512 | 2517 | | |
2513 | | - | |
2514 | | - | |
2515 | | - | |
2516 | | - | |
2517 | | - | |
2518 | | - | |
2519 | | - | |
2520 | | - | |
2521 | | - | |
2522 | | - | |
2523 | | - | |
2524 | | - | |
2525 | | - | |
2526 | | - | |
2527 | | - | |
2528 | | - | |
2529 | | - | |
2530 | | - | |
2531 | | - | |
2532 | | - | |
2533 | 2518 | | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
2534 | 2522 | | |
2535 | | - | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
2536 | 2567 | | |
2537 | 2568 | | |
2538 | 2569 | | |
| |||
2568 | 2599 | | |
2569 | 2600 | | |
2570 | 2601 | | |
2571 | | - | |
2572 | | - | |
2573 | | - | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
2578 | | - | |
2579 | | - | |
2580 | | - | |
2581 | | - | |
2582 | | - | |
| 2602 | + | |
2583 | 2603 | | |
2584 | 2604 | | |
2585 | 2605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
61 | 70 | | |
62 | 71 | | |
63 | 72 | | |
| |||
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
118 | | - | |
| 127 | + | |
119 | 128 | | |
120 | 129 | | |
121 | 130 | | |
| |||
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
129 | | - | |
| 138 | + | |
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
134 | | - | |
| 143 | + | |
135 | 144 | | |
136 | 145 | | |
137 | 146 | | |
138 | 147 | | |
139 | | - | |
| 148 | + | |
140 | 149 | | |
141 | 150 | | |
142 | 151 | | |
143 | 152 | | |
144 | | - | |
| 153 | + | |
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
| |||
155 | 164 | | |
156 | 165 | | |
157 | 166 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 167 | + | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
168 | 175 | | |
169 | 176 | | |
170 | 177 | | |
171 | | - | |
| 178 | + | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
176 | | - | |
| 183 | + | |
177 | 184 | | |
178 | 185 | | |
179 | 186 | | |
180 | 187 | | |
181 | | - | |
| 188 | + | |
182 | 189 | | |
183 | 190 | | |
184 | 191 | | |
185 | 192 | | |
186 | | - | |
| 193 | + | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| |||
210 | 217 | | |
211 | 218 | | |
212 | 219 | | |
213 | | - | |
214 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
215 | 232 | | |
216 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
217 | 244 | | |
0 commit comments