Commit Graph

24 Commits

Author SHA1 Message Date
CleverWild
d8dd17ee92 refactor(proposal): put DB access behind a mockable ProposalStore trait 2026-08-27 18:42:36 +02:00
CleverWild
fa2df36fbe refactor(proposal): publish approved proposals on the bus instead of executing them 2026-08-27 17:45:13 +02:00
CleverWild
9e9672a1b1 refactor(crypto): extract governance vote message and verification helpers 2026-08-27 16:44:22 +02:00
CleverWild
e9496da78c perf(proposal): replace the per-proposal tally loop with one grouped query 2026-08-27 14:00:14 +02:00
CleverWild
71081b6ee7 refactor(proposal): use id newtypes across the governance path 2026-08-27 13:42:14 +02:00
CleverWild
8421a09d9f refactor(db!: store the one-off transaction signature by component 2026-08-27 12:46:40 +02:00
CleverWild
15b826310b refactor(db): replace the proposal payload blob with typed child tables 2026-08-27 00:45:35 +02:00
CleverWild
5698d1cfb3 feat(proposal): reject proposals with an excessive TTL 2026-08-26 16:47:12 +02:00
CleverWild
6884a59325 refactor(proposal): type ProposalSummary::kind as ProposalKindTag 2026-08-26 16:32:43 +02:00
CleverWild
b364d95489 refactor(proposal): drop the Quorum prefix from VoteOutcome variants 2026-08-26 15:30:48 +02:00
CleverWild
d64478b301 refactor(proposal): replace UpdateShamirParameters with parameterless TriggerRekey 2026-08-26 15:26:17 +02:00
CleverWild
aa884339f7 refactor(proposal): remove the ApproveServerUpdate proposal kind 2026-08-26 14:53:38 +02:00
CleverWild
a501283b0c refactor(crypto): replace byte-slice signing contexts with SigningContext enum 2026-08-26 14:08:32 +02:00
CleverWild
f881102f0a refactor(proposal): drop the expired status, enforce expiry on every vote 2026-08-26 13:01:44 +02:00
CleverWild
36249129d1 feat(vault)!: implement full Shamir re-key flow and governance execution (§3.3–§3.5)
- Add `rekey.proto` with `ContributePassphrase` / `ContributeRecoveryPassphrase` / `RekeyResult`
- Wire `rekey` as a 4th vault stream payload in `vault.proto` and gRPC dispatch
- Add `RekeyRootKey` message to `Vault` actor: generates new random seal key, re-encrypts root key, writes new `root_key_history` row
- Add `StartRekey`, `ContributeRekey`, `ContributeRecoveryRekey` messages to `VaultCoordinator`; `finalize_rekey` uses threshold-1 fast path identical to bootstrap
- `execute_replace_operator` now UPDATEs `operator_identity.public_key` in-place (avoids FK constraint violation), deletes stale `operator` share row, then triggers `StartRekey`
- `execute_update_shamir_parameters` triggers `StartRekey` instead of warning stub
- `ProposalKind::ReplaceOperator` carries `old_operator_id`; encode/decode updated accordingly
- `GlobalActors::spawn` extracts `vault_coordinator` before `Ok(Self { … })` so it can be cloned into `ProposalManager::new`
- Add `handle_rekey` in session handlers forwarding passphrase contributions to `VaultCoordinator`
- Fix test: rename `replace_operator_inserts_identity_row` → `replace_operator_updates_pubkey_and_starts_rekey`, assert count stays 1 and pubkey is updated
2026-08-26 13:01:44 +02:00
CleverWild
6e3fa736e0 feat(server): recovery operators with sleeping/wakeup mechanism (§3.5/§3.6) 2026-08-26 13:01:44 +02:00
CleverWild
19a62e7195 feat(server): key-rotation proposals require full quorum (§3.3) 2026-08-26 13:01:44 +02:00
CleverWild
291ef2e831 refactor(server): typed pubkey len via u32::try_from in ReplaceOperator 2026-08-26 13:01:44 +02:00
CleverWild
d12109c2c9 feat(server): ProposalKind::ApproveOneOffTransaction 2026-08-26 13:01:44 +02:00
CleverWild
277fb3c92d feat(server): ProposalKind::ApprovePersistentGrant 2026-08-26 13:01:44 +02:00
CleverWild
9e42097683 feat(server): ProposalKind::UpdateShamirParameters 2026-08-26 13:01:44 +02:00
CleverWild
25b86b14e9 feat(server): ProposalKind::ReplaceOperator 2026-08-26 13:01:44 +02:00
CleverWild
ba8748a17b feat(server): ProposalKind ::GrantWalletAccess and ::ApproveServerUpdate 2026-08-26 13:01:44 +02:00
CleverWild
3e61d807b4 test(server): governance integration tests 2026-08-26 13:01:44 +02:00