Commit 9667dc2
Implement checkpoint sync (#2244)
## Issue Addressed
Closes #1891
Closes #1784
## Proposed Changes
Implement checkpoint sync for Lighthouse, enabling it to start from a weak subjectivity checkpoint.
## Additional Info
- [x] Return unavailable status for out-of-range blocks requested by peers (#2561)
- [x] Implement sync daemon for fetching historical blocks (#2561)
- [x] Verify chain hashes (either in `historical_blocks.rs` or the calling module)
- [x] Consistency check for initial block + state
- [x] Fetch the initial state and block from a beacon node HTTP endpoint
- [x] Don't crash fetching beacon states by slot from the API
- [x] Background service for state reconstruction, triggered by CLI flag or API call.
Considered out of scope for this PR:
- Drop the requirement to provide the `--checkpoint-block` (this would require some pretty heavy refactoring of block verification)
Co-authored-by: Diva M <divma@protonmail.com>1 parent 280e4fe commit 9667dc2
File tree
71 files changed
+4013
-460
lines changed- beacon_node
- beacon_chain
- src
- tests
- client
- src
- eth2_libp2p/src
- behaviour
- peer_manager
- rpc/codec
- types
- http_api
- src
- tests
- network/src
- beacon_processor/worker
- router
- sync
- backfill_sync
- range_sync
- src
- store/src
- book/src
- common/eth2
- src
- consensus
- fork_choice/tests
- state_processing/src
- per_block_processing
- types
- src
- beacon_state
- lcli
- src
- lighthouse/tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
71 files changed
+4013
-460
lines changedSome 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 | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
431 | 432 | | |
432 | 433 | | |
433 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
434 | 438 | | |
435 | 439 | | |
436 | 440 | | |
437 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
438 | 452 | | |
439 | 453 | | |
440 | 454 | | |
| |||
620 | 634 | | |
621 | 635 | | |
622 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
623 | 643 | | |
624 | 644 | | |
625 | 645 | | |
| |||
657 | 677 | | |
658 | 678 | | |
659 | 679 | | |
660 | | - | |
| 680 | + | |
| 681 | + | |
661 | 682 | | |
662 | 683 | | |
663 | 684 | | |
| |||
667 | 688 | | |
668 | 689 | | |
669 | 690 | | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
670 | 695 | | |
671 | 696 | | |
672 | 697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
504 | 507 | | |
505 | 508 | | |
506 | 509 | | |
| |||
708 | 711 | | |
709 | 712 | | |
710 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
711 | 717 | | |
712 | 718 | | |
713 | 719 | | |
| |||
1115 | 1121 | | |
1116 | 1122 | | |
1117 | 1123 | | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
1118 | 1137 | | |
1119 | 1138 | | |
1120 | 1139 | | |
| |||
0 commit comments