Skip to main content

ROTATION_GATE_STATE_KEY

Constant ROTATION_GATE_STATE_KEY 

Source
pub const ROTATION_GATE_STATE_KEY: &str = "rotation_gate";
Expand description

The exact store-key work that blocks sealing: a local candidate, an activated local removal awaiting adoption, a peer’s committed generation awaiting adoption, or a local fact together with a peer fact. Durable database transitions and this in-memory copy move together at operation boundaries.

Shared (behind one Arc, via CloudSyncConnection::shared_pending_rotation) across every path that seals data for the cloud — changesets, heads, blobs, tombstones, snapshots — so a rotation this device can’t adopt blocks all of them the same way, not just the removal call that discovered it. This is the structural half of the invariant: this device must never seal under a generation the store has already superseded. The protocol-state key that persists the serialized RotationGate. Restored before the first sync cycle so a restart cannot forget an unfinished candidate or an unadopted committed rotation and resume sealing under an unauthorized key.