diff options
| author | tv <tv@krebsco.de> | 2026-11-09 15:21:24 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-09 18:07:47 +0100 |
| commit | acef27d042b2b9f7fa1974de0759a1c517cbb942 (patch) | |
| tree | 2ad2f690cb8d178c63853f035c42bd12ade48be7 /src/state/host.rs | |
| parent | 9247e3980130ebfed9ef265e996e47bf1f6c852d (diff) | |
signatures: the latest unsigned change of each own actor signed, at start and after a swap
Review 4, F2 (the honest case) and claim 2: a node signed at start its own changes at
the heads that nothing vouched for (1216), and after a swap only its current actor's
latest. An own change left unsigned can sit below the heads: a drop (`drop_taken`)
takes away a signed change and keeps an earlier unsigned one, and the node writes on
under a fresh actor, building on it; or a node's change is built on by another's
concurrently with the signed one the drop took. Nothing signed it again, and under a
policy requiring signatures every node pulling it (a joiner) waited for good, and for
everything built on it.
Now the latest change of each of the node's actors (`RemakeState::own_actors`, the
current one among them) that no signature vouches for is signed
(`Signatures::sign_own_actors`), at start and whenever the document is swapped (a drop,
a switch, a rejoin), the old `sign_own_heads` and `sign_own_latest` going. One
signature per actor vouches for all its changes before it. The case of a member whose
signed change the rules refuse, vouching once for its earlier ones, is
postponed (future-work.md, next).
Diffstat (limited to 'src/state/host.rs')
| -rw-r--r-- | src/state/host.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/state/host.rs b/src/state/host.rs index 7b2eb07..8522657 100644 --- a/src/state/host.rs +++ b/src/state/host.rs @@ -30,7 +30,10 @@ impl AppState { replica.signatures = replica.signatures.kept_for(&replica.doc); if let Some(key) = &self.node_key { let replica = &mut *replica; - replica.signatures.sign_own_latest(&replica.doc, key); + let own = self.remake.own_actors(); + replica + .signatures + .sign_own_actors(&mut replica.doc, key, &own); } replica.epoch = epoch; replica.epoch_seq += 1; @@ -505,7 +508,10 @@ impl Host for AppState { // What it replayed, vouched for at once. if let Some(key) = &state.node_key { let replica = &mut *replica; - replica.signatures.sign_own_latest(&replica.doc, key); + let own = state.remake.own_actors(); + replica + .signatures + .sign_own_actors(&mut replica.doc, key, &own); } replica.writable = true; replica.refresh_heads(); |
