907dc66d12
P2 of v0.7 extends x/cover with Cover-Charter + Pool governance hybrid + category staging + the Anti-Capture Bill of Rights types (D-090(1) temporal-gap fix — Bill of Rights types land HERE, not P5, so the dual firewall is in place before any Charter can be signed). New (x/cover/types/rights.go): RightID type + 13 Right* consts + AntiCaptureBillOfRightsCount=13 locked const + 13 Waivable* bool consts (all false) + RightIsWaivable() always false + AllRights()/AllWaivableFlags(). New structs: CoverCharter (REQ-052) + CharterAmendment (7-day cooling) + PoolCouncil (REQ-062 — 3 Masons + Watcher observer; NO Anchor/MAB seat) + CoverCallVote (majority requires Watcher observer present). CoverPool extended with CharterRef + CouncilRef. D-086 DefaultParams [Phase2] -> [Phase2, Phase3, Phase4]. New Msg*: MsgSignCoverCharter (D-090(1) WaivedRights gate at ValidateBasic — mirrors MissionLockAmendmentRejected D-064), MsgAmendCoverCharter, MsgElectPoolMason, MsgVoteCoverCall, MsgAmendPoolStandingGate (D-090(3) dual check: floor at ValidateBasic + handler), MsgEscalateReserveCeiling (12-month age check). New handlers: SignCoverCharter, AmendCoverCharter (Proposed + ProposedAt), ElectPoolMason (max 3), VoteCoverCall (Yes requires observer), AmendPoolStandingGate (D-090(3) re-check), EscalateReserveCeiling, CoolCharterAmendment + RatifyCharterAmendment lifecycle helpers. New stores: charter/ council/ vote/ amendment/ + SetParamsOverride/Params(). Simtest cases (a)-(h): Charter signing + D-090(1) WaivedRights reject + 7-day cooling + election + vote observer + D-086 out-of-phase + ceiling escalation + D-090(3) below-floor reject. Lexicon: rights.go + msg_charter.go lexicon-clean (initial 'policy' hit fixed -> 'invariant'). .lexicon_fixture SkipDir guard added to 3 lexicon walks (fixes pre-existing cross-package test-isolation race). G-003/G-006/G-028/G-024 intact. go.mod/go.sum diff EMPTY. Coverage: types 98.9%, keeper 95.1%, firewall 100.0%. REQs: REQ-048, REQ-052, REQ-062, REQ-065 (D-090(1) Bill of Rights types for REQ-056 land here; P5 adds the ceremony) ---ci--- project: oy phase: 2 milestone: v0.7 status: execute ---/ci---
Component 1: OY Chain & Mirror — Phase 1 Skeleton
Status
v0.0.1 — skeleton with type definitions and locked-constant tests
Vision References
- §7: Architecture — Three Layers and the Mirror
- §3: Still/Stir (pause/resume)
Modules
x/watcher — Watcher Bond & Attestation Quorum
types.Watcher— bonded Watcher (§7: 100,000 Bread minimum bond)types.Attestation— daily reserve snapshot signed by a Watchertypes.ReserveSnapshot— off-chain reserve state (off-chain total, on-chain Bread, basket breakdown)types.QuorumStatus— QuorumMet / QuorumLost / StaleEpochtypes.SlashReason— InsufficientBond / StaleAttestation / GeographicCollusion / Forgery
Locked constants (§7):
MinBond = 100000(100,000 Bread)Quorum = 6(6-of-9)MaxWatchers = 9AttestationEpochHours = 24(daily)
x/mirror — Reserve Ratio Publication
types.NavPerBread— Net Asset Value per Bread (§4.2)types.ReserveRatio— real-time published ratio with quorum flag
x/still — Pause/Resume (Still/Stir)
types.StillState— StirActive / StillPaused (§3)types.StillReason— CouncilVote / QuorumLost / SecurityAlerttypes.StillRecord— tracks pause events- Auto-still on quorum lost (§4.2: Forge/Fold blocked until quorum restored)
Tests
12 tests, all passing:
- Watcher: MinBond, Quorum, MaxWatchers, AttestationEpoch, DefaultParams (5)
- Still: DefaultStillState, AutoStillOnQuorumLost, StillStates (3)
- Mirror: DefaultPublishInterval, ModuleName, NavPerBreadStruct, ReserveRatioQuorum (4)
What's NOT in this skeleton (deferred to P1 completion)
- Cosmos SDK app.go full integration (requires SDK v0.50+ dependency resolution)
- Keeper implementations (BondWatcher, SubmitAttestation, VerifyQuorum, SlashWatcher)
- CLI commands (oyd tx watcher bond, oyd query watcher quorum)
- Proto definitions (Buf-generated types)
- CometBFT consensus setup
- Genesis import/export
Next Steps (P1 continuation)
- Resolve Cosmos SDK v0.50 dependency tree
- Implement keeper logic with store operations
- Add proto definitions and code generation
- Wire modules into app.go
- Build oyd daemon
- Integration test: 9 Watchers bond, submit attestations, verify quorum