Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Implement checkpoint sync #2244

Closed
wants to merge 49 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
719a934
Implement starting from a weak subectivity state
michaelsproul Feb 18, 2021
4dcf2e7
Support for historical blocks
michaelsproul Feb 23, 2021
3aa7c7b
Fix iterators and StatusMessage processing
michaelsproul Mar 4, 2021
366ae60
Merge remote-tracking branch 'origin/unstable' into weak-subj-sync
michaelsproul Mar 4, 2021
d8e8d97
Implement schema migration
michaelsproul Mar 4, 2021
6cdac53
Remove some TODOs/FIXMEs
michaelsproul Mar 5, 2021
22867d7
Clean up APIs, fix several TODOs
michaelsproul Mar 8, 2021
dd55207
Merge branch 'unstable' into weak-subj-sync
divagant-martian May 3, 2021
f86032f
Merge remote-tracking branch 'origin/unstable' into weak-subj-sync
michaelsproul Aug 4, 2021
0066231
Fixes for merge issues, block separation
michaelsproul Aug 4, 2021
25306fc
Add missed comma
michaelsproul Aug 4, 2021
6cdb165
Improve lcli pretty-ssz & logging
michaelsproul Aug 5, 2021
20a97a4
Add database HTTP APIs
michaelsproul Aug 5, 2021
8d812ce
Fix clippy
michaelsproul Aug 6, 2021
d966be6
Fix block_root_at_slot for historic blocks
michaelsproul Aug 6, 2021
5221ac6
Add consistency checks
michaelsproul Aug 16, 2021
9b290f8
Fix Altair test by setting spec
michaelsproul Aug 16, 2021
6b79baf
Add --checkpoint-sync-url
michaelsproul Aug 16, 2021
5e92a7a
Merge remote-tracking branch 'origin/unstable' into weak-subj-sync
michaelsproul Aug 16, 2021
8865e90
Update Cargo.lock
michaelsproul Aug 16, 2021
8392cac
Avoid looking up non-existent restore points
michaelsproul Aug 17, 2021
4283c1e
Remove dbg! statements
michaelsproul Aug 17, 2021
d292e3d
Implement historic state reconstruction
michaelsproul Aug 18, 2021
6d2a152
Merge remote-tracking branch 'origin/unstable' into weak-subj-sync
michaelsproul Aug 30, 2021
0ce85c4
Check initial state genesis vals root
michaelsproul Aug 30, 2021
1719ae8
Merge remote-tracking branch 'origin/unstable' into weak-subj-sync
michaelsproul Aug 30, 2021
d3738f3
Fix unused var warning
michaelsproul Aug 31, 2021
215941b
Allow one extra block in historic batch
michaelsproul Aug 31, 2021
149ae88
Allow >1 extra historic blocks
michaelsproul Sep 2, 2021
db96456
Return num blocks imported
michaelsproul Sep 3, 2021
ed18349
Mark backfill complete if genesis block reached
michaelsproul Sep 6, 2021
8dc823f
Fix overrun in load_blocks_to_replay
michaelsproul Sep 6, 2021
1c147a7
Verify backfill proposer signatures
michaelsproul Sep 8, 2021
11feeb8
Merge remote-tracking branch 'origin/unstable' into weak-subj-sync
michaelsproul Sep 10, 2021
c96a027
Background state reconstruction
michaelsproul Sep 9, 2021
5eee72f
API clean up and docs
michaelsproul Sep 10, 2021
6b7c140
Add block_backfill_complete from Age's branch
michaelsproul Sep 10, 2021
edbc3ce
Appease clippy
michaelsproul Sep 10, 2021
ff6700d
Test clean up
michaelsproul Sep 10, 2021
599956f
Remove redundant migration_mutex
michaelsproul Sep 10, 2021
8f4bf6e
Updates from self-review
michaelsproul Sep 10, 2021
f06bf2a
Network Update for Weak Subjectivity Sync (#2561)
AgeManning Sep 14, 2021
81ed51a
Additional checkpoint sync logs (#2599)
paulhauner Sep 15, 2021
8e32a1e
Log about historical backfill less frequently (#2600)
paulhauner Sep 16, 2021
b404f4d
Don't downscore peers in batch sync when disconnecting
AgeManning Sep 20, 2021
30e2219
Address review comments
michaelsproul Sep 20, 2021
6dbedfe
Tweak CLI flag help text
michaelsproul Sep 20, 2021
fc28aeb
Improved chain resuming
AgeManning Sep 20, 2021
c85c8ab
Fix clippy
michaelsproul Sep 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove some TODOs/FIXMEs
michaelsproul committed Mar 5, 2021

Verified

This commit was signed with the committer’s verified signature.
michaelsproul Michael Sproul
commit 6cdac53a97776ff7b5720470538168a0221135cb
5 changes: 2 additions & 3 deletions beacon_node/beacon_chain/src/historical_blocks.rs
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@ pub enum HistoricalBlockError {
slot: Slot,
oldest_block_slot: Slot,
},
NoAnchorInfo,
}

// TODO(sproul): implement and use in sync
impl<T: BeaconChainTypes> BeaconChain<T> {
/// Store a batch of historical blocks in the database.
///
@@ -27,8 +27,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
let anchor_info = if let Some(ref anc) = *self.store.anchor_info.read() {
anc.clone()
} else {
// FIXME(sproul): consider error?
return Ok(());
return Err(HistoricalBlockError::NoAnchorInfo.into());
};

// Check chain integrity.