From 7323e8ed8598cda9784493aa3334d947120b53d8 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2026 22:35:22 +0100 Subject: 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). --- src/swarm/peer/inbound.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/swarm/peer/inbound.rs') 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; } -- cgit v1.3.1