docs: the subgroup wallet policy is built, and the notes it touched say so (Phase 9)

subgroup-wallet-policy.md is marked built, with a table of where the
build chose differently. group-wallet-guardians.md's "why it is still the
child's choice" becomes "whose choice it is": the parent decides, the
chain still does not enforce it, and an older certificate still leaves it
to the child. subgroups.md gains the wallet tag and the policy as the
second value the coordinator picks for other people.

The three-emulator run is still to do by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-10-23 22:11:00 +02:00
1 parent 6bd47210f9
commit e9fae262c8
4 files changed
+58 -13

No files matched your search

+3 -3
View File
@@ -53,10 +53,10 @@ Phases 4 and 5 first, and its own table of where the build chose differently
before the code.
The group-wallet-guardians note is a phased plan that has been built; it assumes the subgroups and group-chain-wallet notes, and changes one sentence in
each.
The subgroup-wallet-policy note is a phased plan that has not been built. It
reads as the guardians note's *why it is still the child's choice* reversed: read
The subgroup-wallet-policy note is a phased plan that has been built. It
reads as the guardians note's *whose choice it is* reversed: read
that section, then this note's Phase 0, whose five decisions shape every phase
after it.
after it, and its table of where the build chose differently before the code.
The Material Design note is a phased plan that has not been built, and is the
only one about what the app looks like rather than what it does; read the
jvm-target note first if you want to know why its adaptive-layout phase exists.
+25 -7
View File
@@ -46,7 +46,7 @@ under plain tweaks of its own threshold key.
---
## What this reverses, and why it is still the child's choice
## What this reverses, and whose choice it is
[subgroups.md](./subgroups.md#what-this-does-not-do) says:
@@ -66,12 +66,25 @@ each side:
The certificate on its own delegates nothing. A child that never opens a guarded
wallet has a certificate with keys in it and no address that uses them.
**The parent cannot impose this.** The child's threshold key is the child's. Its
quorum can always pay to a plain BIP86 address under its own key, and no script
in any address can stop it. Bennu opens a guarded wallet by default for a child
whose certificate carries guardian keys, and offers a plain one beside it; that
is a client's default, not a cryptographic rule, and the UI never describes it
as one.
**The parent decides, and the chain does not enforce it.** Since
[subgroup-wallet-policy.md](./subgroup-wallet-policy.md), the parent decides when
it makes the child: the coordinator picks *guarded* or *unguarded* on the
subgroup picker, every admin is told at the join gate, the parent's quorum signs
the choice into the certificate as a `["wallet", …]` tag, and the child's quorum
signs it again in its key state. Every client running this app then offers,
signs, derives and watches only the wallet the certificate allows. A guarded
group's subgroups are all guarded.
What has not changed is the cryptography. The child's threshold key is the
child's. Its quorum can always pay to a plain BIP86 address under its own key,
and no script in any address can stop it. The parent's decision is a signed rule
every honest client keeps, not a rule the chain enforces, and the UI never
describes it as more than that.
A certificate from before policies carries no `wallet` tag and decides nothing.
Its child is offered a guarded wallet by default when the certificate carries
keys, and a plain one beside it, as this note first described. There, being
guarded is still the child's own choice.
**The child gives up a real thing.** An ancestor can take any coin in the wallet
that has been confirmed for two hours, without the child's agreement and without
@@ -416,6 +429,11 @@ room today.
keys. Its parent can sign a fresh one — certificates are replaceable per child,
newest winning — but nothing here prompts it to.
**It does not, on its own, let the parent decide.** That is
[subgroup-wallet-policy.md](./subgroup-wallet-policy.md): a policy the parent
signs into the certificate at the child's birth, which the child's own quorum
agrees to.
**It does not survive a re-keyed ancestor.** A leaf is bound to the ancestor's
threshold key, so to the shares of the ceremony that made it, including the
shares of members who have since left. This is the wallet note's *removal from
+23 -3
View File
@@ -13,9 +13,29 @@ the certificate allows.**
Read [subgroups.md](./subgroups.md) and
[group-wallet-guardians.md](./group-wallet-guardians.md) first. This builds on the
certificate from the first and the guardian keys from the second, and it reverses
one section of the second — [*why it is still the child's choice*](./group-wallet-guardians.md#what-this-reverses-and-why-it-is-still-the-childs-choice).
one section of the second — [*whose choice it is*](./group-wallet-guardians.md#what-this-reverses-and-whose-choice-it-is).
**Not built.** Written against the code as it stood at `b4002804`, schema v28.
**Built**, phases 1-9, one commit each, written against the code as it stood at
`b4002804`, schema v28; the build is schema v29. `SubgroupWalletPolicy`,
`SubgroupBirthCertificateEvent.parseWalletPolicy`, `SubgroupManager.walletPolicyOf`,
`refuseCertificate` and `refuseKeyState` are the entry points. The phases below
are kept as written, line references included, which have since moved; where the
build chose differently the table says so.
| what the plan said | what it turned out to be |
|---|---|
| Phase 2: a migration test like the other bumps have | none. The manual migrations have tests; the nullable auto-migrations, 24→25, 25→26 and 27→28, have none, and 28→29 is one of them. The in-memory databases every jvmTest opens run at v29 |
| Phase 2: `proposeRitual` takes the policy | it also checks it first. A policy on a ceremony with no parent is refused before the running-ceremony lookup, which would otherwise hand back an existing ceremony for a question that should never have been asked |
| Phase 3: the picker reads the parent's policy | through `ChatRepository.walletPolicyOf` and `guardiansOf`, both new; the picker's view models talk to repositories, not managers. The policy refusals come before the key-package wait in `refusal()`, since they do not depend on it |
| Phase 3: a test that `confirm` passes the policy to `proposeRitual` | not written. `confirm` needs an `Identity` with a private key and settled key packages, and the tests cover the state it passes instead |
| Phase 4: `DkgRitualViewModel` passes `session.walletPolicy` | `proposeBirthCertificate` reads it off the ceremony it is already handed. A caller naming the policy would be a caller choosing what the parent signs, for the reason the key is read off the ceremony too |
| Phase 5: the child-signer check sits beside the certificate check | it is `SubgroupManager.refuseKeyState`, called from there and from `proposeSubgroupKeyState`, so the proposer refuses what every other child signer would |
| Phase 6: `account` is null under a guarded policy | `NotOpened.offersPlain`. A null `account` already meant "a room with no key" and hides the way in altogether, so the guarded button would have gone with it |
| Phase 6: `GroupWalletManager.walletPolicyFor` | arrived in Phase 7, where `walletFor` needed it. The wallet screen reads `ChatRepository.walletPolicyOf`, the same `SubgroupManager.walletPolicyOf` underneath |
| Phase 7: `GuardianManager.guardedFrom` | `GuardianManager.verify`, the function that believes a forwarded statement |
| Phase 8: *guarded* or *unguarded* added to the supporting line | a second line under it, on the subgroup rows and on the parent row. An undecided certificate shows nothing |
Still to do by hand: the three-emulator run in Phase 9.
---
@@ -561,7 +581,7 @@ Small, and the reason the parent's members can see what they decided:
## Phase 9 — docs, and checking it on the emulators
- [group-wallet-guardians.md](./group-wallet-guardians.md): rewrite *What this
reverses, and why it is still the child's choice* — the parent now decides, the
reverses, and why it is still the child's choice*, now *whose choice it is* — the parent now decides, the
child agrees by joining, and the paragraph saying "the parent cannot impose
this" keeps its cryptographic half and loses its policy half. Its *What this
does not do* gains a pointer here.
+7
View File
@@ -164,6 +164,7 @@ tags:
["subgroup_key", <the child's threshold key, 33-byte hex>]
["frost_path", "m/9420/0/0"]
["name", <the subgroup's name, as the coordinator typed it>]
["wallet", "guarded" | "unguarded"] since subgroup-wallet-policy.md; absent before
["p", <each of the child's admins>]
```
@@ -800,6 +801,12 @@ proposal outside it, and the `HOST_KEY` gate is where each of them agrees to the
`t`-of-`n` they can now see. Joining is the agreement; the coordinator only
writes down what is being joined.
The subgroup's wallet policy, *guarded* or *unguarded*, is the second value the
coordinator picks for other people, and it is agreed to the same way: it rides on
the proposal, the join gate shows it, the parent's quorum signs it into the
certificate, and the child's quorum refuses a key state whose certificate says
otherwise. See [subgroup-wallet-policy.md](./subgroup-wallet-policy.md).
Confirm stays disabled below two selections, and below a threshold outside the
range, with the reason stated rather than left to be guessed.