feat: what a finished ceremony leaves: the confederation, certified (confederation, Phase 12)

Every device that took part files the confederation under the room id
its key derives, as upstream's canonical roster, key state and genesis,
with its own shares kept as recovery packages. The genesis is verified
against the key state before anything is written, and each of the
device's own member groups gets a line saying it is part of it now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-11-22 00:38:20 +02:00
1 parent 02f041431a
commit 615afc30a1
16 files changed
+362 -8

No files matched your search

+1
View File
@@ -76,6 +76,7 @@ the reasoning. Where the build chose differently:
| 8 | done. `ConfederationManager.outcome` on the coordinator's device opens each acceptance with the active identity's key, checks each list names its group and proposal, counts roles (refusing more than 128, noting more than 16), names any listed group with no public profile on this device as what stands in the way, and lists admins who sit in more than one group. The proposal screen shows it once every group has accepted, ending on "the confederation's key ceremony is not available in this version yet". Withdrawal was built with the answers in Phases 3 and 7. `ConfederationNetworkJvmTest` 5/5, `ConfederationStorageJvmTest` 11/11 |
| 10 | done. `ConfederationRosterBuilder` writes upstream's RPD bytes itself, since `ConfederationRoster` has only `fromData`: big-endian, a 96-byte header, 20 bytes a group, 69 a role. `plan` refuses rather than repairs (a list for another group or proposal, a missing acceptance, more than 128 roles). Host keys are `sha256(HOST_KEY_TAG ‖ nsec ‖ group ‖ proposal id)`, so one person holds a different key per role and per confederation. `ConfederationRosterBuilderJvmTest` 7/7: the roster parses, is byte-identical under any input order, and its `dkgLocal` key signs as the room's id |
| 11 | done. `ConfederationRitualManager` over upstream's `ConfederationDkg`, in a NIP-17 room the coordinator opens over every admin (with placeholder profiles for members this device has none for). Kinds 30380 (opening), 30381 (host keys), 30382 (dealings), 30383 (roster and broadcast), 30384 (authorizations), 30385 (acknowledgments), 30387 (failure). One message per person per step, one value per role, keyed by group. **No 30386:** every device assembles the certified genesis itself from evidence it already holds, so nobody can hand one over. **No investigation (30388):** a decryption fault names "a participant or the coordinator" and ends the ceremony. Before joining, a device checks the proposal and acceptances are their groups' own, every acceptance opens with its disclosed key, the room is exactly the roster's people, and each group it is in still has the admins it accepted with, compared on their own so a member without a share still checks. Joining is the only approval; dealer seeds are erased once dealt; every role derives its key state itself and the coordinator's roster must match byte for byte. Schema 44. The coordinator opens it by a button on the proposal screen rather than on its own. `ConfederationRitualScreen`, with a join, each step's named waits and abandon. `ConfederationCeremonyJvmTest` 7/7: three groups of three on nine devices reach one key that signs as the room once each recovery package is opened; one person in two groups; a holdout and abandon; a disclosed key that does not open; a substituted roster; admins changed; messages before the opening. jvmTest 1,619 |
| 12 | done. `ConfederationFormation.onComplete` files a `Confederation` (room id, X, roster, key state, genesis, the `(configSeq, rpdHash, ksdHash)` triple, this device's recovery packages) and `ConfederationMember` rows, folded into schema 44 since it has not shipped. The genesis is verified against the key state before anything is written. A line goes into each of this device's own member groups' rooms; nothing is sent to them. **No 30389 key-state event:** every founding member of the room took part and holds the record, so `ConfederationFormation.verifies` checks the stored descriptors instead; a member added later needs one, which waits for Part C's governance. A formed confederation reads "Formed" on the group's list. `ConfederationCeremonyJvmTest` now also checks every device files the same verified confederation under the room its key derives |
---