Commit Graph

6 Commits

Author SHA1 Message Date
Steven Allen
6cbeb9aad6
fix: sync: atomically switch chains when checkpointing (#11595)
We can now atomically switch chains when checkpointing. Previously,
we'd call `SetHead` followed by `SetCheckpoint`. Unfortunately, that's
not atomic and the "head" could have reverted before we called
`SetCheckpoint` (causing the latter to fail).

Now, we just call `SetCheckpoint` and let `SetCheckpoint` adjust our
head. This changes the behavior of `ChainStore.SetCheckpoint`, but
`Syncer.SyncCheckpoint` is the only caller anyways.
2024-01-26 08:50:32 -08:00
Łukasz Magiera
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
Aayush Rajasekaran
dfb65ed89f Plumb contexts through 2021-12-11 17:04:00 -05:00
Steven Allen
8f309b214b chain: move checkpoint logic into chainstore
That way, checkpoints can be enforced by the chainstore, removing a
potential race where an in-progress sync of a fork could bypass a sync
checkpoint.
2021-04-28 15:06:29 -07:00
Steven Allen
69da6a2a29 feat: allow checkpointing to forks
Previously, `lotus sync checkpoint` would only checkpoint on the current
chain. Now, it can switch to a new fork.
2021-04-28 13:54:26 -07:00
Aayush Rajasekaran
35aa78dad9 Allow marking a certain tipset as checkpointed 2020-09-09 14:34:00 -04:00