diff options
| author | tv <tv@krebsco.de> | 2026-11-16 20:06:42 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 21:26:29 +0100 |
| commit | 9d18983e4b643eac04de49a42a6f29805570dba3 (patch) | |
| tree | 90bff68e2b2ec5e3bbbd3fee974c53ff44dcbe32 /src/main.rs | |
| parent | d8cec1cd61c63659d583168244f8f51ec550b3be (diff) | |
federation: a pinned checkpoint, found in the document
Once a store moved to a checkpoint, a node reading it from the root could take what was
grown anew from the root since, by keys of versions long replaced: so its operator pins
the checkpoint (`--store-checkpoint`, by its ID), and the node reads its store from
there whenever it starts (`docs/store.md`, Pinned checkpoints). It finds it in its
document: at heads a proposal's version names, built from their history read from the
root, as any node builds the checkpoint it moves to (`Store::checkpoint_at`), the one
whose ID is pinned. Until the document holds it, the node holds no store, and says so
once.
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 1e4af50..16afb7b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -312,7 +312,13 @@ async fn main() -> Result<()> { #[cfg(feature = "federation")] store: store.as_ref().map(|store| store.id), #[cfg(feature = "federation")] - holding: federation::held::Holding::open(args.store_file.clone(), Arc::clone(&files))?, + holding: federation::held::Holding::open( + args.store_file.clone(), + Arc::clone(&files), + args.store_checkpoint + .as_deref() + .and_then(federation::store::Id::from_hex), + )?, strict_keys: args .strict_keys .iter() |
