From e9813db05f2cc8590b785639a3c41ba60812909a Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Nov 2026 18:23:04 +0000 Subject: strict: no strict remake of a swarm strict already Review 2, N2: nothing checked that a strict remake's base wasn't strict already. In a strict swarm the registry, the policy and the bans change only as a user who may change them signs; a strict remake committed by a majority of members, each with keys of its own, could drop any of them (unban, remove managers, empty userSigned and the sealed declarations), and the honest minority would follow. A node now takes a strict remake (proposing or voting) only in a swarm not strict yet: turning strict is done once, by a remake; after it, by signatures. --- src/remake/api.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/remake/api.rs') diff --git a/src/remake/api.rs b/src/remake/api.rs index d3df908..1da0539 100644 --- a/src/remake/api.rs +++ b/src/remake/api.rs @@ -383,22 +383,24 @@ async fn start_kind( // A strict remake: proposed only with a manifest this node would vote for. if kind.name() == "strict" { - let swarm = host + let (swarm, strict) = host .read_doc(|doc| { - crate::document::store::read_path( + let swarm = crate::document::store::read_path( doc, &crate::document::meta::path(&[crate::document::meta::SWARM]), ) .ok() .flatten() .and_then(|swarm| swarm.as_str().map(str::to_owned)) - .unwrap_or_default() + .unwrap_or_default(); + (swarm, crate::access::policy::of(doc).strict()) }) .await; if let Err(why) = super::vote::strict_taken( &host, prepared.content.as_deref(), &swarm, + strict, &EpochRecord::from(host.current_epoch()), request.base_heads.as_deref(), ) { -- cgit v1.3.1