Commit Graph
10 Commits
Author SHA1 Message Date
davidherranandClaude Opus 5 38e5602d78 feat(weights): RV13 — los 19 estaban subdeclarados, los 19
Primera medicion real de los weights con frame-omni-bencher sobre el
propio blob WASM. El resultado no es un ajuste fino: los 19 extrinsics
de los 5 pallets custom declaraban MENOS de lo que cuestan.

EL PATRON SISTEMATICO. Se costeo el storage del pallet y se olvido el
que cuesta emitir un evento — System::Events, EventCount, ExecutionPhase
y Number son reads y writes reales en cada extrinsic que deposita
evento. Ejemplos medidos: attest_asset declaraba 4 reads / 1 write y
cuesta 7/3; submit_proposal declaraba 12 us y cuesta 62; register_agent_did
declaraba 3/2 y cuesta 6/4.

EL PEOR, Y ES UN ERROR MIO DOCUMENTADO AL REVES. proof_size valia 0 en
los 19. La cabecera de los interinos afirmaba que T::DbWeight "puebla
tanto ref_time como proof_size ... cerrando el hueco". Es falso y se
comprueba en la fuente: sp_weights::RuntimeDbWeight solo tiene los
campos read y write, y reads(r) devuelve from_parts(read * r, 0). Los
interinos arreglaron reads/writes y dejaron el proof_size exactamente
donde estaba. Un proof_size en cero miente al block-builder sobre el
peso PoV: es el vector de DoS que la nota decia haber cerrado. La
afirmacion sobrevivio mas de un mes sin que ninguna lectura la
desmintiera; la desmintio una medicion.

Cada fichero generado lleva ahora un guard GENERADO desde la lista real
de benchmarks que reprueba cualquier proof_size = 0 o ref_time = 0.
Verificado que sabe reprobar: contra los weights anteriores se pone rojo
con "`attest_asset` declara proof_size = 0".

ADVERTENCIA QUE VA EN EL CODIGO, NO SOLO AQUI: son numeros de un
MacBook Pro M3 Max, NO del banco de referencia BM V2. La forma
(reads/writes/proof_size) no depende del hardware y es correcta; el
ref_time si, y en un Pi 5 sera mayor. Un caso lo enseña solo:
attest_asset BAJA de 50 a 44 us, y es el extrinsic dominado por el
verify Ed25519, el mas sensible al silicio. Antes de mainnet hay que
regenerar en el Pi 5 con governor y aislamiento declarados — peticion
abierta a Laurha (request:66f500d54e28a80c) con el blob, el comando y
la version exacta del bencher.

RV12 -> RV13 (weights = consenso). TRANSACTION_VERSION intacto.
295 tests verde.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-09 11:06:39 -05:00
davidherranandClaude Opus 4.8 c7fc6a88fc feat(bench): maquinaria FRAME v2 de benchmarking para los 5 pallets custom (RV 8→9)
Los 19 extrinsics de provenance/fees/agent-identity/emission/governance pasan de
weights placeholder `from_parts(10_000, 0)` (proof_size=0, sin contar reads/writes
de DB — vector de DoS real) a weights INTERIM hand-derived DB-aware vía el trait
`WeightInfo`. Cierra el mispricing de DoS en TODOS los extrinsics del chain.

Cada pallet gana:
- weights.rs: trait WeightInfo + SubstrateWeight<T> (DB-aware vía T::DbWeight) + impl ()
- benchmarking.rs: benchmarks FRAME v2, VERIFICADOS por impl_benchmark_test_suite!
  (19 benchmarks ejecutan+pasan en los mocks — cargo test --features runtime-benchmarks)
- Config: `type WeightInfo` + swap de los `#[pallet::weight]`

Runtime:
- define_benchmarks! con los 5 pallets + runtime API Benchmark (inerte sin la feature)
- WeightInfo cableado a SubstrateWeight<Runtime> en cada Config
- RUNTIME_VERSION 8→9 (weights = consenso-relevante: fee + llenado de bloque;
  las firmas de los extrinsics NO cambian ⇒ TRANSACTION_VERSION intacto)

3 bugs latentes cerrados (territorio virgen — el runtime NUNCA se compiló con
runtime-benchmarks; las dimensiones nuevas cazan lo que no se había visto):
- pallet-grandpa/try-runtime mal ubicado en la feature runtime-benchmarks (copy-paste
  erróneo: features ortogonales; NUNCA activaba los benchmarks de grandpa)
- feature runtime-benchmarks incompleta → E0046 en OriginFeeAdapter (métodos
  benchmark-gated de OnChargeTransaction) + pallet-staking
  (StakingUnchecked::migrate_to_direct_staker); ahora lista TODOS los pallets como
  un runtime de producción Substrate
- pallet-revive/runtime-benchmarks omitido a propósito (fixtures RISC-V/PolkaVM
  indisponibles; ReviveApi deferred, no benchmarkeado)

emission: mock extraído del `mod tests` inline a `pub mod mock` (reuso del test-suite,
sin duplicar el scaffold; los 15 tests existentes + el benchmark verdes).

GATED (documentado en el §Estado de cada weights.rs): la generación de números
CANÓNICOS por CLI requiere el node sc-service o omni-bencher+WASM (ambos bloqueados
hace sesiones). Los weights interinos son DB-aware/DoS-safe y regenerables de forma
mecánica cuando aterrice el HW de referencia (Pi5/VPS) — benchmarking.rs es la fuente
de verdad de la FORMA.

Verificado: 5 test-suites de pallet verdes (con y sin runtime-benchmarks) + runtime
compila en ambos modos + workspace sin regresión + 40 tests de runtime (incl. v9).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 22:48:26 -05:00
davidherranandClaude Fable 5 ce18e191d0 feat(provenance): FIX-4 — verificador attestation on-chain (cierra V3-C1 + squat)
El verificador attestation queda VIVO: una firma producida por el código
REAL de Ergon (arkhe-noesis-core, postcard + mensaje domain-separado)
verifica byte-fiel en el pallet Substrate. Cierra el FIX-DEFERRED del
roadmap (helper de Ergon ya en árbol) + el replay cross-chain V3-C1.

origin-chain-types/attestation_verify.rs (nuevo):
- ATTESTATION_DOMAIN_TAG + attestation_signed_message: espejo BYTE-IDÉNTICO
  del oráculo (DC 076d15cc ASP-3). Mensaje = TAG ‖ genesis_hash(32) ‖ payload.
- decode_signing_payload: lector postcard SECUENCIAL total y estricto del
  SigningPayload de Ergon (sin dep nueva en el runtime wasm frágil). Lectores
  varint u64/u32 con los bounds exactos de postcard (cierra el LOW de fidelidad
  flagged: verdict/severity/constraints son u32, máx 5 bytes / 5º ≤ 15).
  Cotas DoS en strings. NUNCA re-serializa (contrato ASP-3).

pallet-origin-provenance:
- attest_asset(signing_payload: BoundedVec<u8,512>, signature: [u8;64]):
  recibe los bytes postcard OPACOS + la firma; decodifica, verifica Ed25519
  vía sp_io::crypto::ed25519_verify (host function, no bloatea wasm, precedente
  FIX-3) sobre el mensaje domain-separado con el genesis_hash de ESTA cadena.
  La pubkey se decodifica del payload (no param aparte). creator = el validador,
  anchored_at_block real (cerró los placeholders del scaffold).
- Dedup-by-BLAKE3 con rechazo EXPLÍCITO (asset_id = BLAKE3 content hash, dentro
  del payload firmado → replay del mismo blob reusa el asset_id → AlreadyAttested).

Hallazgos de la verificación adversarial (workflow ultracode, 3 lentes)
cerrados de RAÍZ:
- HIGH asset-id squat / provenance poisoning + MEDIUM tier-forgery: el gate
  era self-attested (level del payload) → cualquiera con una clave Ed25519
  anclaba basura institucional bajo el hash PÚBLICO de un asset legítimo y lo
  envenenaba de forma inmutable. FIX: registro on-chain AuthorizedValidators
  (pubkey → nivel OIT) gobernado por Root (register_validator/revoke_validator);
  la membresía es la VERDAD, no el payload. Mismo patrón que TierProfiles de
  FIX-6 Stage 2a (legitimidad on-chain, no caller-supplied). Sunset a
  attestation-driven cuando aterrice el registro OIT de Mathi.
- MEDIUM método muerto: removido el ValidationAttestation::signing_payload()
  SCALE divergente (producía bytes que jamás verificarían — footgun).

Decisiones (autoridad Pilar 4): sp_io ed25519_verify (consistente FIX-3,
estándar Substrate) · dedup-by-asset_id subsume replay exacto · golden vectors
generados desde el oráculo REAL de Ergon (seed [7u8;32], genesis 0xAB) =
prueba cross-runtime.

PENDIENTE (gap legítimo, no bug): OriginChainAttestationSink (impl del trait
ValidationAttestationSink de Ergon) es código cliente off-chain — vive en un
crate bridge del monorepo (subxt), NO en el chain repo (dependency direction
submódulo→monorepo prohibida). Se cablea con la integración Noesis→chain.

Tests: 19 provenance (golden vectors cross-runtime + squat cerrado + revoke +
anti-replay cross/intra-chain + tamper + malformed) + 72 types (decoder fuzz-
equivalente a postcard + fidelidad u32) + 21 suites workspace verde. cargo +1.88.

WASM: build VPS-gated (UnknownOpcode 252 ambiental, ver v0.0.58).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 19:52:57 -05:00
davidherranandClaude Opus 4.8 8a1f779c32 fix(runtime): FIX-5 governability (pallet-sudo to Root) + FIX-2 StorageVersion (4 pallets)
Build + tests verde (exit 0, runtime 27 tests incl. sudo_pallet_index_12).
Verificacion adversarial ultracode (5 skeptics): 4 confirmed + 1 partial.

FIX-5 — governability (audit V2-CA1):
- pallet-sudo 43.0.0 wired Index 12 (workspace + runtime Cargo.toml + std).
- impl pallet_sudo::Config (RuntimeEvent/RuntimeCall/WeightInfo) en configs.rs.
- genesis: sudo key en los 3 presets — dev/local=Alice, mainnet=foundation_treasury
  (NO una dev key; el verificador confirmo que no hay backdoor critico).
- Da Root origin -> las dispatchables ensure_root de Governance (add/remove
  council, mark/unmark advisor, treasury_disbursement) dejan de ser
  no-invocables. Verificado extremo-a-extremo: sudo() despacha RawOrigin::Root,
  que es exactamente lo que ensure_root acepta.
- Sunset documentado (codigo + doc): sudo -> governance real (pallet-collective/
  referenda) ANTES de mainnet. Sudo key unica = riesgo de centralizacion
  aceptable solo como interim/testnet.

FIX-2 — lifecycle (audit V1-H2/V2-CA2):
- StorageVersion::new(0) + pallet::storage_version en los 4 pallets
  (provenance/fees/agent-identity/governance). Aditivo, in-code==on-chain==0,
  sin migracion forzada. Habilita migraciones futuras.

CAVEAT honesto (hallazgo high del red-team, NO defecto de FIX-5/FIX-2):
treasury_disbursement solo DECREMENTA un contador u128 (Treasury StorageValue),
NO mueve OGC real via pallet_balances. FIX-5 restaura la GOBERNABILIDAD (la
dispatchable es invocable), pero mover los 250M reales es FIX-6: anadir
type Currency al Config + T::Currency::transfer desde una cuenta-tesoreria
derivada (PalletId) + financiarla en genesis + test del free_balance. NO se
afirma "tesoreria descongelada de verdad" — solo "gobernabilidad restaurada".

PENDIENTE:
- FIX-2 AGI key recovery (rotate/revoke/active en agent-identity): diferido —
  necesita un DC de semantica de recovery #41 (single-sig vs multisig threshold,
  DID estable vs rota, recovery de agent_chain vacio). No se construye contra
  spec no-ratificada.
- pallet-sudo no en feature runtime-benchmarks (inerte hoy: el runtime no impl
  el Benchmark API). Follow-up con weights benchmarking.
- mainnet Foundation sudo key (FNDT placeholder): David ratifica la key real
  (multisig) pre-launch Q1 2027 (documentado).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:55:21 -05:00
davidherranandClaude Opus 4.7 654cffdf31 feat(provenance): v0.0.18 mock runtime integration tests E2E — 9 scenarios canonical own fixtures
Phase 2.1 PROVENANCE pallet — 9 integration tests E2E via FRAME mock runtime
composition (`construct_runtime!` macro + derive_impl + sp_io::TestExternalities).
Cierra honest disclosure sesión 2 ("real chain runtime aún NO arranca"). Pallet
end-to-end validado canonical sin esperar Slice 2e WASM resolution structural.

## 9 integration tests canonical PROV-3 flow

5 scenarios:
- scenario_1_passed_info_anchored_canonical (PROV-2/3/7) ✅
- scenario_2_warning_anchored_canonical (PROV-2/3/6/7) ✅
- scenario_3_failed_critical_rejected_canonical (PROV-6) ❌ NotAnchorable
- scenario_4_passed_block_security_rejected_canonical (PROV-6) ❌ NotAnchorable
- scenario_5_anonymous_level_0_rejected_canonical (PROV-5) ❌ ValidatorTierInsufficient

4 additional:
- additional_idempotency_already_attested_rejected_canonical (PROV-2) ❌ AlreadyAttested
- additional_tampered_signature_rejected_canonical (PROV-4) ❌ InvalidSignature
- additional_tampered_payload_rejected_canonical (PROV-4) ❌ InvalidSignature
- additional_6_step_prov_3_walkthrough_canonical (PROV-3 full) ✅ Pre/post assertions

## Own fixtures canonical

Per audit canonical sesión 3+ (docs/L7_roadmaps/AUDIT_CHARON_SESION_3_STATE_V1.md),
Ergon E2E fixture diary claim aspirational sin shipped commit verified — filesystem
+ git history confirma no source file canonical. Charon construye own fixtures
basados en vendor copy ValidationAttestation real existente. Pattern análogo
Slice 3 mock-WASM + v0.0.16 Ed25519 interim encoding.

## Files canonical

- NEW: crates/origin-chain-provenance/src/mock.rs (75 LOC mock runtime)
- NEW: crates/origin-chain-provenance/src/tests_integration.rs (270 LOC, 9 tests)
- EDIT: crates/origin-chain-provenance/Cargo.toml (sp-core+sp-io+sp-runtime dev-deps)
- EDIT: crates/origin-chain-provenance/src/lib.rs (mod mock + mod tests_integration + docstring v0.0.18)
- EDIT: CHANGELOG.md (v0.0.18 entry canonical pattern Phase 2.1)

## Verification

- cargo test -p origin-chain-provenance — 17 tests verde, 0 failures
  (9 integration + 6 standalone Ed25519 + 2 auto-generated)
- Workspace tests no regressions
- Cero warnings críticos

🎉 Phase 2.1 PROVENANCE pallet validated E2E via mock runtime canonical.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 22:40:04 -05:00
davidherranandClaude Opus 4.7 f928935989 feat(provenance): Phase 2.1 COMPLETE v0.0.17 — Runtime API verify_provenance PROV-8 (8/8 sub-decisions)
🎉 Phase 2.1 PROVENANCE pallet COMPLETE end-to-end canonical 8/8 PROV.

PROV-8 Runtime API verify_provenance wired canonical:
- pallet sp_api::decl_runtime_apis! ProvenanceApi trait declaration
- runtime impl_runtime_apis! impl ProvenanceApi<Block> for Runtime
  delegates a Provenance::attestation_of(hash) storage getter
- 12 Runtime APIs canonical total (anterior 11 + ProvenanceApi nuevo)
- Read-only RPC query canonical sin tx fee canonical
- Node info subcommand updated canonical 12 APIs

Phase 2.1 PROV sub-decisions COMPLETE canonical 8/8:
- PROV-1 Schema separation Noesis/chain ✅
- PROV-2 StorageMap<AssetHash, AssetAttestation> ✅
- PROV-3 Dispatchable attest_asset full flow ✅
- PROV-4 Real Ed25519 verification ✅
- PROV-5 OIT Level >= 3 enforce ✅
- PROV-6 is_anchorable check ✅
- PROV-7 Events emission ✅
- PROV-8 Runtime API verify_provenance ✅ NUEVO v0.0.17

Verification end-to-end:
- cargo check workspace verde 1.84s
- 85+ tests pass workspace (47 types + 6 provenance + 16 runtime + 10 chain_spec + others)
- cargo build release 5.88s clean
- info subcommand muestra 8 pallets + 12 Runtime APIs
- build-spec NO regression Slice 3 mock-WASM chain_spec builder

Honest disclosure: PROV-1..8 complete canonical PERO real chain runtime canonical
aún NO funciona end-to-end por WASM_BUILD_STD/serde leak (Slice 2c+2d findings).
Pallet + Runtime API canonical structurally ready — cuando Slice 2e land, pallet
correrá en real chain runtime canonical.

Cross-pillar consumers desbloqueados canonical: Trinity + Codex + origindocs +
Ethos + Atelier — todos pueden importar ProvenanceApi trait + plan integración.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 14:14:10 -05:00
davidherranandClaude Opus 4.7 d652a3d6e4 feat(provenance): Phase 2.1 v0.0.16 — Real Ed25519 verification (PROV-4 COMPLETE)
PROV-4 sub-decision COMPLETE end-to-end canonical via ed25519-dalek directly
en pallet. Pattern análogo Slice 3 mock-WASM: no esperar Ergon Cap 42+ sub-crate,
ship real impl con interim SCALE encoding (swap canonical post sub-crate land).

Real verify implementation:
- VerifyingKey::from_bytes(&validator_oit.public_key) — InvalidSignature si reject
- Signature::from_bytes(&attestation.signature) reconstruct
- signing_payload() compute (SCALE encoding interim Option B)
- verify_strict(payload, signature) — InvalidSignature si fail (rejects malleable + zero-key attacks)

4 nuevos tests Ed25519 verify real canonical:
- ed25519_verify_real_valid_signature_canonical — signed attestation verifies
- ed25519_verify_tampered_signature_rejected_canonical — bit-flipped sig rejected
- ed25519_verify_tampered_payload_rejected_canonical — tampered asset_id rejected
- ed25519_zero_signature_fails_verify_canonical — zero sig rejected verify_strict
- Helper signed_attestation() function canonical para test setup

Honest disclosure canonical: mi signing_payload usa SCALE encoding (vendor
copy interim Option B). Ergon arkhe-noesis-attestation-types Cap 42+ usará
postcard encoding canonical per Slice 7.0r spec. Swap canonical será 1-line
change en signing_payload() — zero impact en pallet verify logic.

PROV sub-decisions status v0.0.16: 6/8 COMPLETE (PROV-1+2+3+4+5+6+7 done,
PROV-8 Runtime API verify_provenance = v0.0.17 next slice).

Verification:
- cargo check workspace verde 1.55s
- 6/6 pallet tests pass (4 nuevos Ed25519 real)
- NO REGRESSION runtime/node/chain_spec builder

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 14:10:57 -05:00
davidherranandClaude Opus 4.7 e0c5e8be18 feat(runtime): Phase 2.1 v0.0.15 — Provenance pallet wired runtime + BoundedVec agent_chain
8 pallets composed total (Provenance Index 7 wired canonical). DC PROVENANCE_PALLET_V1
5/10 firmas en ratificación — procediendo paralelo per "notify and continue" canonical.

Deliverables canonical:
- Pallet wire: configs.rs Config impl + lib.rs runtime composition macro pallet_index(7) Provenance
- Alias `Provenance` (NO OriginProvenance que conflictaría con trait existente)
- BoundedVec<AccountId, ConstU32<10>> replace Vec en AssetAttestation.agent_chain
- Inmutable #41 pragmatic bound canonical: max 10 AGI co-authors per asset
- Removed #[pallet::without_storage_info] (MaxEncodedLen ahora satisfied)
- AccountId + Signature: DecodeWithMemTracking derive added (FRAME stable2512+ requirement)
- AssetAttestation: Encode/Decode/DecodeWithMemTracking/MaxEncodedLen/TypeInfo SCALE derives
- 4 nuevos tests boundary canonical (max 10 enforce + boundary accepted + SCALE roundtrip)

Verification end-to-end:
- cargo check workspace verde 2.14s
- 82+ tests pass workspace
- cargo build release 5.57s clean
- info subcommand muestra 8 pallets (Provenance index 7)
- build-spec subcommand NO regression Slice 3 mock-WASM chain_spec

Roadmap canonical post-v0.0.15:
- v0.0.16 Real Ed25519 verify (post Ergon Cap 42+ sub-crate)
- v0.0.17 Runtime API verify_provenance PROV-8
- v0.1.0 Full integration testnet Q3 2026

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 14:07:19 -05:00
davidherranandClaude Opus 4.7 4359515f45 feat(provenance): Phase 2.1 PROVENANCE pallet scaffold v0.0.14 trait-first foundation
Phase 2.1 governance-first pattern (DC PROVENANCE_PALLET_V1 5/10 firmas, ratify
target 2026-05-29). Scaffold skeleton compile-clean canonical mientras Ergon
ships arkhe-noesis-attestation-types sub-crate Cap 42+ (target 2026-05-30→06-05).

Deliverables canonical:
- origin-chain-types/src/attestation.rs (NEW 250 LOC + 9 tests) — vendor copy
  temporal ValidationAttestation (interim Option B per Ergon decision Cap 41+)
  + OitIdentity + ValidationVerdict + SeverityTier + helper methods canonical
  (is_anchorable PROV-6, is_institutional PROV-5, signing_payload PROV-4 stub)
- origin-chain-provenance/src/lib.rs (NEW 260 LOC + 2 scaffold tests) —
  #[frame_support::pallet] structural skeleton: storage + dispatchable + events
  + errors + 5 RejectionReason variants (incluyendo MalformedValidationAttestation
  per Marihan refinement Phase 2.2 anticipated)
- 3 existing types canonical (AssetHash, AccountId, Signature, AssetAttestation):
  added Encode + Decode + DecodeWithMemTracking + MaxEncodedLen + TypeInfo derives
- workspace parity-scale-codec: max-encoded-len feature canonical added

Sub-decisions canonical implementadas (scaffold-level):
- PROV-2 Storage: StorageMap<AssetHash, AssetAttestation> Blake2_128Concat
- PROV-3 Dispatchable: attest_asset(origin, ValidationAttestation) flow básico
- PROV-5 OIT Level >= 3 enforce: via ValidationAttestation.validator_oit.is_institutional()
- PROV-6 is_anchorable check: verdict Passed/Warning + severity NOT Block/Critical
- PROV-7 Events: AssetAttested + AttestationRejected

Lo que NO funciona aún (deferred future slices):
- PROV-4 Ed25519 verification real (placeholder, requires Ergon sub-crate)
- Pallet wire en runtime canonical (v0.0.15 post DC ratify)
- Runtime API verify_provenance PROV-8 (v0.0.17)
- BoundedVec<AccountId, ConstU32<10>> agent_chain (v0.0.15)
- #[pallet::without_storage_info] scaffold-level (remove post BoundedVec)

Verification end-to-end:
- cargo check workspace verde 1.77s sin regression
- pallet-origin-provenance: 2/2 scaffold tests pass
- origin-chain-types: 45 tests pass (36 existing + 9 nuevos attestation)
- Slice 3 mock-WASM chain_spec builder operativo (NO regression)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 13:57:25 -05:00
b06560863c 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>
2026-05-19 22:08:49 -05:00