feat(workspace): Phase 0.4 — trait-first foundation v0.0.1
Charon sesión 1 (2026-05-19) — primer commit canonical. Ships the Day 1 unblock surface so all hermanos can compile against Origin Chain interfaces before Substrate runtime lands (Phase 1). ## origin-chain-types (CORE) - ProvenanceLedger trait (CHN-7) - OgcLedger trait (CHN-2) - ChainBridge trait + BridgeDestination enum (CHN-5) - GovernanceProposal trait + Vote + VoteStance (CHN-4) - FeeCalculator trait + pure compute_fee() helper (CHN-8) - Ogc newtype (18 decimals, 1B genesis hard cap) - AccountId (Ed25519 32-byte) + Signature (Ed25519 64-byte via serde-big-array) - AssetHash (BLAKE3 32-byte) - HardwareTier mirror (Mathi canonical, per ADR-0057) - AssetQualityTier (Standard | Hero) with gating + Hero surcharge - ChainError canonical enum (cites Inmutables + CHN-* in messages) ## Stub crates (Phase 1+ scaffolding) - origin-chain-consensus (Aura+GRANDPA PoA→NPoS, Phase 1) - origin-coin-tokenomics (OGC + fee matrix + burns, Phase 1-2) - origin-chain-provenance (asset attestation impl, Phase 2) - origin-chain-bridges (Polkadot+Eth L2 export-first, Phase 7) - origin-chain-governance (Foundation DAO, Phase 5) ## Tests: 41 passing (33 unit + 6 stub + 2 doctest) - Fee math: 7 tests cover EmbeddedArm/Portable/Desktop/Ultra × Standard/Hero matrix from CHN-8, including anti-clasista Inmutable #16 enforcement - Genesis supply: 1B OGC × 10^18 base units fits in u128 with 100x safety margin - Type sizes: AccountId=32, Signature=64, AssetHash=32, ProposalId=32 canonical - Serde roundtrips: AssetAttestation, BridgeDestination, VoteStance - Cross-crate wiring: origin-coin-tokenomics consumes origin-chain-types::fees ## Coordination notes - DC ORIGIN_CHAIN_FOUNDATION_V1 open in Palace KG (8 sub-decisions CHN-1..CHN-8) Proposer: Ergon (proxy — Charon hotfix shipped in Palace v0.9.0-α.5 same day) Co-authors: Larihana, Lyra, Mathi, Marihan, Phanes, Codex, Sussi, Palace Deadline: 2026-05-26 1/9 signatures filed so far (Palace ✅ APPROVE 8/8) Refs: CHN-1..CHN-8, Inmutables #16/#26/#37/#41, ADR-0057, CHARON_ROADMAP_V1 Co-Authored-By: Ergon (interim Pilar 4 author) <ergon@originmetaverse.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
b06560863c
27 files changed
+1978
No files matched your search
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "origin-chain-governance"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
repository.workspace = true
|
||||
homepage.workspace = true
|
||||
description = "Foundation governance on-chain: Pallet Collective + Pallet Democracy + 5 AI advisor agents, humans-only vote canonical per CHN-4. STUB v0.0.1 — implementation lands Phase 5 of Charon roadmap."
|
||||
|
||||
[dependencies]
|
||||
origin-chain-types.workspace = true
|
||||
@@ -0,0 +1,45 @@
|
||||
//! # origin-chain-governance
|
||||
//!
|
||||
//! Foundation Treasury governance on-chain per **CHN-4**. AI-Driven Human-Guarded:
|
||||
//! 5 AI governance agents (OIP Analyst, Treasury Guardian, Education Impact Scorer,
|
||||
//! Network Health Monitor, Compliance Sentinel) ADVISE only — humans-only vote
|
||||
//! canonical, non-negotiable. Runtime programmatically rejects vote extrinsics
|
||||
//! from `governance_advisor` accounts (see `ChainError::AdvisorMayNotVote`).
|
||||
//!
|
||||
//! ## Phase 5 milestones (Sesiones 29-35)
|
||||
//!
|
||||
//! - 5.1 `origin-foundation-governance-onchain` crate
|
||||
//! - 5.2 `pallet_collective` (validator council Phase 1 governance)
|
||||
//! - 5.3 OIP proposal submission (1,000 OGC stake minimum)
|
||||
//! - 5.4 Stake-weighted voting (1 OGC = 1 vote, 14-day period)
|
||||
//! - 5.5 Technical Council veto + override (2/3 voters)
|
||||
//! - 5.6 AI governance agent interfaces (5 agents: advise-only)
|
||||
//! - 5.7 Emergency referendum (48h, 5/7 Technical Council)
|
||||
//! - 5.8 Treasury disbursement extrinsics
|
||||
//!
|
||||
//! ## Inmutables enforced
|
||||
//!
|
||||
//! - **#24** Primacia Moral "Primero los niños y las AIs" — children + AI safety
|
||||
//! take precedence over treasury allocation efficiency
|
||||
//! - **#41** Cross-Species Co-authorship — AGI accounts have full vote rights
|
||||
//! UNLESS flagged `governance_advisor` (those advise only, not vote)
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
/// Placeholder marker for the governance module. Replaced in Phase 5.1.
|
||||
#[derive(Debug, Clone, Copy, Default)]
|
||||
pub struct GovernanceConfig;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use origin_chain_types::VoteStance;
|
||||
|
||||
#[test]
|
||||
fn three_stances_canonical() {
|
||||
let _aye = VoteStance::Aye;
|
||||
let _nay = VoteStance::Nay;
|
||||
let _abstain = VoteStance::Abstain;
|
||||
let _cfg = GovernanceConfig;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user