diff options
| author | tv <tv@krebsco.de> | 2026-11-08 18:23:04 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-08 19:29:26 +0100 |
| commit | e9813db05f2cc8590b785639a3c41ba60812909a (patch) | |
| tree | 01e2fb07f69147dac684eb1c5a4301aff9661eff /src/remake/api.rs | |
| parent | d14290ab6d0ea40b97cdb72f5e07354cc2721c45 (diff) | |
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.
Diffstat (limited to 'src/remake/api.rs')
| -rw-r--r-- | src/remake/api.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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<H: Host>( // 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(), ) { |
