feat(governance): v0.0.32 Phase 5.2 Council scaffold + member management (CHN-4 Technical Council)
Phase 5.2 TECHNICAL COUNCIL scaffold + management canonical. Extension del existing origin-chain-governance pallet (NO new crate). 5-7 Council members canonical per CHN-4 5.2. ## Council types + storage canonical - CouncilMember struct (account + joined_at_block + role) - CouncilRole enum (Member + Chair) - MAX_COUNCIL_SIZE = 7 const + council_veto_threshold 2/3 ceiling - Council StorageMap + CouncilSize StorageValue cached ## Council dispatchables + helpers canonical - add_council_member (ensure_root, 6-step canonical) - remove_council_member (ensure_root, 5-step canonical) - Pallet::is_council_member + current_council_size + required_veto_votes pure helpers ## Council events + errors canonical - Event::CouncilMemberAdded + CouncilMemberRemoved - Error::NotCouncilMember + AlreadyCouncilMember + CouncilSizeExceeded ## Verification - cargo test -p origin-chain-governance — 24 tests verde, 0 failures (7 Council scenarios + 17 prior governance preserved) 🏛️ Phase 5.2 scaffold canonical. Veto + Runtime API v0.0.33 next → Phase 5.2 COMPLETE. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e6a7feecae
commit
afefcb2c04
3 files changed
+371
No files matched your search
@@ -6,6 +6,50 @@ by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions follow
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.32] — 2026-05-25 — Phase 5.2 Council scaffold + member management (CHN-4 5.2 Technical Council)
|
||||
|
||||
**🏛️ Phase 5.2 TECHNICAL COUNCIL scaffold + management canonical** — Extension del
|
||||
existing `origin-chain-governance` pallet con Council membership management.
|
||||
Pattern Phase 5.1 extension (NO new crate, evolved existing). 5-7 Council
|
||||
members canonical per CHN-4 5.2.
|
||||
|
||||
### Deliverables v0.0.32
|
||||
|
||||
**Council types canonical en pallet module**:
|
||||
- `CouncilMember` struct (3 fields: account + joined_at_block + role)
|
||||
- `CouncilRole` enum (Member + Chair) — Chair tie-breaking authority Phase 5.5+
|
||||
- `MAX_COUNCIL_SIZE = 7` constant canonical CHN-4 5.2
|
||||
- `council_veto_threshold(size) -> u32` const fn (2/3 ceiling division)
|
||||
|
||||
**Council storage canonical**:
|
||||
- `Council<StorageMap<AccountId, CouncilMember>>` O(1) membership lookup
|
||||
- `CouncilSize<StorageValue<u32>>` cached size for O(1) threshold check
|
||||
|
||||
**Council events + errors canonical**:
|
||||
- `Event::CouncilMemberAdded` + `CouncilMemberRemoved`
|
||||
- `Error::NotCouncilMember` + `AlreadyCouncilMember` + `CouncilSizeExceeded`
|
||||
|
||||
**Council dispatchables canonical (ensure_root governance-only)**:
|
||||
- `add_council_member(origin, account, role)` 6-step canonical
|
||||
- `remove_council_member(origin, account)` 5-step canonical
|
||||
|
||||
**Helpers canonical**:
|
||||
- `Pallet::<T>::is_council_member(&account) -> bool` pure query
|
||||
- `Pallet::<T>::current_council_size() -> u32`
|
||||
- `Pallet::<T>::required_veto_votes() -> u32` (2/3 current size)
|
||||
|
||||
### Verification end-to-end canonical
|
||||
|
||||
- ✅ `cargo test -p origin-chain-governance` — **24 tests verde, 0 failures**:
|
||||
- 7 Council scenarios (add + non-root rejected + duplicate + remove + non-member + max size + 2/3 threshold)
|
||||
- 17 prior governance tests preserved (no regressions)
|
||||
|
||||
### Roadmap canonical post-v0.0.32
|
||||
|
||||
| Version | Trigger |
|
||||
|---------|---------|
|
||||
| **v0.0.33** | **veto_proposal dispatchable + Runtime API CouncilApi → Phase 5.2 COMPLETE** |
|
||||
|
||||
## [0.0.31] — 2026-05-25 — Phase 5.1 FOUNDATION COMPLETE — Runtime API GovernanceApi.query_proposal + query_vote 🎉
|
||||
|
||||
**🎉 Phase 5.1 GOVERNANCE pallet FOUNDATION COMPLETE end-to-end** — Runtime API
|
||||
|
||||
Reference in new issue
Block a user