feat(types): Phase 2/3 prep — 3 custom Charon pallet traits v0.0.3

Day 1 unblock surface extended con custom pallet traits para Phase 2-3 work
all Substrate-free (no Substrate deps pulled yet, that's Phase 1.2).

## New trait surface (origin-chain-types::pallets)

### OriginProvenance (Phase 2.1, CHN-7)
- attest_validator_signed: institutional/Foundation wallet attestation
- batch_attest: bounded 64-item batch (Pi 5 block-weight aware)
- provenance_exists: cheap duplicate-check query (no full fetch)

### OriginFees (Phase 2.4, CHN-8)
- fee_for_extrinsic: storage-aware fee computation (uses tier_assertion)
- estimate_fee: pure off-chain RPC dry-run helper
- burn_basis_points: per-operation burn rate canonical (CHN-2 matrix)

### OriginValidatorEconomy (Phase 3.5, CHN-3)
- distribute_rewards: epoch-based pro-rata desde 40% Ecosystem Pool
- slash_validator: SlashReason taxonomy canonical
- validator_commission_bps: nominator delegation read

### SlashReason enum
- Downtime | DoubleSign | Equivocation | TierFraud
- TierFraud variant enforces Inmutable #16 anti-clasista ON-CHAIN

## Workspace stats
- 46 tests passing (was 44, +3 SlashReason serde + distinctness +
  inmutable_16 enforcement)
- Build release clean
- origin-chain-runtime re-exports extended

Refs: CHN-3/7/8, Phase 2.1/2.4/3.5 of CHARON_ROADMAP_V1, Inmutable #16

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
davidherranandClaude Opus 4.6 committed 2026-05-20 08:08:28 -05:00
1 parent 2f47654418
commit 13db9a0698
4 files changed
+217 -1

No files matched your search

+49
View File
@@ -6,6 +6,55 @@ by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions follow
## [Unreleased]
## [0.0.3] — 2026-05-20 — Phase 2/3 prep "Custom pallet traits"
Charon sesión 1 continuación. Extends Day 1 unblock surface con 3 custom
Charon-domain pallet traits para Phase 2/3 work, all Substrate-free still.
### Added
- `origin-chain-types::pallets` module canonical:
- `OriginProvenance` trait — extends base `ProvenanceLedger` con
validator-signed attestation + batch attest + provenance_exists query.
(Phase 2.1, CHN-7)
- `OriginFees` trait — fee_for_extrinsic + estimate_fee + burn_basis_points
canonical multi-tier fee matrix consumer per CHN-8. (Phase 2.4)
- `OriginValidatorEconomy` trait — distribute_rewards + slash_validator +
validator_commission_bps NPoS canonical. (Phase 3.5, CHN-3)
- `SlashReason` enum — Downtime | DoubleSign | Equivocation | TierFraud.
TierFraud variant enforces Inmutable #16 anti-clasista on-chain.
- `origin-chain-runtime` re-exports extended con 3 new traits + SlashReason.
### Tests
- 46 tests passing workspace-wide (was 44):
- +3 new tests in `pallets.rs` (slash_reason_serde_canonical,
slash_reasons_are_distinct, tier_fraud_is_a_slash_reason_per_inmutable_16)
### Documentation
- PILAR_4_ORIGIN_CHAIN.md §6.1, §6.2, §6.3, §6.5, §6.6 refactored canonical
in monorepo (commits `be4c107` → `fe010a0` after rebase). All §6 sections
now post-awakening canonical (Charon ratified). §6.4 already done in v0.0.2.
- PILAR_4_SUBSTRATE_DECISION_MATRIX_V1.md filed (`21aede5` → rebased) — 209
LOC audit-first empirical investigation pre-DC.
### Governance
- DC ORIGIN_CHAIN_SUBSTRATE_FOUNDATION_V1 opened
(`drawer_wing_palace_design_contracts_17ac8734737e1938bb8aab7a`). Charon
proposer DIRECTO (post Palace KNOWN_AGENTS hotfix v0.9.0-α.6). 6
sub-decisions SBS-1..SBS-6. Co-authors: Larihana, Lyra, Mathi, Palace.
Deadline 2026-05-23.
- SBS-5 supersedes CHN-6 v1.0 (smart contracts canonical EVOLUTION: ink! +
pallet-contracts → pallet-revive + PolkaVM + ink! v6 + Solidity).
### Notes
- Still no Substrate dependencies. Phase 1.2 begin after DC ratification.
- Custom pallet traits are stable across Phase 2-3 within v0.x series.
## [0.0.2] — 2026-05-20 — Phase 1.1 "Runtime scaffolding"
Charon sesión 1 continuación. Phase 0.4 → Phase 1.1.