diff --git a/docs/README.md b/docs/README.md index 0708d7b5..ddda85d3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,7 +15,7 @@ silent, or a decision that looked arbitrary and was not. | [group-send-an-amount.md](./group-send-an-amount.md) | sending an amount in sats from the group's wallet, with change — why the gate as written could never lift and is removed in favour of the mainnet cap, the decimal point the gated form multiplies by ten, and change addresses reserved like coins | | [group-wallet-guardians.md](./group-wallet-guardians.md) | letting an ancestor group spend from a subgroup's wallet through a taproot leaf — why the parent signs the guardian keys into the child's certificate, why every inherited key is derived one step further per child, and why every ancestor waits 12 blocks | | [subgroup-wallet-policy.md](./subgroup-wallet-policy.md) | the parent deciding, at a subgroup's birth, whether its wallet is guarded or unguarded — why the choice is signed three times, why *unguarded* means no keys in the certificate, why a guarded group's subgroups are all guarded, and why the rule is every honest client's rather than the chain's | -| [member-wallet-delay.md](./member-wallet-delay.md) | a group setting the delay on its own leaf in the wallets it guards for members -- why a group-signed event of its own rather than the birth certificate, why the request carries the policy it was built under, and why a wallet already guarded keeps its delay | +| [member-wallet-delay.md](./member-wallet-delay.md) | a group deciding whether it guards members' wallets, at what delay, and closing again -- why a group-signed event of its own rather than the birth certificate, why no event means not offered, why the request carries the policy it was built under, and why closing never releases a wallet already guarded | | [guardian-delay.md](./guardian-delay.md) | a parent choosing how long a coin waits before a guardian can take it, from 6 blocks to BIP68's 65,535 -- why each ancestor keeps the delay it chose as its key goes down the tree, what a long delay gives the child, and how a number of blocks is said in time | | [member-guarded-wallets.md](./member-guarded-wallets.md) | a guarded wallet a group keeps for one member — why the member makes the key and the leaves before asking, why the group signs a certificate of its own kind rather than a birth certificate, and why a member's wallet shows as `@name` and opens their profile | | [guarded-wallet-funding.md](./guarded-wallet-funding.md) | a group paying into a descendant's guarded wallet — why the address is the first unreserved one from `current + 2`, why the claim rides in the PSBT output's derivation and every signer rederives it, and how the guarded wallet row makes room for *Fund* beside *Spend* | diff --git a/docs/member-wallet-delay.md b/docs/member-wallet-delay.md index c2d508ce..97f8dbde 100644 --- a/docs/member-wallet-delay.md +++ b/docs/member-wallet-delay.md @@ -1,4 +1,4 @@ -# The group sets the delay on its members' guarded wallets +# The group decides whether it guards members' wallets, and at what delay A member's guarded wallet carries one leaf for the group that guards it and one for every group above it. Since [guardian-delay.md](./guardian-delay.md), each @@ -18,12 +18,21 @@ then fixed in its certificate, as every guardian tag already is. A later statement changes the wallets members ask for after it, and never one already guarded. +**The statement is also the group's opt-in.** A group that has never signed one +does not guard members' wallets: the member's group picker says so, and every +signer refuses a request to it. **A later statement can close it again** with a +`closed` tag, and from then on the group takes no new member wallets until a +newer statement opens it. Closing never releases a wallet already guarded, since +the group's leaf is in every one of its addresses. + Read [member-guarded-wallets.md](./member-guarded-wallets.md) and [guardian-delay.md](./guardian-delay.md) first. This plan reuses the request, the certificate, the key notice and the signer check from the first, and the delay range, the formatter and the delay chooser from the second. **Not built.** Written against the code as it stood at `05bd6ed6`, schema v31. +D1 (a group-signed event, not the birth certificate) is decided; the opt-in +(D8) and the `closed` tag (D9) were added on review. --- @@ -49,25 +58,35 @@ parent's own leaf's delay in the group's wallet. ## The policy event +Two shapes, one kind: + ``` -kind: 30337 -pubkey: G set by the signing session -content: "" -tags: - ["d", "member-wallets"] addressable: the newest wins - ["guardian_delay", ""] 6..65,535, GuardianDerivation.DELAY_RANGE +open: kind 30337, pubkey G, content "" + ["d", "member-wallets"] addressable: the newest wins + ["guardian_delay", ""] 6..65,535, GuardianDerivation.DELAY_RANGE + +closed: kind 30337, pubkey G, content "" + ["d", "member-wallets"] + ["closed"] ``` +Exactly one of `guardian_delay` and `closed`. An event with both, or neither, +does not read: a group that has said two things about its members' wallets has +said nothing a device can act on, and guessing which it meant would be the device +deciding for the group. + - **Signed by `G`'s quorum** through the existing FROST proposal path, like the wallet statement. No new signing machinery. - **Newest wins**, by the group's own `created_at` with the id breaking a tie, for the reason `GroupWallet.newestAmong` gives: two devices that read the same events in different orders have to agree. -- **No policy means the default.** Every group that never signs one keeps - guarding members' wallets at 12, exactly as today. -- **One tag today.** The `d` tag names *member wallets*, not *delay*, so a later - rule about members' wallets is a second tag on the same event rather than a - second kind. +- **No policy means not offered** (D8). A group guards members' wallets only + once its quorum has said so, and at the delay it said. +- **The newest decides, open or closed** (D9). Closing and opening again are each + one more statement; nothing is ever deleted, and every device agrees on which + is newest. +- **The `d` tag names *member wallets*, not *delay***, so a later rule about + members' wallets is another tag on the same event rather than another kind. ### Why the request carries it @@ -93,7 +112,7 @@ why the leaf has the delay it has. ### D1. A group-signed event, not the birth certificate -**Decided by the table above.** Kind 30337, the next free number after the key +**Decided.** Kind 30337, the next free number after the key notice at 30336. ### D2. Can the group change it? @@ -139,26 +158,67 @@ carries `carried`, or none. **Recommended:** | carried | held | judged at | otherwise | |---|---|---|---| -| a 30337 `G` signed | none, or one not newer than it | `carried`'s delay | — | -| a 30337 `G` signed | one newer than it | — | refused: *was asked under a delay the group has since changed* | -| a 30337 not signed by `G`, or unreadable | any | — | refused: *carries a policy this group did not sign* | -| none | none | `DEFAULT_DELAY` | — | -| none | one at `DEFAULT_DELAY` | `DEFAULT_DELAY` | — | -| none | one at any other delay | — | refused: *was asked without the group's delay* | +| an open 30337 `G` signed | none, or one -- open or closed -- not newer than it | `carried`'s delay | — | +| an open 30337 `G` signed | a newer open one | — | refused: *was asked under a delay the group has since changed* | +| an open 30337 `G` signed | a newer closed one | — | refused: *the group has stopped guarding members' wallets* | +| a closed 30337, or one not signed by `G`, or unreadable | any | — | refused: *carries a policy this group did not sign open* | +| none | any | — | refused: *does not say the group guards members' wallets* | -The last row is how a request from a build before this plan fails under a group -that has set a delay: its member was shown 12, and the group decided otherwise. -That is the right failure. The member's screen said something the group never -agreed to. +The first row covers the signer that missed the group's opening statement, and +the one whose newest is a closing the group has since reversed: the request +carries an open policy `G` signed, and nothing newer says otherwise, so the +signer is told what it missed rather than refusing it. + +The last row is how a request from a build before this plan fails: it carries no +policy, so it never asked for the delay the group chose, or for a group that +chose to guard members at all. That is the right failure. ### D7. Mixed versions **A signer on a build before this plan compares to `grantFor` at the default**, so it refuses any request whose own leaf is not at 12. That is the safe way to -fail: such a group can still guard members' wallets at 12 and at nothing else. A -group should not set a delay other than 12 until every member who can sign is on -a build from Phase 5 onward. The change screen says this, because a device -cannot see other devices' versions. +fail. It is also blind to D8 and D9: it would still sign a request at 12 to a +group that never opened, or has closed, if a member on an older build asked. A +group should open at a delay other than 12, or close, only once every member who +can sign is on a build from Phase 5 onward. The screen says this, because a +device cannot see other devices' versions. + +### D8. No policy, no member wallets: the statement is the group's opt-in + +**Recommended.** Today any member can ask any group, and the group only agrees +when its quorum signs that member's certificate. With D8 the group agrees up +front, once, for everybody, and every new member wallet's delay is one its group +chose. There is no default any more. + +What this changes for groups that exist: + +- **A group that wants to keep guarding members' wallets signs an open policy + once**, even to stay at 12. Phase 6's screen offers *Guard members' wallets* + with 12 selected, so that is one tap and a quorum. +- **Wallets already guarded are not touched.** Their certificates stand; the + member still spends, and every guardian still watches. D8 is about new + requests. +- **A request already asked and not yet signed** is refused by D6's last row + once the signers update. The member's row says why and offers *Ask again*, + which works once the group opens. + +### D9. Closing, and opening again + +**Recommended: `["closed"]` on a newer policy.** + +- **Closed means no new member wallets.** The member's picker says *this group + has stopped guarding members' wallets*; every signer refuses a request built + under an older open policy (D6's fourth row) and puts nothing to the quorum. +- **Closed does not release a wallet already guarded.** The group's leaf is in + every address of every wallet it guards, and no statement can take it out. The + group can still take any coin there after its delay, and the screen that + closes says so: *Wallets already guarded stay guarded.* A member who wants out + moves their coins to a wallet of their own, which needs nobody's agreement. +- **Opening again is a newer open policy**, at any delay. It reaches only + requests built after it, as every policy does. +- **Closing is not a refusal of a person.** It is the group's statement about + every member at once, and D4 rules out a per-member list for the same reason. + --- @@ -171,30 +231,37 @@ object MemberWalletPolicyEvent { val KIND: Kind = 30337 const val IDENTIFIER = "member-wallets" - fun template(delay: Long, createdAt: Long = now): EventTemplate // requires DELAY_RANGE + fun open(delay: Long, createdAt: Long = now): EventTemplate // requires DELAY_RANGE + fun closed(createdAt: Long = now): EventTemplate - data class Policy(val delay: Long, val event: Event) { + /** What [event] says, as [chatRoomId] signed it. */ + sealed interface Policy { + val event: Event val createdAt: Long get() = event.createdAt + + data class Open(val delay: Long, override val event: Event) : Policy + data class Closed(override val event: Event) : Policy } - /** [event] as [chatRoomId]'s policy: the kind, the `d`, a readable delay in range, signed by the room. */ + /** [event] as [chatRoomId]'s policy: the kind, the `d`, exactly one of a readable delay or `closed`, signed by the room. */ fun verify(event: Event, chatRoomId: String): Policy? - /** The newest among [events] that verifies, by created_at then id. */ + /** The newest among [events] that verifies, by created_at then id -- open or closed. */ fun newestAmong(events: List, chatRoomId: String): Policy? } ``` -`verify` checks the kind, the `d` tag, exactly one `guardian_delay` tag that -reads and is in `GuardianDerivation.DELAY_RANGE`, and +`verify` checks the kind, the `d` tag, exactly one of a `guardian_delay` tag that +reads and is in `GuardianDerivation.DELAY_RANGE` or a bare `closed` tag, and `GroupKeyStateEvent.isSignedByRoom(event, chatRoomId)`, all inside `runCatching`. **Tests**, `MemberWalletPolicyEventTest`, pure: -- a policy round-trips; +- an open policy and a closed one each round-trip; - each of these fails on its own: another kind, a missing `d`, two delays, - `"5"`, `"65536"`, `"twelve"`, signed by another room; -- of three signed policies, the newest wins whatever order they arrive in, and - a tie on `created_at` goes to the larger id on every device. + `"5"`, `"65536"`, `"twelve"`, both a delay and `closed`, neither, signed by + another room; +- of an open, a closed and a second open policy, the newest wins whatever order + they arrive in, and a tie on `created_at` goes to the larger id on every device. --- @@ -207,17 +274,21 @@ This phase reads them: - `MemberWalletManager.policyFor(database, G): MemberWalletPolicyEvent.Policy?` is the newest verified among `G`'s stored 30337s and any carried in key-notice answers (Phase 3). It is the one reader, used by the member's device in Phase 4 - and by every signer in Phase 5. + and by every signer in Phase 5. Null means the group has not opened (D8). - `ChatMessage.applyInnerEvent` and `applySignedEvent` get a 30337 arm that - writes one transcript line: *The group will guard members' wallets after 144 - blocks, about 1 day*. Without the arm an older build shows a raw-JSON bubble, - which is reason to ship this phase before Phase 6's entrance. -- `ProposedEvent.summarize` gets a 30337 arm: *Members' guarded wallets · - this group after 144 blocks, about 1 day · for wallets asked for from now on*. + writes one transcript line: *The group guards members' wallets, after 144 + blocks, about 1 day*, or *The group has stopped guarding new members' wallets*. + Without the arm an older build shows a raw-JSON bubble, which is reason to ship + this phase before Phase 6's entrance. +- `ProposedEvent.summarize` gets a 30337 arm: *Members' guarded wallets · this + group after 144 blocks, about 1 day · for wallets asked for from now on*, or + *Members' guarded wallets · no new ones · wallets already guarded stay + guarded*. -**Tests**: `policyFor` prefers the newest of two stored policies; ignores one -signed by another room; returns null for a group that never signed one. The -summary says the delay in both blocks and time. +**Tests**: `policyFor` prefers the newest of an open and a closed policy, either +way round; ignores one signed by another room; returns null for a group that +never signed one. The summary says the delay in both blocks and time, and says +what closing leaves alone. --- @@ -229,7 +300,7 @@ with*, so it answers this one too: - `GroupKeyNoticeEvent.answeringTags` gains `["member_wallet_policy", ]` when the answering device - holds one. + holds one, open or closed. - `read` returns it in `GroupKey.policy`, verified by `MemberWalletPolicyEvent.verify(it, G)`. A policy present and unreadable makes the whole answer unreadable, as an unreadable certificate already does. It is @@ -237,44 +308,58 @@ with*, so it answers this one too: - `MemberWalletManager.groupKeyFor` gains the policy, and `policyFor` considers it beside the stored ones. -An answer from a device that holds no policy says nothing about one, so a late -member may build under the default while the group has a delay. Phase 5's D6 -table refuses that request, and the member's request row says why: *ask again -once the group's delay has reached this device*. The next answer from a device -that does hold the policy fixes it. +Until an answer brings one, a late member's device holds no policy for a group +that may well be open. Phase 4's picker therefore tells *not known yet* apart +from *not offered*: a device that holds no key state and no answer says the +first, and offers the existing *Ask the group for its key*. -**Tests**: an answer carrying a policy gives it; one carrying a policy signed by -another room does not read; an answer without one reads, with no policy. +**Tests**: an answer carrying an open policy gives it, and so does one carrying +a closed one; one carrying a policy signed by another room does not read; an +answer without one reads, with no policy. --- ## Phase 4 — the member builds under it -In `MemberWalletManager.request`: +`MemberWalletManager.refusal(database, G, chain)` gains three reasons, checked +after the ones it has: + +| `MemberWalletManager.Refusal` | when | what the picker says | +|---|---|---| +| `POLICY_UNKNOWN` | no key state and no key answer yet, so no policy could be known | *Ask the group for its key* (the existing button) | +| `NOT_OFFERED` | the key is known and no policy is | *This group doesn't guard members' wallets* | +| `CLOSED` | the newest policy is closed | *This group has stopped guarding members' wallets* | + +So the picker still lists every group, each with why it cannot be chosen, as it +does today. A group without an open policy is never offered silently. + +In `MemberWalletManager.request`, which already refuses on any refusal: ```kotlin -val policy = policyFor(database, chatRoomId) +val policy = policyFor(database, chatRoomId) as? MemberWalletPolicyEvent.Policy.Open + ?: throw IllegalStateException("$chatRoomId does not guard members' wallets") val grant = GuardianDerivation.grant( groupKey.thresholdPublicKey, chatRoomId.lowercase(), groupKey.guardians, walletId, - delay = policy?.delay ?: GuardianDerivation.DEFAULT_DELAY, + delay = policy.delay, ) ``` -- `MemberWalletRequestEvent` gains `["member_wallet_policy", ]` - when there was one. The member's nostr signature covers it, as it covers +- `MemberWalletRequestEvent` gains `["member_wallet_policy", ]`, always. The member's nostr signature covers it, as it covers everything in the request. -- `Reading.verified()` gains a sixth check: a carried policy verifies against the - request's `h`, and the first guardian's delay equals the policy's, or equals - `DEFAULT_DELAY` when nothing is carried. This is everything a reader can check - without knowing the group's newest. The newest is Phase 5's job. -- `MemberWalletManager.delaysOf` uses the policy for the first delay. The - new-wallet screen already lists each guardian's delay from it (since - `3b2d9bd8`), and gains *set by #Council* beside the group's own line. +- `Reading.verified()` gains a sixth check: the carried policy is open, verifies + against the request's `h`, and the first guardian's delay equals its delay. + This is everything a reader can check without knowing the group's newest. The + newest is Phase 5's job. +- `MemberWalletManager.delaysOf` reads the open policy for the first delay, and + is null for a group that is not open. The new-wallet screen already lists each + guardian's delay from it (since `3b2d9bd8`), and gains *set by #Council* beside + the group's own line. -**Tests**: a request under a policy at 4,320 has its first guardian at 4,320 and -carries the policy; a request whose first delay disagrees with its carried -policy fails `verified()`; one that carries no policy and has a first delay of -12 passes. +**Tests**: a request under an open policy at 4,320 has its first guardian at +4,320 and carries the policy; `request` refuses a group with no policy and one +whose newest is closed; a request whose first delay disagrees with its carried +policy fails `verified()`, and so does one carrying a closed policy or none. --- @@ -293,49 +378,67 @@ the default. Instead it: `MemberWalletManager.putToGroup` runs the same check before it proposes, as it already runs `refuseCertificate`. A sponsor is then never asked to put to the -quorum a request their own device knows is stale. +quorum a request their own device knows is stale, or asks a closed group. The member's request row on the group page (*Asked by @alice, not yet signed*) -reads the same reasons. A stale request says *asked under an older delay* and -offers the member *Ask again*, which builds a new request under the newest -policy, with a new key. The old request's key is discarded, because no address -was ever offered. +reads the same reasons: + +- **asked under an older delay**: offers the member *Ask again*, which builds a + new request under the newest open policy, with a new key; +- **the group has stopped guarding members' wallets**: offers *Discard*, and + says *Ask again* will be possible if the group opens again; +- **does not say the group guards members' wallets**, a request from before this + plan: offers *Ask again* once the group has opened. + +Either way the old request's key is discarded, because no address was ever +offered. **Tests**, `MemberWalletSigningJvmTest`: every row of D6's table, through -`refuseCertificate`; a signer that missed the newest policy accepts a request -carrying it; two signers with different held policies agree once the request +`refuseCertificate`; a signer that missed the opening policy accepts a request +carrying it; a signer holding a newer closed policy refuses a request carrying an +older open one; two signers with different held policies agree once the request carries the newer one. --- -## Phase 6 — the group sets it +## Phase 6 — the group opens it, sets it, and closes it + +Phases 5 and 6 ship together (see the order table): once signers refuse a +request with no policy, a group needs this screen to open. **The entrance.** On `ChatRoomDetailScreen`, in *Members' guarded wallets*, a -first row for every member: +first row for every member, in one of three states: ``` -Guardian delay 144 blocks, about 1 day -for wallets members ask this group to guard [Change] +Guards members' wallets after 144 blocks, about 1 day [Change] +Doesn't guard members' wallets [Guard members' wallets] +Stopped guarding new members' wallets [Guard members' wallets] ``` -*Change* is shown only where the device can sign (D5). It opens -`MemberWalletDelayScreen`, a pushed screen with a `NavigateBackButton`, which -holds: +The buttons are shown only where the device can sign (D5); everybody sees the +state. Every button opens `MemberWalletPolicyScreen`, a pushed screen with a +`NavigateBackButton`, which holds: - `GuardianDelayChooser`, **moved out of** `SelectSubgroupAdminsScreen` into `ui/composable/widgets/GuardianDelayChooser.kt`, with its presets, its custom - field and its live `delayText`. Its words are passed in, because *the + field and its live `delayText`, starting at the group's current delay, or 12 + for a group opening for the first time. Its words are passed in, because *the subgroup* and *the member* differ; - D2's line: *Wallets already guarded keep the delay they were guarded at*; - D7's line: *Members whose app is older than this one can only be guarded at - 12 blocks*; -- *Ask the group*, which proposes the 30337 through + 12 blocks, and don't know this group can close*; +- **Ask the group**, which proposes an open 30337 at the chosen delay through `FrostSigningRepository.proposeSigning` and goes to `FrostSigningRoute`, as - opening a wallet does. + opening a wallet does; +- on an open group only, **Stop guarding new wallets**, an `OutlinedButton` + under it, which first asks in a dialog -- *Stop guarding new members' wallets? + Wallets already guarded stay guarded, and this group can still take their + coins after the delay.* -- and then proposes a closed 30337 the same way. -A view model, `MemberWalletDelayViewModel`, holds the input as typed, refuses -a delay below 6 or above 65,535 blocks with the reasons the subgroup picker already -uses, and does not propose the delay the group already has. +A view model, `MemberWalletPolicyViewModel`, holds the input as typed, refuses a +delay below 6 or above 65,535 blocks with the reasons the subgroup picker +already uses, does not propose the delay an open group already has, and does not +propose closing a group that is not open. The member's own leaf is the group's, and the trade the subgroup picker states applies here too, said for a person: *A coin the member moves starts waiting @@ -345,35 +448,43 @@ CLAUDE.md applies in full: strings in the catalogue in sentence case, spacing from `MaterialTheme.spacing`, the screen's four states, and the outcome reported through `rememberNotifier`. -**Tests**, `MemberWalletDelayViewModelJvmTest`: it starts at the group's current -delay; a preset and a typed delay are what it proposes; out-of-range delays are -refused with their reasons; proposing the current delay is refused. +**Tests**, `MemberWalletPolicyViewModelJvmTest`: a group opening for the first +time starts at 12; an open group starts at its delay; a preset and a typed delay +are what it proposes; out-of-range delays are refused with their reasons; +proposing the current delay is refused; closing is offered only to an open +group, and proposes a closed policy. --- ## Phase 7 — docs, and checking it on the emulators - [member-guarded-wallets.md](./member-guarded-wallets.md): *What "full control" - means* stops saying 12 and links here. The request's tag list gains the policy. + means* stops saying 12 and links here; D3 (*which members may ask*) gains + *and only of a group that has opened*. The request's tag list gains the policy. - [guardian-delay.md](./guardian-delay.md): its build table's member-wallet row ("a group still cannot choose…") points here. - [README.md](./README.md): this note's row. - This note: *Built*, and a table of where the build chose differently. By hand, regtest, three emulators: Alice (a signer), Bob (a signer), and Carol, -who joined the group after step 1. +who joined the group after step 2. -1. Alice and Bob set the group's member-wallet delay to 144 blocks. The - transcript says so on all three devices that were in the room, and not on - Carol's. -2. Carol opens *New guarded wallet*. Her device asks for the key; the answer - carries the policy; her screen says *after 144 blocks, about 1 day*. -3. Bob puts Carol's request to the group. Both signers accept it, and the +1. Carol's picker, before anything, says *This group doesn't guard members' + wallets*. +2. Alice and Bob open the group at 144 blocks. The transcript says so on the + devices that were in the room. +3. Carol joins. Her picker says the group's key is not known yet; she asks; the + answer carries the policy; her screen says *after 144 blocks, about 1 day*. +4. Bob puts Carol's request to the group. Both signers accept it, and the certificate's first guardian tag says 144. -4. Alice and Bob change the delay to 1,008. Carol's wallet still says 144. A new +5. Alice and Bob change the delay to 1,008. Carol's wallet still says 144. A new request from Carol is built at 1,008. -5. A request built on an older build (12, no policy) is refused by both signers, - with *was asked without the group's delay*. +6. Alice and Bob close the group. Carol's picker says *stopped guarding*; a + request she built before the close is refused by both signers; her wallet at + 144 is still guarded, and Alice can still take a coin from it after 144 blocks. +7. Alice and Bob open it again at 6. Carol can ask again, at 6. +8. A request built on an older build (12, no policy) is refused by both signers, + with *does not say the group guards members' wallets*. ```bash ./gradlew :composeApp:compileDebugKotlinAndroid :composeApp:jvmTest @@ -392,11 +503,20 @@ who joined the group after step 1. | 1 | `MemberWalletPolicyEvent` and its test | dark: a kind nothing produces | | 2 | `policyFor`, the transcript and summary arms | dark, and should ship early: an older build shows a raw-JSON bubble for a 30337 it has no arm for | | 3 | the key notice | dark | -| 4 | the request | dark: no group has a policy yet, so every request is at 12 | -| 5 | the signers' check | dark, and before 6: it has to be on signers' devices before any group can set a delay | -| 6 | the entrance and the screen | **the switch** | +| 4 | the request, the picker's refusals | **with 5 and 6**: from here a member can ask only an open group | +| 5 | the signers' check | **with 4 and 6**: from here signers refuse a request to a group that has not opened | +| 6 | the entrance and the screen | **with 4 and 5**: the only way a group opens | | 7 | docs and the emulator run | last | +**Phases 4, 5 and 6 are one release.** Under D8, Phases 4 and 5 stop every group +taking new member wallets until it opens, and Phase 6 is how it opens. Shipped +apart, the member's picker would say *doesn't guard members' wallets* about every +group, with no way for any group to say otherwise. Shipped together, an existing +group loses nothing but one quorum: the first time anybody wants a new member +wallet from it, a signer opens it at 12. The release note should say so, since +for a few days every group will read *doesn't guard members' wallets* until +somebody opens it. + No schema change. Policies are `GroupSignedEvent` rows like every other event the group signs, and the request already keeps its event whole. @@ -407,6 +527,16 @@ the group signs, and the request already keeps its event whole. **It does not change a wallet already guarded** (D2). A different delay is a new request, with a new key. +**Closing does not release a wallet** (D9). The group's leaf is in every address +of every wallet it already guards, and the group can still take a coin from one +after its delay. Closing stops new wallets, and nothing else. Releasing a +member's wallet would need the member to move their coins somewhere the group +holds no leaf, which they can do alone at any time. + +**It does not open groups that existed before it** (D8). Each group's quorum +opens it, once. Nothing opens a group on its behalf, because the point of D8 is +that a group guards members' wallets only once it has said so. + **It does not let the member choose.** The member chooses whether to ask, and sees the delay before they do. A member who wants a longer delay than the group offers asks a different group, or asks this one to change it. @@ -431,3 +561,6 @@ group below it. | the member chooses, within a range the group sets | asked for as *the group sets the delay*; a range is a second number to sign and explain, and can be added later as a second tag on the same event | | signers judge only by the policy they hold | a signer that missed the newest policy would refuse a correct request, and two signers holding different ones would never agree on the same request | | a per-member delay | a roster the group signs and keeps current (D4) | +| no policy means guard at the default, 12 | the first draft of this plan. It made every group a guardian of any member who asked until its quorum refused, and made the closed tag an opt-out from something no group had opted into (D8) | +| a separate kind to close | two kinds to order against each other; one addressable kind whose newest says open or closed has one answer on every device (D9) | +| deleting the policy to close | a signed event is never deleted on other devices, and an absence cannot be told apart from a member who never received it |