From 8523e9c67e375747147a0b05ec191ad81ce2e318 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2026 22:35:21 +0100 Subject: signatures: changes signed by their node Every node signs the changes it commits with its node key, an Ed25519 signature over the change's hash, kept beside the document. One signature on an actor's latest change vouches for its earlier ones. Protocol data and paths listed in _continuum/access/signed are signed, and writes with ?signed=true. Auth plan M5. --- src/state/host.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/state/host.rs') diff --git a/src/state/host.rs b/src/state/host.rs index b4a785b..47fd946 100644 --- a/src/state/host.rs +++ b/src/state/host.rs @@ -24,6 +24,8 @@ impl AppState { /// document. (Lock order doc -> peer, as in sync generation.) fn swap_document(&self, replica: &mut Replica, epoch: Epoch, doc: Document) -> Document { let old = std::mem::replace(&mut replica.doc, doc); + // The old document's signatures are of its changes. + replica.signatures = Default::default(); replica.epoch = epoch; replica.epoch_seq += 1; // Publishes the epoch with the heads (`Replica::stamps`), under the same lock, -- cgit v1.3.1