diff options
| author | tv <tv@krebsco.de> | 2026-11-08 23:03:42 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-09 00:19:31 +0100 |
| commit | b33f4235fe16b8160afb60d0bd743f4c81d9d0ab (patch) | |
| tree | bda3fc914bd72ba67fbe73e50e8799a3191b8870 /src/state/peer.rs | |
| parent | b1e6c79bf40d879dd565eeaa5f48f00ae964f4ac (diff) | |
sync: a message carries the signatures of its changes
A sync message carried the signatures its peer wasn't sent yet, by a
cursor per peer. Changes sent again, as after a message taken as
delivered and lost on the way, went without them: the peer was past
them. Under a policy requiring signatures they waited until the
writer's next signed change, or the next session.
A message now carries the signatures of the changes it carries
(Signatures::for_changes), whatever the peer was sent before: changes
sent again arrive vouched for as the first time. Past 256 (a message
carrying the batches of many writers), each writer's latest instead,
as a delta carries. The cursor goes, and with it resetting it after a
failed send or a new session.
Diffstat (limited to 'src/state/peer.rs')
| -rw-r--r-- | src/state/peer.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/state/peer.rs b/src/state/peer.rs index f6e4a62..a7c6cc9 100644 --- a/src/state/peer.rs +++ b/src/state/peer.rs @@ -98,9 +98,6 @@ pub(crate) struct PeerState { /// Everything about the current Automerge sync with this peer; a reset replaces it. pub(crate) sync: SyncSession, - /// The signatures of changes it was sent, up to this stamp - /// (`Signatures::newer_than`); a reset sends them again. - pub(crate) signatures_sent: u64, pub(crate) liveness: Liveness, pub(crate) added_at: Instant, @@ -307,7 +304,6 @@ impl PeerState { hello_backoff: Backoff::new(HELLO_RETRY, HELLO_RETRY_MAX), probe_backoff: timing.probe_backoff(), sync: SyncSession::new(timing.sync_reply_backoff()), - signatures_sent: 0, liveness: Liveness::Unknown, added_at: Instant::now(), last_seen: None, @@ -378,7 +374,6 @@ impl PeerState { let mut reply_backoff = self.sync.reply_backoff; reply_backoff.reset(); self.sync = SyncSession::new(reply_backoff); - self.signatures_sent = 0; // Said over the session that ended. self.reaches = None; self.round_trips = None; |
