From 96a733e1ccbf6dab2d69f263d655e487ac54c20d Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 20 Nov 2026 01:28:41 +0000 Subject: federation: revision 2, the federation's name A version may give its federation a name (`name`, spelled as a party's), under a revision that has names: `federation-name`, revision 2. The first version's is in the root, so a rehearsal named otherwise is another federation, though its parties, keys, nodes and rules are the same; a later version changes the name as anything else, which changes what the federation is called, not which it is. A version giving a name under an earlier revision is none. What a version does says so, in words: it names the federation, renames it, or drops its name. Half the generated histories begin at the newest revision now, their versions naming the federation anew now and then; those of the revisions before are generated as they were. --- src/federation/harness.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/federation/harness.rs') diff --git a/src/federation/harness.rs b/src/federation/harness.rs index f14736d..04308da 100644 --- a/src/federation/harness.rs +++ b/src/federation/harness.rs @@ -138,6 +138,8 @@ pub(crate) struct Spec { pub(crate) parties: Vec, /// The revision it follows: named where it isn't the base revision. pub(crate) revision: Revision, + /// The federation's name, where it gives one. + pub(crate) name: Option, /// Each rule: its path and its writer. pub(crate) rules: Vec<(String, Json)>, pub(crate) checkpoint: Option>, @@ -151,6 +153,7 @@ impl Spec { number: 0, changes: None, revision: Revision::default(), + name: None, parties: parties .iter() .enumerate() @@ -256,6 +259,9 @@ impl Spec { if self.revision != Revision::default() { members.push(("revision", str(&self.revision.id().to_string()))); } + if let Some(name) = &self.name { + members.push(("name", str(name))); + } object(members) } -- cgit v1.3.1