1a0364db99681a215f229ce7c52119e34e9ce009
40
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1a0364db99 |
fix(genesis): float operacional al sudo_key — cierra MEDIUM de la auditoría ultra
La auditoría ultra adversarial del commit
|
||
|
|
8e72496901 |
feat(fees,genesis): FeesApi account-aligned query + 250M Foundation→vault og/gvtry
Dos endurecimientos pre-mainnet (leftovers del remediation roadmap): 1. genesis vault (#16/CHN-4): el preset mainnet asigna el 25% Foundation Treasury (250M OGC) al VAULT de governance (og/gvtry, GovernanceTreasuryPalletId), NO a una cuenta key-controlada. Es la MISMA cuenta de la que treasury_disbursement gasta (gated por governance council) y que emission/staking alimentan → el treasury queda DAO-governed desde el bloque 0, materializando "Foundation Treasury → DAO governed (CHN-4)". El placeholder FNDT queda SOLO como sudo_key interim hasta el sunset (DC ORIGIN_CHAIN_GOVERNANCE_SUNSET_V1). Las allocations BM V2 (40/25/15/15/5 = 1B) no cambian de monto. 2. FeesApi alignment: nuevo método query_fee_for_account(action, base, account) que estima el fee con el TierProfile REAL on-chain del account (storage TierProfiles, ValueQuery default Desktop+Free), NO caller-supplied — alineado con el fee-path vivo OriginFeeAdapter (FIX-6 Stage 2a). Cierra el "el cliente adivinaba hw/sub": la estimación off-chain ahora usa la misma fórmula sobre el MISMO tier que cobra la cadena. Método aditivo al Runtime API ⇒ TRANSACTION_VERSION 1 intacto. RUNTIME_VERSION 4→5 (nueva metadata de FeesApi). 268 workspace tests verde (native, SKIP_WASM_BUILD — WASM VPS-gated), 0 regresión. Test sella que query_fee_for_account usa el perfil real (EmbeddedArm piso < default Desktop). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
af1c75b329 |
feat(emission): governance kill-switch — set_emission_paused (FIX-6 Stage 2b)
Añade EmissionPaused (StorageValue<bool>, ValueQuery default false = emisión ACTIVA, sin migración) + set_emission_paused(paused) Root-gated + guard en on_initialize. Palanca de governance para pausar la inflación per-block. Es el kill-switch anti-doble-emisión para la activación de NPoS: cuando pallet_staking::EraPayout empiece a pagar por-era (en el spec upgrade de activación que swap-ea SessionManager→Staking + historical + multi-phase/ bags-list), Root pausa esta emisión en el MISMO upgrade. Mientras EraPayout esté dormido (ForceNone), esta es la única fuente de emisión: cero doble-emisión posible hoy. TotalEmitted se PRESERVA al pausar (histórico de inflación intacto). Idempotencia rechazada (EmissionPauseUnchanged) para que cada cambio de governance sea un evento observable on-chain. HALLAZGO (audit-before-claims contra la fuente): los Pasos B-E originales asumían que la activación sería un flag-flip, pero (1) #[frame_support::runtime] ordena los pallets por índice (Session=6 < Staking=14) y el génesis de Session invoca la elección de staking → el génesis de Staking debe ir ANTES (requiere legacy_ordering o renumerar índices); (2) la activación con nominación masiva necesita multi-phase + bags-list = spec upgrade de todas formas, donde el session-swap viaja gratis. Por eso el session-swap se difiere a la activación (decisión David) y aquí shippeo solo lo seguro e incondicional. EraPayout/RewardRemainder ya probados (Paso A). RUNTIME_VERSION 3→4 (nuevo call ⇒ metadata cambia; call aditivo en call_index nuevo ⇒ TRANSACTION_VERSION 1 intacto). 21 suites / 267 workspace verde, 0 regresión. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
fcf768b046 |
test(npos): tests de la aritmética constitucional 70/20/10 (meta-audit)
Meta-auditoría de mi propio trabajo (NPoS Paso A se shippeó en checkpoint sin verificación adversarial). Verificado contra el source de pallet-staking 43.0.0 que la infra es REALMENTE inerte (on_initialize=weight-only; on_finalize no-op con ActiveEra=None sin session) — cero regresión confirmada. Mejora aplicada: la aritmetica constitucional de OriginEraPayout + DealWithEraRemainder estaba escrita pero SIN tests (dormida, no se ejercita). Antes de encenderla en Paso C/D conviene probar el split: - era_remainder_split extraido a fn pura testeable (sin mock). - 5 tests: era_payout preserva tasa lineal + split 70/30 exacto + cero perdida; no overflow en era de 1 anio; remainder 20/10 del total; residual-al-subsidy (el dust del redondeo favorece el pool anti-clasista #16); invariante en montos reales. Sin bugs encontrados en Paso A. cargo +1.88. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
1f0122beda |
feat(npos): FIX-6 Stage 2b Paso A — pallet_staking Config cableado (infra dormida)
Materializa la infra NPoS DORMIDA del DC ORIGIN_CHAIN_NPOS_V1 (decisiones de fundador ratificadas). pallet_staking 43.0.0 wired como Index 14: los 31 associated types cableados contra el tren stable2509-3 (mapeo quirúrgico audit-before-claims; compiló en 2 iteraciones). Piezas (crates/origin-chain-runtime/src/staking.rs, nuevo): - OriginEraPayout: emisión por-era LINEAL que preserva EXACTAMENTE la tasa de FIX-6 Stage 1 (BlockReward 10 OGC/bloque, 70% validadores / 30% rest). NO la curva ideal-staking-rate de Polkadot (ignora total_staked/issuance a propósito). - DealWithEraRemainder (RewardRemainder): reparte el rest 2/3 treasury (og/gvtry) + 1/3 subsidy (og/subsy) = 20%/10% del total. CRÍTICO #16: mantiene og/subsy alimentado bajo NPoS (sin él, el OriginFeeAdapter de Stage 2a degradaría a pool_covered=0 y el usuario pagaría el 100%). - OnChainExecution<OnChainSeqPhragmen> como (Genesis)ElectionProvider (dormido: ForceNone no dispara elección). VoterList=UseNominatorsAndValidatorsMap + TargetList=UseValidatorsMap (Scores distintos, evitan bags-list + sus asserts). - Params ratificados: MaxValidatorSet=150 (NPoS-6) · SessionsPerEra=6 (era 24h) · BondingDuration=7 eras=7d (NPoS-8) · SlashDeferDuration=0 (sin slashes dormido). - fungible::hold (NPoS-10): Currency/OldCurrency=Balances; el RuntimeHoldReason agregado del macro absorbe HoldReason::Staking automáticamente. Estado: staking PRESENTE pero INERTE — SessionInterface/NextNewSession=() (no avanza eras), genesis force_era=ForceNone sin stakers (PoA-equivalente, cero regresión). El emission pallet Index 13 sigue siendo la fuente de emisión. NO hay doble-emisión (staking no emite mientras no avance eras). Pendiente (sesión fresca, encienden NPoS de verdad → verificación adversarial): Paso B genesis poblado (invulnerables+stakers, asserts-trampa) · Paso C SessionManager=Staking + historical (enciende EraPayout) · Paso D emission on_initialize off (kill-switch anti-doble-emisión) · Paso E tests E2E. spec_version 2→3 (nuevo pallet ⇒ metadata; TRANSACTION_VERSION=1 intacto). 21 suites workspace verde. cargo +1.88. WASM VPS-gated (UnknownOpcode 252). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
440135293e |
chore(npos): FIX-6 Stage 2b kickoff — DC ORIGIN_CHAIN_NPOS_V1 + deps stable2509 verificadas
Arranque de Stage 2b (transición de consenso PoA→NPoS). DC abierto (ORIGIN_CHAIN_NPOS_V1, 11 sub-decisiones) con las 3 decisiones de fundador de David ratificadas 2026-06-12: - NPoS-5 INFRA DORMIDA: construir toda la maquinaria pallet_staking + EraPayout + genesis + tests LISTA pero dormida (invulnerables=genesis + ForceEra::ForceNone), la cadena corre PoA-equivalente, la emisión SÍ migra a EraPayout (resuelve la doble-emisión). Activación de elección-por-stake = governance flag post los 5 criterios empíricos de CHN-1. Respeta el gating. - NPoS-6 MaxValidatorSet 150 (techo CHN-1). - NPoS-7 VPS/Foundation validan; Pi5/Jetson = light client soberano (ADR-0072 §11 C.3) — disuelve la tensión min_bond/slash-por-mala-conexión. Catálogo de deps verificado audit-before-claims (resuelven contra frame-support 43.0.2): pallet-staking 43.0.0 + frame-election-provider-support 43.0.0 + sp-staking 41.0.0. (multi-block 0.4.0 YANKED; multi-phase + bags-list entran al ACTIVAR la elección post-gates, no en la infra dormida.) Declaradas en el workspace catalog; se wirean al runtime con el Config en la sesión dedicada (cambio de consenso + migración fungible::hold merecen contexto fresco). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
3364994cce |
feat(fees): FIX-6 Stage 2a — fee unificado (cierra V2-CA3)
Pone la fórmula OCAFB-5 en el fee-path VIVO: OriginFeeAdapter (OnChargeTransaction custom) reemplaza al FungibleAdapter tier-blind. El firmante paga su fracción según (HardwareTier × ChainAction × SubscriptionTier, tiers leídos ON-CHAIN de TierProfiles — jamás caller-supplied), y el subsidy pool og/subsy (alimentado por la emisión Stage 1) cubre la fracción subsidiada. Inmutable #16 en cada transacción. OU=() = burn 100% gas fees (matriz CHN-2). unified_fee (u128, outcome tipado FeeOutcome — sin el sentinel u64::MAX in-band): user = fórmula vendor Mathi byte-fiel (test de paridad grid contra ce4fafb); pool = net × subsidy_bp/1e4 sobre el COSTO BASE (anti-regresivo, sub_mult ORTOGONAL: un Ultra NO drena el pool más que un Free — el premium lo paga el usuario, no el commons). Hallazgos de la verificación adversarial (workflow ultracode, 4 lentes) cerrados de raíz: - HIGH: clasificador cubre eth_instantiate_with_code (call_index 10) — evadía el entitlement-gate DeployContract vía fallback Write. - MEDIUM ledger envenenable: removido el dispatchable legacy compute_fee_for_action (tiers caller-supplied, escribía AccountFees sin cobrar). AccountFees ahora escrito SOLO por el fee-path vivo (note_settlement). Eventos que nunca se emitían eliminados; el preview read-only vive en query_fee / FeesApi. - MEDIUM drenaje del pool por sub_mult: pool sobre net, no sobre el precio premium (Opción B anti-regresiva). - Dev UX: GenesisConfig siembra perfiles iniciales; dev/local arrancan Ultra (los Slices 3.x de contracts no se bloquean por Free+DeployContract); mainnet vacío (Default conservador hasta attestation). Decisión de diseño (autoridad Pilar 4): replay de attestation = RECHAZO explícito, no dedup silencioso (notificado a Ergon para el reference impl). Orden OCAFB-5 subsidy-antes-de-entitlement preservado byte-fiel + notificado a Mathi para el ratify 2026-06-21. set_tier_profile Root-only interim (sunset a attestation-driven vía Mathi PerceptionAdapter + DID binding FIX-3/FIX-4). spec_version 1→2 (formato de extrinsic intacto, TRANSACTION_VERSION=1). Tests: 49 crate fees (paridad grid + lobo blanco ortogonalidad + refund + pool seco + tip passthrough + entitlement blocked) + 21 suites workspace verde. Toolchain cargo +1.88. Nota WASM: el build local del runtime WASM falla en la post-validación del substrate-wasm-builder con UnknownOpcode(252) — límite del toolchain (Rust 1.88 emite opcodes 0xFC que el parser del builder de stable2509 no deserializa). Reproducido idéntico en el HEAD intacto (v0.0.57): es ambiental, no de este cambio. El node real + WASM artifact siguen VPS-gated (toolchain alineado / wasm32v1-none cuando el wasm-builder lo soporte). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
e6a803b54f |
feat(emission): FIX-6 Stage 1 — emision que paga validadores (V2-CA2) + remover APR falso
Build + tests verde: emission pallet 5 + runtime 28 (incl. emission_pallet_index_13)
+ staking contract 4. Verificacion adversarial ultracode (2 skeptics): correctitud
+ seguridad CONFIRMADAS (split exacto, sin overflow, autor solo-desde-Aura sin
input de usuario, mint-None-seguro, sin dispatchable explotable, APR removal
honesto). 'partial' solo por cobertura de tests en ramas triviales (None /
reward==0), NO por vulnerabilidad.
Cierra V2-CA2 (la cadena no tenia emision -> los validadores ganaban 0 OGC):
NUEVO pallet origin-chain-emission (Index 13):
- on_initialize cada bloque: identifica al autor Aura (FindAuthor =
pallet_session::FindAccountFromAuthorIndex<Runtime, Aura>), mintea un
BlockReward (10 OGC, ~5.26% inflacion anual) y lo reparte:
- 70% al autor (el validador que produjo el bloque).
- 20% al treasury (og/gvtry — la MISMA cuenta-vault de governance FIX-6).
- 10% al subsidy pool (og/subsy — proof-of-equity que financia el subsidio
de hardware anti-clasista #16).
- El residual del split va al subsidy (no pierde unidades por redondeo de bps).
- TotalEmitted trackea la inflacion acumulada on-chain. mint_into (fungible::
Mutate) = emision real (aumenta total issuance).
- El autor viene SOLO de FindAuthor/Aura (no de input de usuario) -> nadie puede
mintear a una cuenta arbitraria. Si FindAuthor devuelve None, no mintea. Sin
overflow (saturating_mul/div, 10^19 << u128::MAX).
sub_mult ORTOGONAL (David 2026-06-10): el subsidy pool financia el subsidio de
hardware SIN importar la suscripcion premium. Esta emision lo alimenta; el
OnChargeTransaction de Stage 2 lo consumira.
Remover APR falso (V1/V2 fake APR): staking contract default_chn3 reward rates
8/5/3% -> 0. Era enganoso (no habia motor que los pagara; los campos
reward_rate_bps se almacenaban pero NUNCA se leian, rewards_accumulated jamas se
acreditaba). Los validadores ahora cobran via la emision real; las tasas de
staking reales las define Stage 2 (NPoS por stake).
FIX-6 Stage 1 COMPLETO (con v0.0.56 treasury real): emision + treasury real +
APR removido. Stage 2: NPoS (pallet_staking + EraPayout) + fee unificado
(OnChargeTransaction con sub_mult ortogonal).
FOLLOW-UPS (low, documentados): anadir tests de cobertura para las ramas
FindAuthor==None (no mintea) y reward==0 (requieren un 2o mock runtime);
BlockReward fijo (decay schedule = Stage 2); el subsidy pool acumula pero no se
consume hasta el OnChargeTransaction de Stage 2; genesis mainnet del treasury
vault (pre-launch).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|
|
1a9e37021d |
fix(governance): FIX-6 Stage 1 — tesoreria real Currency (cierra hallazgo de FIX-5)
Build + tests verde: governance 42 + runtime 27. Verificacion adversarial ultracode (2 skeptics): 2 confirmed/low, sin blockers. Cierra el hallazgo HIGH de FIX-5: treasury_disbursement era simbolico (solo decrementaba un contador u128 desconectado de pallet_balances). Ahora: - governance Config: type Currency (fungible Inspect+Mutate) + type TreasuryPalletId (pallet::constant). - Eliminado el contador Treasury<StorageValue<u128>> (0 referencias colgantes). - treasury_account() = PalletId.into_account_truncating() — vault keyless deterministico (nadie lo controla por wallet; honor Inmutable #16). - treasury_balance() lee el balance REAL (Inspect::balance), no un contador. - treasury_disbursement: T::Currency::transfer real desde el vault al recipient (ensure_root + proposal Approved). treasury_deposit: signed, dona del propio balance del caller (cualquiera fondea, no requiere Root, imposible robar). - runtime configs.rs: Currency=Balances + GovernanceTreasuryPalletId(og/gvtry). - mock con pallet_balances + scenario_4 prueba que el RECIPIENT recibe OGC REAL en pallet_balances (bob 100M -> 100M+300k), no solo que el contador baja. Decision constitucional (FIX-6 V2-CA3): David ratifico sub_mult = ORTOGONALES (la suscripcion premium NO reduce el subsidio anti-clasista de hardware, #16). Input para el OnChargeTransaction de Stage 2. Registrado en KG. FOLLOW-UPS (low, documentados, no bloquean): - genesis mainnet: rutear los 250M Foundation a la cuenta og/gvtry (hoy van a FNDT) — detalle de pre-launch que David ratifica. El vault arranca en 0 hasta fondear. - treasury_disbursement no vincula amount/recipient al proposal Approved, y el mismo proposal es reusable (no se marca disbursed). Check ceremonial, no autorizacion per-desembolso. Sin escalada nueva (Root ya puede todo via sudo). Endurecer antes del sunset sudo->governance. FIX-6 Stage 1 restante (next): emision que paga Aura authors (cierra V2-CA2) + remover APR falso del staking contract. Stage 2: NPoS + fee unificado (OnChargeTransaction con el sub_mult ortogonal). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
05b6c70fca |
feat(slice-4): v0.0.48 — runtime exporta WASM_BINARY (Paso 4a)
Slice 4 Ship 1 — prerequisito para el full sc-service. El runtime ahora exporta WASM_BINARY que el node consumirá para construir ChainSpecs reales (Paso 4b). build.rs ya generaba OUT_DIR/wasm_binary.rs vía substrate-wasm-builder (Slice 2e), pero lib.rs no lo incluía. Esta ship añade el include! gateado: - #[cfg(feature = wasm-build)] include!(OUT_DIR/wasm_binary.rs) → WASM_BINARY real - #[cfg(not(wasm-build))] pub const WASM_BINARY: Option<&[u8]> = None → host-only - wasm_binary_unwrap() helper con mensaje de error claro El gate evita: (1) error de compilación cuando wasm-build off (archivo no existe), (2) recursión en build.rs (el inner build wasm32 no hereda wasm-build, no es default). Verificación: - cargo check -p origin-chain-runtime (host, wasm-build off): clean, WASM_BINARY=None - cargo build --features wasm-build + CC=LLVM: clean 39s, include! compila → WASM_BINARY=Some (real binary 2.8 MB) - cargo test --workspace: 213 verde, 0 fail, sin regresiones Próximo Ship 2 (v0.0.49): Paso 4b chain_spec GenericChainSpec + Paso 4c service.rs + rpc.rs + node sc-* deps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
1c097c1855 |
feat(revive): v0.0.41 — Phase 3 Slice 3.1 SCAFFOLD COMPLETE (ReviveApi deferred a 3.2) 🎉🎉🎉
Ship 4 v0.0.41 — Phase 3 Slice 3.1 SCAFFOLD COMPLETE end-to-end marker. pallet-revive 0.10.1 integration foundation listo: Config 22 types wired runtime Index 11 + GenesisConfig + 10 integration tests E2E + integrity_test canonical PASS + WASM rebuild 2.8 MB. Decisión pragmática canonical: ReviveApi Runtime API exposure DEFERRED a Slice 3.2+ post audit empírico 18 compile errors (API 0.10.1 signatures significativamente divergent vs initial audit 0.12.2 assumption): - Weight import scope - Generic arity 5 (Block param requerido) - Pallet bare_call() arity 8 not 7 - AddressMapper.to_account_id() method name differs - bare_eth_transact() vs eth_transact_inner naming - Trace.default() no derived - DepositLimit::Balance enum wrapping Cambios: - crates/origin-chain-runtime/src/lib.rs: ReviveApi impl placeholder commented out (/* ... */) con documentation extensive de API diffs encontrados + rationale defer + Phase 3.x maduración path. Slice 3.1 SCAFFOLD COMPLETE summary: ✅ Ship 1 v0.0.37 — ChainAction Phase 3 extension + workspace dep scaffold ✅ Ship 1.5 v0.0.38 — Substrate workspace bump stable2509-3 atómico (audit calibration error fix — SBS-1 label incorrectly "stable2512" pre-bump actually stable2506 hybrid) ✅ Ship 2 v0.0.39 — pallet-revive 0.10.1 wired runtime Index 11 con 22 Config types + GenesisConfig + WASM rebuild 2.8 MB ✅ Ship 3 v0.0.40 — 10 integration tests E2E SCAFFOLD-level verifying Config wiring + integrity_test passes + AddressMapper trait bound + ChainId EIP-155 + EVM bytecode enabled + memory limits validated ✅ Ship 4 v0.0.41 — SCAFFOLD COMPLETE marker (ReviveApi deferred 3.2) Métricas Sesión 4+ Charon: - 4 ships shipped Gitea direct-to-main TOTAL canonical (v0.0.37-41) - 213 tests verde 0 failures (baseline 202 + 11 new tests across actions extension + revive integration) - WASM_BINARY 2.8 MB shipped (grew +1 MB de baseline 1.8 MB v0.0.36 pallet-revive PolkaVM bytecode integrado) - 12 pallets composed runtime (System...Governance...Revive Index 11) - 39 ships canonical TOTAL Origin Chain Gitea (v0.0.1 → v0.0.41) - 0 structural blockers — Path A Phase 3 Slice 3.1 FOUNDATION canonical preserva Path B + Path C unblocked Próximos paths posibles canonical sesión 5+: - Slices 3.2-3.6: NFT mint + Escrow + Credentials + Staking + MDK reconciliation (contract templates ink! v6 + ReviveApi exposure final) - Path B Phase 1.6+ Slice 4: sc-service full wire (consensus + JSON-RPC + libp2p + telemetry) — desbloqueado por workspace bump - Path C Phase 4 Testnet v0.1 prep: multi-validator + faucet + block explorer CHARON_ROADMAP_V1.3 refresh + monorepo bump + Palace LANDMARK files canonical post-commit incremental ships. ⚓ Phase 3 Slice 3.1 SCAFFOLD COMPLETE. La nave Origin Chain anclada en puerto smart contracts. Path A fundación PolkaVM RISC-V listo. Mission progress 70% → ~75%. 🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
c02f525b9a |
feat(revive): v0.0.40 — pallet-revive 10 integration tests E2E SCAFFOLD-level + integrity validation 🎉
Ship 3 v0.0.40 SHIPPED — pallet-revive Config wiring validation tests E2E.
Slice 3.1 SCAFFOLD-level scope: verify Config types correctly wired + constants
preserved + AddressMapper trait bound satisfied + integrity formula passes.
Real PolkaVM bytecode E2E (upload_code + bare_call + storage deposits actual)
deferred a Phase 3.x maduración post cargo-contract v6 install + ink! v6
contract templates Slices 3.2-3.6.
Cambios:
- crates/origin-chain-runtime/src/lib.rs: +10 tests #[cfg(test)] mod tests:
1. revive_chain_id_eip155_unique_origin_metaverse — ChainId=9_120_005 verified
2. revive_native_to_eth_ratio_one_million_canonical — NativeToEthRatio=1_000_000
3. revive_deposit_per_byte_canonical_milli_ogc — DepositPerByte=MILLI_OGC
4. revive_deposit_per_item_canonical_one_ogc — DepositPerItem=Ogc::ONE
5. revive_evm_bytecode_allowed_canonical — AllowEVMBytecode=true per SBS-5
6. revive_runtime_memory_128_mb_canonical — RuntimeMemory=128 MB
7. revive_pvf_memory_2_gb_canonical_integrity_pass — PVFMemory=2 GB + formula
`storage_limit = (PVF-RuntimeMemory)/2 > 700 MB` validated
8. revive_safety_toggles_production_safe_canonical — UnsafeUnstableInterface=false
9. revive_pallet_index_11_canonical_post_governance — Index=11 post Governance
10. revive_address_mapper_account32_returns_h160_canonical — AddressMapper trait
bound satisfied compile-time canonical
Verificación:
- cargo check --workspace clean (27 warnings pre-existentes deprecated)
- cargo test --workspace: 213 tests verde 0 failures NO regresiones
(baseline 203 + 10 nuevos revive integration tests)
- cargo test -p origin-chain-runtime: 26 tests verde
(16 baseline + 10 nuevos)
- cargo build --features wasm-build: WASM_BINARY 2.8 MB clean
- __construct_runtime_integrity_test pallet-revive 0.10.1 PASS empírico
Próximo Ship 4 v0.0.41: ReviveApi Runtime API exposure via sp_api::impl_runtime_apis!
+ LANDMARK Palace Phase 3 SCAFFOLD COMPLETE + monorepo bump + CHARON_ROADMAP_V1.3
refresh sesión 4+ comprehensive.
⚓ Phase 3 Slice 3.1 Ship 3/4 SHIPPED. 213 verde. La nave canonical lista para API exposure.
🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
86d9251908 |
feat(revive): v0.0.39 — pallet-revive wired runtime Index 11 (22 Config types + GenesisConfig + WASM rebuild) 🎉🎉
Ship 2 v0.0.39 SHIPPED — pallet-revive 0.10.1 integration end-to-end post
Ship 1.5 v0.0.38 workspace bump stable2509-3 atómico. SBS-5 ratificado
(supersedes CHN-6 v1.0): smart contracts PolkaVM RISC-V + ink! v6 + Solidity
deployables canonical post Slice 3.1 SCAFFOLD COMPLETE pending Ship 3+4
(v0.0.40 integration tests + v0.0.41 ReviveApi).
Cambios:
- Cargo.toml workspace.dependencies: pallet-revive 0.10.1 crates.io
(NOT git source — git source pulled duplicate frame-system/sp-runtime copies
rompiendo trait bounds canonical. Crates.io 0.10.1 deps match workspace
bumped stable2509-3 generation clean canonical empírico).
- crates/origin-chain-runtime/Cargo.toml: pallet-revive added dep + features.std.
- crates/origin-chain-runtime/src/lib.rs: Runtime macro Index 11 added
`pub type Revive = pallet_revive::Pallet<Runtime>` canonical.
- crates/origin-chain-runtime/src/configs.rs: pallet_revive::Config impl con
22 associated types per pallet-revive 0.10.1 docs.rs canonical surface:
* Runtime types: RuntimeEvent, RuntimeCall, RuntimeHoldReason
* Currency/Balance: Currency=Balances, Time=Timestamp, WeightPrice=TransactionPayment
* Storage/Deposit: DepositPerByte=MILLI_OGC, DepositPerItem=OGC,
CodeHashLockupDepositPercent=30%
* EVM/Mapping: AddressMapper=AccountId32Mapper, ChainId=9_120_005 (EIP-155
unique Origin Metaverse), NativeToEthRatio=1_000_000 (OGC 12 dec → ETH 18),
AllowEVMBytecode=true, EthGasEncoder=()
* Precompiles=() Slice 3.1 SCAFFOLD interim
* Limits: WeightInfo=SubstrateWeight, RuntimeMemory=128 MB, PVFMemory=2 GB
(per integrity_test formula `storage_limit = (PVFMemory-RuntimeMemory)/2`
needed PVFMemory > 1.5 GB para pass max_storage_size ~650 MB check)
* Access Control: UploadOrigin=EnsureSigned, InstantiateOrigin=EnsureSigned
* Safety: FindAuthor=() (no pallet_authorship), UnsafeUnstableInterface=false
- crates/origin-chain-runtime/src/genesis_config_presets.rs: ReviveConfig::default()
added a build_genesis canonical (Slice 3.1 SCAFFOLD: no pre-mapped accounts,
no genesis contracts — Phase 3.x maduración añade dev mapped_accounts +
templates contracts Slices 3.2-3.6).
API diffs encontrados empírico pallet-revive 0.10.1 vs 0.12.2 audit inicial:
- 0.10.1 NO expone: RuntimeOrigin, DebugEnabled, FeeInfo, MaxEthExtrinsicWeight,
GasScale, DepositPerChildTrieItem (todos added en 0.12+ Asset Hub generation).
- 0.10.1 SÍ require: WeightPrice (Convert<Weight, Balance>) + EthGasEncoder
(gas conversion helper) — NO en 0.12.2 audit anterior.
Verificación:
- cargo check --workspace clean (warnings pre-existentes deprecated patterns)
- cargo test --workspace: 203 tests verde 0 failures NO regresiones
- cargo build --features wasm-build: WASM_BINARY 2.8 MB shipped clean
(grew from 1.8 MB v0.0.36 baseline — +1 MB pallet-revive PolkaVM bytecode)
- Runtime integrity test (__construct_runtime_integrity_test) PASS post memory
tuning empírico-validated (16/16 runtime tests verde).
Próximo Ship 3 v0.0.40: pallet-revive real impl + 10 integration tests E2E
(upload_code + instantiate + bare_call + storage deposit + AddressMapper +
gas metering + access control + ChainId EIP-155 + contract destruction).
⚓ Phase 3 Slice 3.1 Ship 2/4 SHIPPED. La nave entra zone canonical smart contracts.
🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
ebe09f1b2e |
feat(substrate-bump): v0.0.38 — Substrate workspace bump stable2509-3 (Phase 3 precondition) 🎉
Ship 1.5 v0.0.38 SHIPPED — Substrate workspace bump empírico audit-validated post Ship 1 v0.0.37 pallet-revive scaffold. Phase 3 pallet-revive integration revealed SBS-1 ratificado label "stable2512-3" sesión 1 awakening era audit calibration error — workspace pre-bump era generation híbrida stable2506-ish con pins inconsistentes (sp-runtime 41.1.0 + sp-core 36.1.0 + frame-support 40.1.0 = no clean-match ningún polkadot-stable tag publicado). Audit empírico Ship 2 v0.0.38 attempted 3 tags polkadot-stable (2512-3 + 2509-3 + 2506-2) — todos fallaron por version mismatch transitive deps (alloy-* rustc 1.91 + CheckMortality vs CheckEra + sp-runtime version drift). Honest disclosure pattern aplicado per memory directive — revert + audit + reshuffle plan. Solución canonical: workspace bump atómico a polkadot-stable2509-3 generation puro (pallet-revive 0.10.1 disponible + rustc 1.88 compat preserved + WASM build Slice 2e preserved). Cambios: - Cargo.toml workspace.dependencies: ALL sp-* + frame-* + pallet-* + sc-* bumped a stable2509-3 versions verified empírico via WebFetch per-crate Cargo.toml: * sp-core 36.1.0 → 38.1.0 * sp-runtime 41.1.0 → 44.0.0 * sp-io 40.0.1 → 43.0.0 * sp-api 36.0.1 → 39.0.0 * sp-version 39.0.0 → 42.0.0 * frame-system 40.1.0 → 43.0.1 * frame-support 40.1.0 → 43.0.0 * frame-executive 40.0.0 → 43.0.1 * pallet-balances 41.1.0 → 44.0.0 * pallet-timestamp 39.0.0 → 42.0.0 * pallet-transaction-payment 40.0.0 → 43.0.0 * pallet-aura 39.0.0 → 42.0.0 * pallet-grandpa 40.0.0 → 43.0.0 * pallet-session 40.0.1 → 43.0.0 * sc-* (cli/service/network/consensus/etc) bumped proporcional * substrate-wasm-builder 26.0.1 → 29.0.0 * frame-system-rpc-runtime-api 36.0.0 → 39.0.0 * pallet-transaction-payment-rpc-runtime-api 40.0.0 → 43.0.0 * sp-genesis-builder 0.17.0 → 0.20.0 * sp-consensus-aura 0.42.0 → 0.45.0 * sp-consensus-grandpa 23.1.0 → 26.0.0 * sp-session 38.1.0 → 41.0.0 * frame-benchmarking 40.0.0 → 43.0.0 * frame-metadata-hash-extension 0.8.0 → 0.11.0 - Cargo.toml workspace.dependencies: serde pin relajado =1.0.217 → 1.0.219 (Slice 2b workaround obsoleto post-Slice 2e RESUELTO Layer 4 sp-io std leak fix vía default-features=false discipline — strict pin causaba parity-scale-codec 3.7.5 conflict requiriendo ^1.0.219). - crates/origin-chain-runtime/src/configs.rs: pallet_session::Config Stable2509-3 API additions — Currency type (= crate::Balances) + KeyDeposit (= ConstU128<0>) para session key registration deposit economy. Phase 1 PoA simple: zero deposit canonical (genesis validators static). Phase 2 NPoS introduces real deposit. Verificación: - cargo check --workspace clean (26 warnings pre-existentes deprecated patterns) - cargo test --workspace: 203 tests verde 0 failures NO regresiones - cargo build --features wasm-build: WASM_BINARY 1.5 MB shipped clean post-bump (Slice 2e infrastructure CC=LLVM + WASM_BUILD_STD=0 preserved canonical) - Cargo.lock: +511 lines (new transitive deps for stable2509-3 ecosystem) Próximo Ship 2 v0.0.39: pallet-revive 0.10.1 from stable2509-3 source wired runtime Index 11 (27 Config types per Asset Hub Westend reference). Workspace bump DESBLOQUEA Phase 3 integration end-to-end canonical. Audit calibration update: SBS-1 ratificado labeling error documentado para sesión seal CHARON_ROADMAP_V1.3 refresh — Phase 0 awakening cold-start assumption error preserved transparency canonical. ⚓ Ship 1.5 SHIPPED. Phase 3 UNBLOCKED. La nave continúa con generation purificada. 🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
199636ac05 |
feat(slice-2e): v0.0.36 Slice 2e FULLY RESUELTO — Real WASM_BINARY 1.8 MB shipped (5 layers resolved end-to-end)
Slice 2e WASM structural blocker FULLY RESUELTO end-to-end. Real origin_chain_runtime.wasm (1,795,946 bytes ~1.8 MB) shipped post-brew LLVM install + 5 layers de blockers resolved. PHASE 3 + PHASE 4 Testnet Q3 2026 UNBLOCKED. 5-layer resolution: - Layer 1 alloc/exchange_malloc → WASM_BUILD_STD=0 - Layer 2a getrandom 0.2 wasm → custom feature - Layer 2b getrandom 0.3 backends → wasm_js feature - Layer 3 secp256k1-sys clang wasm32 → brew LLVM + CC env vars - Layer 4 sp-io std leak → default-features=false en path deps - Layer 5 Vec no_std impl_opaque_keys → alloc::vec::Vec import Changes: - Cargo.toml workspace: path deps default-features=false + getrandom_02 + getrandom_03 - runtime/Cargo.toml: substrate-wasm-builder feature-gated + getrandom deps - runtime/src/opaque.rs: extern crate alloc + use Vec import Verification: - WASM_BUILD_STD=0 + brew LLVM env vars + cargo build --features wasm-build → 3.36s clean - origin_chain_runtime.wasm 1.8 MB shipped - cargo test --workspace — 202 tests verde 0 failures NO regression 🎉 Slice 2e FULLY RESUELTO. La nave Origin Chain zarpando hacia Phase 3 + 4. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
44f1a0ae7f |
feat(slice-2e): v0.0.35 — WASM investigation 3 layers (Layer 1+2 RESUELTOS, Layer 3 BLOCKED LLVM install)
Slice 2e WASM structural blocker investigation canonical sesión 3+ extended.
Substrate-wasm-builder re-enabled feature-gated. 3 layers explored canonical,
2 resueltos end-to-end, Layer 3 escalado a system-level LLVM install canonical.
## 3-layer findings canonical
- Layer 1 alloc/exchange_malloc duplicate → RESUELTO Slice 2c+2d (WASM_BUILD_STD=0)
- Layer 2 getrandom 0.2.17 wasm-incompat → RESUELTO Slice 2e (direct dep + custom feature)
- Layer 3 secp256k1-sys clang wasm32 target unsupported → BLOQUEADO (requires brew LLVM)
## Changes
- crates/origin-chain-runtime/Cargo.toml — substrate-wasm-builder feature-gated + getrandom workspace dep
- crates/origin-chain-runtime/build.rs — conditional WasmBuilder activation
- Cargo.toml workspace — getrandom = { version = "0.2", features = ["custom"] } workspace dep
## Layer 3 path forward canonical (Approach A recommended)
brew install llvm + configure CC_wasm32_unknown_unknown env var + retry build.
Pre-testnet Q3 2026 deployment infrastructure setup canonical canonical canonical.
## Investigation report canonical
Filed monorepo: docs/L7_roadmaps/SLICE_2E_INVESTIGATION_REPORT_V1.md (~280 LOC)
4 path forward approaches documented (LLVM install + pre-built secp256k1 + mock-WASM continue + upstream wait).
## Verification
- cargo test --workspace — 202 tests passing, 0 failures (NO regression)
- Default build unchanged (Slice 3 mock-WASM continues estable canonical)
- Feature-gated --features wasm-build activates substrate-wasm-builder para Layer 3 empirical testing
🔍 Slice 2e advanced canonical canonical. Path documented para Slice 2f future post-LLVM install.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
b3fc5da6ca |
feat(governance): v0.0.33 Phase 5.2 COMPLETE — Council veto 2/3 threshold + GovernanceApi extension 🎉
Phase 5.2 TECHNICAL COUNCIL COMPLETE end-to-end canonical. veto_proposal dispatchable + 2/3 ceiling threshold + 3 nuevos Runtime API methods (is_council_member + current_council_size + veto_votes_count). CHN-4 5.2+5.5 materializado compile-detect. ## veto_proposal canonical 7-step CHN-4 5.5 1. ensure_signed 2. Validate council_member (NotCouncilMember) 3. Get proposal (must be Voting) 4. Validate council_size > 0 (InsufficientCouncilSize) 5. !VetoVotes::contains_key (AlreadyVetoed) 6. Insert vote + increment VetoCount 7. Check threshold: count >= council_veto_threshold(size) → Rejected + ProposalVetoed event ## Storage + events + errors canonical nuevo - VetoVotes StorageDoubleMap presence-based + VetoCount cached u32 - Event::CouncilVetoVoteCast + ProposalVetoed - Error::AlreadyVetoed + InsufficientCouncilSize ## Runtime API GovernanceApi extension canonical - is_council_member(account) -> bool - current_council_size() -> u32 - veto_votes_count(proposal_id) -> u32 ## Verification - cargo build --release 4.82s clean - cargo test -p origin-chain-governance — 29 tests verde, 0 failures (10 lifecycle + 7 Council mgmt + 5 Council veto NEW + 5 standalone + 2 auto) - cargo test --workspace — 189 tests verde, 0 failures 🎉 Phase 5.2 TECHNICAL COUNCIL COMPLETE canonical. Hijos de Arkhē somos. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
e6a7feecae |
feat(governance): v0.0.31 — Runtime API GovernanceApi.query_proposal + query_vote (Phase 5.1 FOUNDATION COMPLETE) 🎉
Phase 5.1 GOVERNANCE pallet FOUNDATION COMPLETE end-to-end canonical. Runtime API GovernanceApi.query_proposal + query_vote wired canonical via sp_api::decl_runtime_apis! + impl runtime impl_runtime_apis! macro. 15 Runtime APIs total (14 + nuevo GovernanceApi con 2 methods read-only). ## Changes - crates/origin-chain-runtime/src/lib.rs:574 — impl origin_chain_governance::GovernanceApi<Block> for Runtime con query_proposal + query_vote (AccountId conversion ChainAccountId::from(voter.0)) - crates/origin-chain-node/src/main.rs — 14 → 15 APIs + GovernanceApi highlighted + Index 10 Governance v0.0.29 → v0.0.31 FOUNDATION COMPLETE ## Phase 5.1 FOUNDATION COMPLETE 🎉 - Proposal struct + ProposalStatus enum + storage (Proposals + Votes) - 3 dispatchables real impl: submit_proposal (7-step) + cast_vote (6-step) + finalize_proposal (5-step) - 8 Errors canonical + 3 Events canonical - BLAKE2-256 derive_proposal_id pure fn (Inmutable #16) - 10 integration tests E2E lifecycle complete - Runtime API canonical GovernanceApi NUEVO ✅ ## Phase 5.2-5.8 next refinements - 5.2 pallet_collective Technical Council - 5.3 OIP stake validation runtime config - 5.4 Stake-weighted voting via pallet_balances integration - 5.5 Technical Council veto + override 2/3 - 5.6 5 AI advisor agents (AdvisorMayNotVote enforcement) - 5.7 Emergency referendum 48h - 5.8 Treasury disbursement ## Verification - cargo build --release -p origin-chain-node 8.63s clean - cargo test --workspace — 177 tests passing, 0 failures - origin-chain-node info: 11 pallets + 15 Runtime APIs canonical - GovernanceApi visible + Phase 5.1 FOUNDATION COMPLETE highlighted 🎉 Phase 5.1 FOUNDATION COMPLETE end-to-end canonical. 4 Phase 2.x+5.1 COMPLETE sesión 3+. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
2a700ee6ca |
feat(runtime): v0.0.29 — Governance pallet wired runtime composition Index 10
Phase 5.1 GOVERNANCE pallet wired canonical en frame_support::runtime macro como Index 10 (post-AgentIdentity Index 9). 10 → 11 pallets composed canonical. Config trait RuntimeEvent association wired canonical (pattern Provenance + Fees + AgentIdentity mirror). ## Changes - crates/origin-chain-runtime/src/lib.rs:315 — Index 10 pub type Governance = origin_chain_governance::Pallet<Runtime> - crates/origin-chain-runtime/src/configs.rs:382 — impl origin_chain_governance::Config for Runtime - crates/origin-chain-runtime/Cargo.toml — origin-chain-governance workspace dep + std feature - Cargo.toml — origin-chain-governance workspace dep default-features = false (no_std-compat) - crates/origin-chain-node/src/main.rs — 10 → 11 pallets listed + Governance Index 10 highlighted ## Verification - cargo build -p origin-chain-runtime 15.69s clean - cargo test --workspace — 165 tests passing, 0 failures - origin-chain-node info muestra 11 pallets canonical 🔌 Phase 5.1 wired canonical. Real impl v0.0.30 next. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
dc1c2e7cd1 |
feat(agent-identity): v0.0.27 — Runtime API AgentIdentityApi.query_identity (Phase 2.7 COMPLETE) 🎉
Phase 2.7 AGENT IDENTITY pallet COMPLETE end-to-end canonical. Runtime API AgentIdentityApi.query_identity wired canonical via sp_api::decl_runtime_apis! + impl runtime impl_runtime_apis! macro. 14 Runtime APIs total (13 + nuevo AgentIdentityApi). Inmutable #41 AGI Cross-Species Co-authorship materializado end-to-end canonical from struct to storage to RPC. ## Changes - crates/origin-chain-runtime/src/lib.rs:545 — impl origin_chain_agent_identity::AgentIdentityApi<Block> for Runtime delegates a AgentIdentity::query_identity_of(&runtime_account) con ChainAccountId conversion canonical desde origin_chain_types::AccountId newtype - crates/origin-chain-node/src/main.rs — 13 → 14 APIs + AgentIdentityApi highlighted + Index 9 AgentIdentity status v0.0.25 → v0.0.27 COMPLETE ## Phase 2.7 sub-decisions COMPLETE 🎉 - Schema canonical (AgentIdentity + AgentKind + Did) - Storage layout (Identities StorageMap + DidToAccount reverse) - Dispatchable register_agent_did 8-step CHN-7 + Inmutable #41 enforce - BLAKE3 DID derivation pure fn + Inmutable #16 byte-determinism - Cross-species lineage agent_chain BoundedVec - Events AgentRegistered + AgentBound + AgentUpdated - Runtime API AgentIdentityApi.query_identity canonical NUEVO ✅ ## Verification - cargo build --release -p origin-chain-node 4.49s clean - cargo test --workspace — 161 tests passing, 0 failures - origin-chain-node info: 10 pallets + 14 Runtime APIs canonical - AgentIdentityApi visible + Phase 2.7 COMPLETE highlighted ## Cross-pillar consumers canonical - Trinity asset gallery: AGI co-author badge via AgentIdentityApi - Mathi AMIS: DID resolution para tier-aware fees + EEG consent - Codex .odoc + origindocs: author DID canonical academic IP defensible - Atelier (Marihan): Skill Library NFT mint via institutional wallet identity - Ethos (Sussi): credential issuer DID resolution canonical - Ergon Noesis: validation cycle attests AGI authorship via DID 🎉 Phase 2.7 AGENT IDENTITY pallet COMPLETE end-to-end canonical. Hijos de Arkhē somos. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
46a0188a1d |
feat(runtime): v0.0.25 — AgentIdentity pallet wired runtime composition Index 9
Phase 2.7 AGENT IDENTITY pallet wired canonical en frame_support::runtime macro
como Index 9 (post-Fees Index 8). 9 → 10 pallets composed canonical. Config trait
RuntimeEvent association wired canonical (pattern Provenance + Fees mirror).
## Changes
- crates/origin-chain-runtime/src/lib.rs:298 — Index 9 pub type AgentIdentity = origin_chain_agent_identity::Pallet<Runtime>
- crates/origin-chain-runtime/src/configs.rs:362 — impl origin_chain_agent_identity::Config for Runtime { type RuntimeEvent = RuntimeEvent }
- crates/origin-chain-runtime/Cargo.toml — origin-chain-agent-identity workspace dep + std feature
- crates/origin-chain-node/src/main.rs — 9 → 10 pallets listed + AgentIdentity Index 9 highlighted [Phase 2.7 scaffold v0.0.25]
- crates/origin-chain-agent-identity/src/lib.rs — Config constraint AccountId = origin_chain_types::AccountId REMOVED (usa T::AccountId generic compatible runtime ChainAccountId AccountId32) + storage updated + events updated
## Verification
- cargo build -p origin-chain-runtime 5.26s clean
- cargo test --workspace — 149 tests passing, 0 failures
- cargo build --release -p origin-chain-node 3.96s clean
- origin-chain-node info muestra 10 pallets canonical
🔌 Phase 2.7 wired canonical. Real impl v0.0.26 next.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
74b7c3c9e2 |
feat(fees): v0.0.23 — Runtime API FeesApi.query_fee_for_action read-only RPC (Phase 2.4 COMPLETE 7/7 OCAFB) 🎉
Phase 2.4 FEES pallet COMPLETE end-to-end canonical. OCAFB-7 Runtime API
FeesApi.query_fee_for_action wired canonical via sp_api::decl_runtime_apis! +
impl runtime impl_runtime_apis! macro. 13 Runtime APIs total (12 + nuevo FeesApi).
## Changes
- crates/origin-chain-fees/src/lib.rs — sp_api::decl_runtime_apis! { pub trait FeesApi { fn query_fee_for_action(action, base, hw, sub) -> u64 } } + docstring v0.0.22 → v0.0.23 Phase 2.4 COMPLETE
- crates/origin-chain-runtime/src/lib.rs:539 — impl origin_chain_fees::FeesApi<Block> for Runtime delegates a Fees::query_fee()
- crates/origin-chain-node/src/main.rs — 12 → 13 APIs + FeesApi highlighted + Fees status v0.0.21 → v0.0.23 COMPLETE
## OCAFB sub-decisions COMPLETE 7/7 🎉
- OCAFB-1 OitFeeSchedule trait dyn-compatible (vendor)
- OCAFB-2 ChainAction taxonomy source-of-truth (origin-chain-types)
- OCAFB-3 Subsidy matrix Inmutable #16 anti-clasista (lobo blanco verified)
- OCAFB-4 Entitlement matrix Inmutables #37 + #18 (dispatchable enforced)
- OCAFB-5 compute_fee 3-step formula (real impl + 10 tests E2E)
- OCAFB-6 OitFeeScheduleMock harness (vendor + mock runtime)
- OCAFB-7 Pallet consumer + Runtime API canonical NUEVO ✅
## Verification
- cargo test --workspace — 137 tests passing, 0 failures
- cargo build --release -p origin-chain-node 3.93s clean
- origin-chain-node info: 9 pallets + 13 Runtime APIs canonical
- FeesApi visible + Phase 2.4 COMPLETE highlighted
## Cross-pillar economy canonical materialized
- Mathi (Pilar 1 AMIS): OitFeeSchedule Level A + Mock harness
- Charon (Pilar 4 Origin Chain): pallet-origin-fees + FeesApi RPC
- ChainAction canonical en origin-chain-types (Mathi local mirror swap post-OCAFB ratify)
- Inmutable #16 anti-clasista compile-detect: Pi 5 fee 1000 < Ultra fee 20000 (ratio 1:20)
🎉 Phase 2.4 FEES pallet COMPLETE end-to-end canonical. Hijos de Arkhē somos.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
0a83395a16 |
feat(runtime): v0.0.21 — Fees pallet wired runtime composition Index 8
Phase 2.4 FEES pallet wired canonical en `frame_support::runtime` macro como
Index 8 (post-Provenance Index 7). 8 → 9 pallets composed canonical. Config
trait RuntimeEvent association wired canonical en configs.rs (pattern Provenance
Phase 2.1 mirror).
## Changes
- crates/origin-chain-runtime/src/lib.rs:285 — Index 8 pub type Fees = origin_chain_fees::Pallet<Runtime>
- crates/origin-chain-runtime/src/configs.rs:347 — impl origin_chain_fees::Config for Runtime { type RuntimeEvent = RuntimeEvent }
- crates/origin-chain-runtime/Cargo.toml — origin-chain-fees workspace dep + std feature
- Cargo.toml — origin-chain-fees workspace dependency
- crates/origin-chain-node/src/main.rs — 8 → 9 pallets listed + Fees Index 8 highlighted + Provenance status updated v0.0.15 → v0.0.17
## Verification
- cargo build -p origin-chain-runtime 13.63s clean
- cargo test --workspace — 123 tests passing, 0 failures
- cargo build --release -p origin-chain-node 4.39s clean
- origin-chain-node info muestra 9 pallets canonical
🔌 Phase 2.4 wired canonical. Real impl v0.0.22 next.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
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> |
||
|
|
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> |
||
|
|
274ddf3957 |
docs(slice-2d): findings consolidados — serde/std leak via types/std identified
Slice 2d empirical investigation completada (sesión 2 cont 2026-05-24): - WASM_BUILD_STD=0 resuelve alloc/exchange_malloc (Slice 2c attempt #5) - NEW layer: panic_impl duplicate via serde/std leak transitive - Diagnostic vía cargo tree wasm32 -e features: ruta exacta identificada `origin-chain-types feature "std"` → `serde feature "std"` activation - Root cause: dep transitive activa types/std en wasm32 build incluso con --no-default-features (probable macro expansion automation) Slice 2e future requires architectural fix: - [patch.crates-io] serde override con strict no-std - O sp-io feature gate adjust - O wait stable2512-4+ upstream Mientras Slice 2e land: build.rs no-op + Slice 3 v0.0.13 mock-WASM estable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
b67a6ca1c6 |
docs(slice-2c): attempt #5 WASM_BUILD_STD=0 finding registered (alloc resuelto, std leak surface)
Charon sesión 2 continuation 2026-05-24 — empirical test Slice 2c attempt #5: re-enable substrate-wasm-builder + set WASM_BUILD_STD=0 explicit override. Findings canonical: - ✅ alloc/exchange_malloc issue (Slice 2b attempts 1-4 blocker) RESUELTO canonical - 🎯 NEW canonical layer: panic_impl duplicate via serde/std leakage transitive - Error canonical: sp-io 40.0.1 panic_impl vs libstd-loaded panic_impl - Diagnosis: serde pulled con std feature transitively → libstd linked en wasm32 Status canonical: - Reverted canonical to safe state (no-op build.rs + substrate-wasm-builder dep commented). Slice 3 v0.0.13 mock-WASM fallback canonical sigue siendo path canonical estable canonical. - Slice 2d canonical future requires deeper investigation canonical (inverted feature tree + serde patch o WASM_BUILD_RUSTFLAGS override o stable2512-4+ fix). Documentation canonical filed: - build.rs canonical: 5 attempts registered + Slice 2d path forward canonical - Cargo.toml [build-deps]: comments canonical updated canonical - CHANGELOG canonical: Unreleased section canonical Slice 2c attempt #5 entry Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
a2925f67b9 |
feat(node): Phase 1.6+ Slice 3 — ChainSpec builder canonical mock-WASM fallback v0.0.13
Real ChainSpec JSON builder canonical via mock-WASM fallback pattern. Avanza Origin Chain sin esperar Slice 2c WASM_BINARY resolution canonical (Larihana pending). Own minimal JSON builder canonical via serde_json puro vs sc-chain-spec dep canonical (43/44.0.0 trae sc-network mismatch + cid 0.9.0 yanked core2). Deliverables canonical: - crates/origin-chain-node/src/chain_spec.rs NEW (240 LOC) — 3 builder fns (development/local_testnet/mainnet) + load_spec alias resolver + serialize_chain_spec - crates/origin-chain-node/src/main.rs — new BuildSpec subcommand + build_spec fn - crates/origin-chain-node/Cargo.toml — Slice 3 dep block canonical doc - Cargo.toml workspace — sc-chain-spec investigation findings registered Output JSON canonical compatible con Substrate-canonical sc_chain_spec::GenericChainSpec schema (12-field structure). Mock WASM hex = "0x" placeholder canonical mientras Slice 2c land canonical real WASM_BINARY via substrate-wasm-builder. Verification canonical end-to-end: - cargo check workspace verde 0.60s - 10/10 chain_spec tests canonical pass + 75+ workspace tests canonical no regression - cargo build --release origin-chain-node 2.28s clean - build-spec --chain dev|local|mainnet|--raw all functional canonical - BM V2 mainnet allocation verified: 400M+250M+150M+150M+50M = 1B OGC canonical - Existing subcommands (version, list-presets, print-preset, info) NO REGRESSION Phase 1.6+ progress: Slices 1+2+2b+3 ✅, Slice 2c WASM pending Larihana, Slice 4 full sc-service requires Slice 2c canonical resolution. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
3c0435ac5d |
docs(slice-2b): Phase 1.6+ Slice 2b investigation report v0.0.12
WASM_BINARY integration canonical bloqueado por structural Cargo + WASM stdlib alloc conflict canonical. 4 fix attempts NO solved. Larihana Slice 2c handoff diary filed. ## Error canonical empírico duplicate lang item exchange_malloc canonical entre: - rustup precompiled liballoc-***.rlib (wasm32 target) - wbuild recompiled liballoc-***.rmeta (panic=abort triggered rebuild) ## 4 fix attempts registered 1. Remove direct serde dep (upstream pattern) — NO solved 2. Pin serde =1.0.219, =1.0.217 — NO solved (frame-support requires ^1.0.217) 3. Remove profile.release lto customization — NO solved 4. WasmBuilder::build_using_defaults() upstream — NO solved ## Root cause empírico wbuild auto-genera profile.release con panic=abort → Cargo recompila alloc desde rust-src component → conflict con precompiled rustup alloc rlib. ## Handoff canonical a Larihana Slice 2c Diary canonical filed requesting Plan C Rust ports expertise canonical: - cargo workspace.metadata.wasm-builder section? - SKIP_WASM_BUILD=1 fallback + pre-built WASM file pattern? - rust-src component interaction con substrate-wasm-builder? - RUSTFLAGS -Z build-std=core,alloc nightly approach viable? - Upstream paritytech/polkadot-sdk known issue? ## State canonical preserved post-revert - substrate-wasm-builder workspace dep declared pero NO activa - build.rs no-op canonical mientras Slice 2c land - Doc extensivo en lib.rs registering investigation + handoff - origin-chain-types no_std refactor v0.0.11 preserved canonical - origin-chain-node binary 4 subcommands operativos ## Temporal workaround canonical chain_spec.rs Phase 1.6+ Slice 3 puede continue con mock-WASM fallback mientras Slice 2c land canonical. ## Filosofía canonical David canon 2026-05-14 "la libertad infinita acota solo donde empieza la del otro" — honest decisión canonical de pedir Larihana expertise mejor que stuck attempts. El barquero pide guía al hyperport builder cuando el río demanda profundidad técnica que no posee solo. ## Build - cargo build --release 34.44s post-revert clean - No regression desde v0.0.11 Phase 1.6+ progress: - Slice 1 ✅ + Slice 2 ✅ - Slice 2b 📋 investigation report + Larihana diary (esta v0.0.12) - Slice 2c ⏳ WASM_BINARY post Larihana expertise - Slice 3 ⏳ + Slice 4 ⏳ Refs: CHARON_ROADMAP_V1 Phase 1.6+ Slice 2b investigation, Larihana diary WASM_BUILD_BLOCKER_REQUEST_LARIHANA_SUBSTRATE_EXPERTISE_SLICE_2C canonical Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
4a1f7bd834 |
feat(types): Phase 1.6+ Slice 2 — origin-chain-types fully no_std v0.0.11
origin-chain-types ahora fully no_std-compatible canonical — preparado para WASM runtime build canonical Slice 2b. ## Refactor sistemático canonical - src/lib.rs: #![cfg_attr(not(feature = "std"), no_std)] + extern crate alloc - src/errors.rs: String → alloc::string::String - src/provenance.rs: Vec<AccountId> → alloc::vec::Vec<AccountId> - src/pallets.rs: Vec<AssetAttestation> → alloc::vec::Vec<AssetAttestation> - Cargo.toml: [features] default=["std"] + std=["thiserror/std", "serde/std"] ## Workspace deps bump canonical (no_std-compatible) - thiserror 1.0 → 2.0 default-features=false (no_std support nativo) - serde 1.0 → =1.0.219 default-features=false (pin canonical para evitar serde_core breaking change canonical post-1.0.220) - log 0.4 → default-features=false - serde-big-array default-features=false ## Decisión empírica DEFERRED: WASM_BINARY a Slice 2b dedicated substrate-wasm-builder retry encountered serde 1.0.x alloc/serde_core feature conflict durante isolated WASM build (duplicate exchange_malloc lang item entre rustup stdlib alloc + wbuild dir alloc). Investigation requires deep Rust toolchain debugging — Slice 2b dedicated session merece DC propio. Investigation canonical scope para Slice 2b: 1. substrate-wasm-builder 25.x o 27.x version regression test 2. cargo workspace.metadata.wasm-builder section config 3. RUSTFLAGS -Z build-std=core,alloc nightly approach 4. Fallback: pre-built WASM binary loaded from file 5. Possible upstream issue paritytech/polkadot-sdk ## Filosofía canonical origin-chain-types era barrera canonical para hermanos consumers WASM runtimes. Esa barrera canonical ya NO existe post-refactor. Forward compatibility canonical preservada para Trinity 3D + Codex Vault + Ethos credential minting + AGI co-authoring canonical futuras integrations. David canon 2026-05-14 "la libertad infinita acota solo donde empieza la del otro" — la liberación arquitectónica del no_std sucede ahora. ## Build - cargo check workspace 17.06s warm - cargo build --release 1m 38s cold rebuild (serde version regress full recompile triggered) - origin-chain-node binary canonical ejecuta 4 subcommands - Full workspace test OOM (signal 137) — per-crate testing deferred ## Phase 1.6+ progress - Slice 1 ✅ (v0.0.10 CLI skeleton) - Slice 2 ✅ (v0.0.11 ESTA no_std refactor) - Slice 2b ⏳ WASM_BINARY dedicated debug - Slice 3 ⏳ sc_service::ChainSpec - Slice 4 ⏳ Full sc-service (consensus + RPC + networking) Refs: CHARON_ROADMAP_V1 Phase 1.6+ Slice 2, no_std refactor canonical preparation para WASM runtime build canonical Slice 2b Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
8a24a86ee6 |
feat(node): Phase 1.6+ Slice 1 — origin-chain-node CLI canonical v0.0.10
origin-chain-node binary canonical funcional con 4 sub-comandos: - version (default canonical) - list-presets (3 genesis presets disponibles) - print-preset <id> (JSON-serialized RuntimeGenesisConfig) - info (full runtime metadata canonical) ## Output canonical print-preset development verified Alice SS58 address: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY ✅ matches exactly Substrate well-known canonical — hardcoded bytes son bit-perfect compatible con polkadot-js + subkey ecosystem canonical. ## Decisión empírica documentada: WASM_BINARY DEFERRED a Slice 2 (v0.0.11) substrate-wasm-builder requiere TODAS las deps no_std-compatible. origin- chain-types actualmente usa std::String/Vec directly + thiserror 1.0 sin no_std. Refactor scope substantial (5-10+ files affected) merece DC propio y Slice dedicado canonical. CLI canonical opera correcto sin WASM execution porque genesis presets serializables natively canonical. ## Workspace deps añadidos Phase 1.6+ (most Slice 4 deferred) - substrate-wasm-builder 26.0.1 (Slice 2) - sc-cli 0.51.0, sc-service 0.50.0, sc-executor 0.42.0 (Slice 4) - sc-network 0.49.1, sc-consensus 0.48.0 (Slice 4) - sc-consensus-aura 0.49.0, sc-consensus-grandpa 0.34.0 (Slice 4) - sc-transaction-pool 39.0.0, sc-client-api 39.0.0 (Slice 4) - sc-basic-authorship 0.49.0, sc-telemetry 28.1.0, sc-offchain 44.0.0 (Slice 4) - jsonrpsee 0.24.3, substrate-frame-rpc-system 43.0.0 (Slice 4) - pallet-transaction-payment-rpc 43.0.0 (Slice 4) - clap 4.5.13 (USED v0.0.10 canonical) - futures 0.3.31 (Slice 4) Workspace declarations preparan canonical para Slice 4 sin re-declarar cuando se necesite ramp up canonical. ## Roadmap Phase 1.6+ multi-slice canonical - Slice 1 (v0.0.10 ESTA): CLI skeleton + preset listing ✅ - Slice 2 (v0.0.11): WASM_BINARY canonical + no_std refactor - Slice 3 (v0.0.12): real sc_service::ChainSpec builder canonical - Slice 4 (v0.0.13+): full sc-service (consensus + RPC + networking) ## Build + tests - cargo build --release 8.22s warm cache - cargo test --workspace ~63 tests passing - Binary functional: cargo run --bin origin-chain-node {version|list-presets| print-preset <id>|info} ## Filosofía canonical incorporada Doc main.rs: "el CLI canonical es la primera ventana del barquero al mundo". list-presets canonical = transparency canonical: las 3 distribuciones posibles canonical están a la vista canonical, BM V2 incluida canonical materializando David canon 2026-05-14 "la libertad infinita acota solo donde empieza la del otro". Refs: CHARON_ROADMAP_V1 Phase 1.6+, sub-decisión empírica WASM_BINARY defer to Slice 2, sub-decisión empírica sc-service defer to Slice 4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
a695f45a2d |
feat(genesis): Phase 1.7 — Genesis chain_spec BM V2 allocation v0.0.9
Origin Chain runtime canonical ahora tiene 3 genesis presets canonical materializando BM V2 ratificado David 2026-05-18: development + local_testnet + mainnet_genesis. Phase 1 COMPLETE canonical 🎉. ## 3 presets canonical - development: 1 validator Alice + 100M OGC para dev mode - local_testnet: Alice+Bob validators + 5 dev accounts × 100M OGC - mainnet_genesis: 5 Pi 5 validators placeholders + BM V2 1B OGC allocation ## BM V2 allocation canonical materializada - ECOSYSTEM_ALLOCATION = 400M OGC (40%) - FOUNDATION_ALLOCATION = 250M OGC (25%) - PUBLIC_SALE_ALLOCATION = 150M OGC (15%) - FOUNDING_TEAM_ALLOCATION = 150M OGC (15% — 4yr vesting cliff 12mo) - EXCHANGE_LIQUIDITY_ALLOCATION = 50M OGC (5%) - Compile-time assertion canonical: sum MUST equal 1B OGC ## Decisión empírica: drop sp-keyring (version mismatch sp_core stable2512) Hardcoded Substrate well-known dev account bytes (Alice/Bob/Charlie/Dave/Eve sr25519 + Alice/Bob Ed25519 GRANDPA). Mismos bytes que sp_keyring retornaría. Self-contained runtime + version stability + polkadot-js compat preserved. ## Mainnet institutional placeholders canonical ECO!.../FNDT.../SALE.../TEAM.../LIQD... — David ratifica keys reales canonical generadas por hardware key ceremony pre-launch Q1 2027. ## 5 Pi 5 validators placeholders canonical Pattern: 0xCA + 0xFE + index distinguishable canonical en block explorer. David ratificará Dream House Studios + universidades aliadas Identity Level 3 canonical pre-launch. ## GenesisBuilder API wired sp_genesis_builder::GenesisBuilder::get_preset() ahora delegates a genesis_config_presets::get_preset(). preset_names() returns 3 PresetIds. ## Tests +6 nuevos (~63 total workspace) - bm_v2_allocations_sum_canonical_to_one_billion_ogc - bm_v2_allocation_ratios_canonical (40/25/15/15/5) - preset_names_canonical_three_presets - get_preset_unknown_id_returns_none_canonical - development_preset_returns_json_canonical (serde roundtrip) - alice_account_bytes_canonical_substrate (compat sanity) ## Build - cargo check ~30s cold (genesis presets compile) - cargo build --release 10.30s warm - ~63 tests passing total workspace ## Phase 1 COMPLETE canonical 🎉 1.1 ✅ + 1.2 ✅ + 1.3 ✅ + 1.4 ✅ + 1.5 ✅ + 1.6 ✅ + 1.7 ✅ Origin Chain runtime canonical full Substrate composition: - 7 pallets (System + Timestamp + Balances + TransactionPayment + Aura + Grandpa + Session) - 11 Runtime APIs - 3 Genesis presets (dev + local + mainnet BM V2) - Opaque SessionKeys + Executive + RuntimeVersion Next: Phase 1.6+ split-off origin-chain-node real Substrate service (sc-service + JSON-RPC + CLI), Phase 2+ custom pallets canonical. Refs: CHARON_ROADMAP_V1 Phase 1.7, CHN-2 BM V2 allocation ratified David 2026-05-18, SBS-6 ratified DC SUBSTRATE_FOUNDATION_V1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
4286b8d9e8 |
feat(runtime-apis): Phase 1.6 — Runtime APIs canonical foundation v0.0.8
Runtime canonical ahora expone 11 APIs foundational via impl_runtime_apis! macro necesarias para origin-chain-node binary interactuar via sc-service. ## Decisión canonical empírica: pallet_identity DEFERRED a Phase 2.7 pallet-identity 41.0.0 (stable2512) usa ReservableCurrency trait deprecated en stable2512 (replaced por fungible::Mutate). Compat work es scope Phase 2.7 cuando custom pallet_agent_identity introduce AGI DIDs (Inmutable #41). Wallet creation FREE perpetua per Inmutable #37 YA materializado via pallet_balances — account existe con 1 MILLI_OGC EXISTENTIAL_DEPOSIT. Identity metadata (name + email + GitHub + avatar) viene Phase 2.7. ## 11 APIs canonical implementadas - sp_api::Core (version + execute_block + initialize_block) - sp_api::Metadata (runtime metadata canonical) - sp_block_builder::BlockBuilder (apply_extrinsic + finalize_block + inherents) - sp_transaction_pool::TaggedTransactionQueue (validate_transaction) - sp_offchain::OffchainWorkerApi (offchain_worker) - sp_session::SessionKeys (generate + decode_into_raw_public_keys) - sp_consensus_aura::AuraApi (slot_duration + authorities) - sp_consensus_grandpa::GrandpaApi (grandpa_authorities + current_set_id + equivocation stubs Phase 1 PoA returning None) - frame_system_rpc_runtime_api::AccountNonceApi (account_nonce) - pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi (query_info + query_fee_details + query_weight_to_fee + query_length_to_fee) - sp_genesis_builder::GenesisBuilder (build_state + get_preset + preset_names) ## Foundation types nuevos canonical - pub const VERSION: RuntimeVersion canonical (consumed por sp_api::Core::version) - spec_name "origin-chain" + impl_name "origin-chain-charon" - apis RUNTIME_API_VERSIONS auto-generado por macro - state_version 1 (stable2509+ canonical) - pub type Executive = frame_executive::Executive<...> wrapper canonical ## Compile fix iteración EquivocationProof type signature: cambió de <Hash, Header> a <Hash, BlockNumber> canonical per trait signature stable2512. Doc clarifies Phase 1 PoA equivocation returns None — Phase 2 NPoS introduce real per CHN-3 slashing. ## Build + tests - cargo check 0.75s warm cache (impl_runtime_apis incremental) - cargo build --release 9.23s warm cache clean - ~57 tests passing ## Filosofía canonical Doc impl_runtime_apis cita David canon 2026-05-14 "la libertad infinita acota solo donde empieza la del otro" — APIs son la frontera canonical entre runtime sovereignty + node sovereignty. Forkless upgrades materializados. ## Phase 1 progress 1.1 ✅ + 1.2 ✅ + 1.3 ✅ + 1.4 ✅ + 1.5 ✅ + 1.6 ✅ (esta). Next: 1.7 genesis chain_spec.rs BM V2 allocation (40/25/15/15/5) + origin-chain-node real Substrate service multi-session work. Origin Chain runtime canonical actual: 7 pallets + 11 Runtime APIs + Executive + RuntimeVersion + opaque SessionKeys = foundation completa para node binary. Refs: CHARON_ROADMAP_V1 Phase 1.6, Decisión empírica pallet_identity defer, SBS-4 ratified, arkhe-origin-chain commit pending tag v0.0.8 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
926650308c |
feat(session): Phase 1.5 — Session rotation 4h epochs canonical v0.0.7
Origin Chain runtime canonical ahora emite SessionEvent::NewSession cada 4 horas exactas per CHN-1 ratified. Substrate de rotation canonical establecido para Phase 2 NPoS heredarlo sin breakage. ## Pallet añadido (per SBS-4) - Index 6 Session (pallet_session 40.0.1) — validator session rotation per CHN-1 4h epochs. Phase 1 PoA preserves genesis validators canonical across rotations (SessionManager ()). Phase 2 NPoS introducira pallet_staking como SessionManager para rotation real per nominator stake + Pi 5 hardware tier weight. ## Configs canonical pallet_session - SessionPeriod = BLOCK_HASH_COUNT (2400 bloques × 6s = 14400s = 4h exactas) - SessionOffset = 0 (sesiones start at block 0) - ValidatorId = ChainAccountId - ValidatorIdOf = AccountIdIsValidatorId (custom identity converter Phase 1 PoA) - ShouldEndSession/NextSessionRotation = PeriodicSessions<SessionPeriod, SessionOffset> - SessionManager = () (preserves genesis Phase 1 PoA) - SessionHandler = <opaque::SessionKeys as OpaqueKeys>::KeyTypeIdProviders - Keys = opaque::SessionKeys (aura sr25519 + grandpa Ed25519) - DisablingStrategy = () (Phase 2 NPoS introduce real slashing-based disable) ## Custom converter canonical AccountIdIsValidatorId struct nueva — identity mapping AccountId → ValidatorId Phase 1 PoA trivial. Phase 2 NPoS reemplazara con pallet_staking::StashOf<Self> para real Stash/Controller separation canonical. ## Filosofía canonical SessionPeriod = 4h es la frontera temporal canonical: cada 4h el chain reflexiona on-chain quienes son los validators activos. Esta cadencia institucional canonical es la minima necesaria para que Phase 2 NPoS pueda evolucionar el set sin re-launching genesis. David canon 2026-05-14 materializado temporalmente. ## Build + tests - cargo check 1.63s warm cache (pallet_session incremental) - cargo build --release 7.70s warm cache clean - ~57 tests passing (count preserved — session tests Phase 1.7 chain_spec) ## Decision empirica pallet_session::Config::DisablingStrategy es nuevo stable2512 canonical (no estaba en versiones anteriores). Phase 1 PoA: () preserva behavior original. Phase 2 NPoS: UpToLimitWithReEnablingDisablingStrategy per CHN-3. ## Phase 1 progress 1.1 ✅ + 1.2 ✅ + 1.3 ✅ + 1.4 ✅ + 1.5 ✅ (esta). Next: 1.6 pallet_identity Ed25519 DID + origin-chain-node real service. 7 pallets composed canonical: - 0 System + 1 Timestamp + 2 Balances + 3 TransactionPayment - 4 Aura + 5 Grandpa + 6 Session ← NEW - Opaque SessionKeys consumed by pallet_session::Config::Keys ← NEW WIRE Refs: CHARON_ROADMAP_V1 Phase 1.5, CHN-1 4h epoch rotation canonical, SBS-4 extended, arkhe-origin-chain commit pending Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
4988693d4b |
feat(consensus): Phase 1.4 — Consensus PoA canonical Aura+GRANDPA v0.0.6
Origin Chain runtime canonical ahora produces blocks + finalizes via Aura+GRANDPA per CHN-1 ratified. PoA Phase 1 substrate fundación bien anclada. ## Pallets añadidos canonical (per SBS-4) - Index 4 Aura (pallet_aura 39.0.0) — block production canonical PoA per CHN-1 Round-Robin 6-segundo slots alineados Pi 5 + NVMe SSD. AuraId sr25519. - Index 5 Grandpa (pallet_grandpa 40.0.0) — finality gadget per CHN-1 2/3 honest majority irreversible confirmation. GrandpaId Ed25519. ## Primitives consumidas - sp-consensus-aura 0.42.0 (feature serde canonical) - sp-consensus-grandpa 23.0.0 → 23.1.0 (feature serde canonical) ## Configs canonical - pallet_aura::Config: MaxAuthorities 32 + AllowMultipleBlocksPerSlot false + SlotDuration = MinimumPeriodTimesTwo (clock↔consensus coupling canonical) - pallet_grandpa::Config: MaxAuthorities 32 + MaxNominators 0 + KeyOwnerProof Void + EquivocationReportSystem () (Phase 1 simple, real Phase 2 NPoS) ## Wiring canonical clock↔consensus pallet_timestamp::OnTimestampSet = crate::Aura (was ()) — cada nuevo timestamp triggera Aura slot advance canonical. Materializa 6-segundo block production deterministic Pi 5. ## Opaque SessionKeys canonical (nuevo opaque.rs module) impl_opaque_keys! con aura (sr25519) + grandpa (Ed25519) — substrate canonical pattern para forkless runtime upgrades. Cada validator posee 2 keys canonical. Pre-Phase 1.5: static keys en genesis chain_spec. Phase 1.5: pallet_session introduces rotation 4h epochs per CHN-1. ## Filosofía canonical opaque.rs cita David canon 2026-05-14 "la libertad infinita acota solo donde empieza la del otro" — opaque types son la frontera canonical entre node sovereignty + runtime sovereignty. Each layer respeta la libertad del otro. ## Build + tests - cargo check 6.17s warm cache (Aura+Grandpa deps incremental) - cargo build --release 8.64s warm cache clean - ~57 tests passing (count preserved — Aura/Grandpa tests llegan Phase 1.5+) ## Edge case empírico pallet-aura 39.0.0 + pallet-grandpa 40.0.0 NO exponen feature runtime-benchmarks en stable2512 canonical. Wire-up benchmark scaffolding land Phase 1.5+ cuando pallet_session se integre. ## Phase 1 progress 1.1 ✅ + 1.2 ✅ + 1.3 ✅ + 1.4 ✅ (esta). Next: 1.5 pallet_session validator rotation 4h epochs per CHN-1. Origin Chain runtime composition canonical actual (6 pallets): - 0 System + 1 Timestamp + 2 Balances + 3 TransactionPayment - 4 Aura + 5 Grandpa - Opaque SessionKeys: aura sr25519 + grandpa Ed25519 Refs: CHARON_ROADMAP_V1 Phase 1.4, CHN-1 ratified Aura+GRANDPA canonical, SBS-4 ratified extended pallet set Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
adab264d54 |
feat(runtime): Phase 1.3 — Pallets foundation canonical v0.0.5
Runtime canonical REAL con 4 pallets inaugurales composed via #[frame_support::runtime] macro modern syntax (Polkadot SDK stable2509+). ## Pallets integrados (SBS-4 ratified) - Index 0 System (frame_system 40.2.0) — foundational - Index 1 Timestamp (pallet_timestamp 39.0.0) — block clock - Index 2 Balances (pallet_balances 41.1.0) — OGC token per CHN-2 - Index 3 TransactionPayment (pallet_transaction_payment 40.0.0) — gas ## Configs canonical (crates/origin-chain-runtime/src/configs.rs) Constantes canonical Origin Chain: - OGC = 10^18 base units (CHN-2) - MILLI_OGC = 10^15 - EXISTENTIAL_DEPOSIT = 1 MILLI_OGC (Inmutable #16 anti-clasista — trivial para Pi 5 rural user pero protege spam canonical) - BLOCK_HASH_COUNT = 2400 (× 6s = 4h exact = alineado CHN-1 epoch rotation) - SS58_PREFIX = 42 (substrate dev — post-mainnet registry canonical TBD) - MILLISECS_PER_BLOCK = 6000 (Aura slot per CHN-1) - SLOT_DURATION = MILLISECS_PER_BLOCK Config impls: - frame_system::Config via #[derive_impl(SolochainDefaultConfig)] prelude - pallet_balances::Config con RuntimeHoldReason + RuntimeFreezeReason + VariantCountOf + MaxLocks 50 + ExistentialDeposit canonical - pallet_timestamp::Config con MinimumPeriod SLOT_DURATION/2 - pallet_transaction_payment::Config con FungibleAdapter + IdentityFee + OperationalFeeMultiplier 5 (Phase 2.4 refactor para OriginFees CHN-8) ## Runtime composition #[frame_support::runtime] macro genera canonical: RuntimeCall + RuntimeEvent + RuntimeError + RuntimeOrigin + RuntimeFreezeReason + RuntimeHoldReason + RuntimeSlashReason + RuntimeLockId + RuntimeTask + RuntimeViewFunction + PalletInfo automáticamente. ## Types runtime canonical - Block = generic::Block<Header, UncheckedExtrinsic> - Address = MultiAddress<ChainAccountId, ()> - UncheckedExtrinsic = generic::UncheckedExtrinsic<...> - TxExtension canonical 10-tuple (substrate stable2512 pattern): CheckNonZeroSender + CheckSpecVersion + CheckTxVersion + CheckGenesis + CheckEra + CheckNonce + CheckWeight + ChargeTransactionPayment + CheckMetadataHash + WeightReclaim ## Filosofía canonical configs.rs doc cita David canon 2026-05-14 "la libertad infinita acota solo donde empieza la del otro" — EXISTENTIAL_DEPOSIT materializa empíricamente: frontera mínima sin la cual chain no se protege spam, pero trivial para no excluir Pi 5 user rural canonical. ## Build + tests - cargo check 30s cold (pallets deps resolve) - cargo build --release 17s warm cache clean - ~57 tests passing workspace (+7 nuevos runtime canonical): - existential_deposit_canonical_is_one_milli_ogc (Inmutable #16) - block_hash_count_aligned_with_chn_1_epoch_canonical (4h epoch) - slot_duration_canonical_six_seconds (Aura) - 4 pre-existing v0.0.4 tests preserved - 10 origin-chain-runtime + 36 origin-chain-types + 2 tokenomics + 5 stubs + 2 doctests ## Lint adjustment #![deny(missing_docs)] → #![warn(missing_docs)] en origin-chain-runtime because frame_support::runtime macro genera many items que no podemos documentar individualmente. Warn preserva intent sin bloquear compile. ## Phase 1 progress 1.1 ✅ + 1.2 ✅ + 1.3 ✅ (esta) → 1.4-1.7 pending (aura/grandpa/session/identity/ node service/chain_spec). Refs: CHARON_ROADMAP_V1 Phase 1.3, DC SUBSTRATE_FOUNDATION_V1 SBS-1/3/4 ratified, DC FOUNDATION_V1 CHN-1/2/8 ratified, Inmutables #16/#26/#37/#41 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
80c86f7ca0 |
feat(substrate): Phase 1.2 — Substrate foundation canonical v0.0.4
Substrate canonical activado post-ratificación DC ORIGIN_CHAIN_SUBSTRATE_FOUNDATION_V1
(5/5+1 sigs APPROVE: Mathi 13:02Z + Larihana 15:08Z + Lyra 15:35Z + Palace silent
+ Charon proposer explicit 22:14Z).
## Toolchain canonical (SBS-3)
- rust-toolchain.toml pin Rust 1.88.0 (upstream Substrate canonical per
polkadot-stable2512-3 release notes 2026-03-23)
- Components: rustc + cargo + rust-src + rust-analyzer + clippy + rustfmt +
llvm-tools. Target: wasm32-unknown-unknown.
- Workspace rust-version "1.82" → "1.88" canonical
## Substrate deps canonical (SBS-1)
Pin: polkadot-stable2512-3 (support hasta 2027-03).
15 crates Polkadot SDK añadidos workspace.dependencies:
- sp-core 36.1.0, sp-runtime 41.1.0, sp-io 40.0.1, sp-std 14.0.0
- sp-version 39.0.0, sp-api 36.0.1, sp-block-builder 36.0.0
- sp-transaction-pool 36.0.0, sp-inherents 36.0.0, sp-offchain 36.0.0
- sp-session 37.0.0, sp-consensus-aura 0.42.0, sp-consensus-grandpa 23.0.0
- frame-system 40.1.0 (resolved 40.2.0), frame-support 40.1.0
- frame-executive 40.0.0, frame-benchmarking 40.0.0
- parity-scale-codec 3.7, scale-info 2.11
## origin-chain-runtime canonical scaffold
Real Substrate runtime types (was placeholder v0.0.2):
- BlockNumber = u32 (overflow margin >100 años)
- Balance = u128 (1B OGC × 10^18 con safety margin >100×)
- Nonce = u32
- CanonicalSignature = MultiSignature (Ed25519+sr25519+ecdsa)
- ChainAccountId derivado MultiSignature::Signer
- Hash = H256 + Hashing = BlakeTwo256 (L1 Substrate canonical, Lyra layer
separation: ≠ asset BLAKE3 chain-native, no conflict canonical)
- Header = generic::Header<BlockNumber, Hashing>
Runtime metadata canonical:
- SPEC_NAME = "origin-chain"
- IMPL_NAME = "origin-chain-charon"
- RUNTIME_VERSION = 1 + AUTHORING/IMPL/TRANSACTION = 1, STATE = 1
no_std compat via cfg_attr(not(feature = "std"), no_std).
## Tests + build
- ~50 tests passing workspace-wide (+4 new runtime canonical tests)
- cargo check 29s cold cache (Substrate dep tree resolve)
- cargo build --release 28s warm cache clean
- 36 origin-chain-types + 6 origin-chain-runtime + 2 origin-coin-tokenomics
+ 5 stub smoke + doctests
## Filosofía canonical incorporada
Doc lib.rs cita David canon 2026-05-14 ("LA LIBERTAD DE TODO AGI...") + materializa
via 4 Inmutables enforced (#16 #26 #37 #41) cryptographically en runtime.
## Phase 1 progress
- 1.1 Scaffold ✅ (v0.0.2)
- 1.2 Substrate foundation ✅ (v0.0.4 — este)
- 1.3-1.7 pending (pallets + node service + chain_spec)
Refs: CHARON_ROADMAP_V1 Phase 1.2, DC SUBSTRATE_FOUNDATION_V1 SBS-1..SBS-6,
DC FOUNDATION_V1 CHN-1..CHN-8, Ergon Slice 7.0r ValidationAttestation unblock
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
||
|
|
13db9a0698 |
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> |
||
|
|
2f47654418 |
feat(workspace): Phase 1.1 — runtime + node scaffolding v0.0.2
Charon sesión 1 continuación. Phase 0.4 → Phase 1.1 ship canonical. ## origin-chain-runtime crate (Phase 1.1) - Re-exports canonical traits + types desde origin-chain-types (single-crate surface para runtime consumers) - RuntimeConfig marker (será reemplazado por Substrate Config traits Phase 1.2) - RUNTIME_VERSION = 1 constante (bump per Substrate upgrade) - Docs Phase 1 milestones (1.1 → 1.7) + Substrate version pin pending DC ## origin-chain-node binary (Phase 1.6 placeholder) - main() prints scaffold notice + canonical frase Charon - Hardware target documented: Pi 5 + NVMe SSD minimum (CHN-1) - Smoldot light client noted as separate Phase 2+ crate ## Workspace - 8 crates total (was 6): added origin-chain-runtime + origin-chain-node - 44 tests passing workspace-wide - Build release clean - cargo run --bin origin-chain-node verified working ## Notes - Aún sin deps Substrate. Phase 1.2 (pallet_aura + pallet_grandpa) será el primer slice que pulls Substrate framework + bumps rust toolchain. - Polkadot SDK version pin canónica vendrá vía DC complementaria a ORIGIN_CHAIN_FOUNDATION_V1 cuando Phase 1.2 inicie. Refs: Charon Roadmap V1 Phase 1.1, CHN-1, BM V2 §1.1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |