diff options
| author | tv <tv@krebsco.de> | 2026-11-07 22:35:22 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-07 22:35:22 +0100 |
| commit | 7323e8ed8598cda9784493aa3334d947120b53d8 (patch) | |
| tree | 1e772cdf74974f918cf07d2e4b9d8e8593bed9dd /src/swarm/peer/inbound.rs | |
| parent | d322e7d4aa41d94232113cb7680cec1d65a11b0c (diff) | |
swarm: changes taken unjudged, dropped (REFUSALS)
A node refusing changes a peer brought tells it which broke a rule; the
peer judges them itself, and if its rules refuse them too, drops them
with all built on them (its document forked without them, a fresh
actor), quarantining its own writes among them. Wire version 42.
Auth plan M6 (rejoin on taint).
Diffstat (limited to 'src/swarm/peer/inbound.rs')
| -rw-r--r-- | src/swarm/peer/inbound.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/swarm/peer/inbound.rs b/src/swarm/peer/inbound.rs index 9b5db8f..a7633b3 100644 --- a/src/swarm/peer/inbound.rs +++ b/src/swarm/peer/inbound.rs @@ -272,6 +272,16 @@ pub(crate) async fn handle_message( crate::swarm::signatures::received(state, message).await; } } + transport::ParsedMessage::Refusals(message) => { + // From members, of our epoch: judging costs (`swarm::refusals`). + let member = matches!( + peer_state.lock().await.standing, + crate::state::Standing::Member { .. } + ); + if member && same_epoch { + crate::swarm::refusals::received(state, &peer, message).await; + } + } transport::ParsedMessage::Probe(request) => { crate::swarm::working_links::answer(state, &peer, request).await; } |
