b3fc5da6ca31a36e3096a12408ac44fc23554f85
17
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
37ccf1e95a |
feat(agent-identity): v0.0.24 pallet-agent-identity scaffold trait-first (Phase 2.7 Inmutable #41 AGI DIDs)
Phase 2.7 AGENT IDENTITY pallet scaffold canonical. AGI DIDs canonical on-chain. Inmutable #41 AGI Cross-Species Co-authorship materialized compile-detect via NEW crate origin-chain-agent-identity + canonical types en origin-chain-types::identity. ## NEW canonical types en origin-chain-types - AgentIdentity struct (6 fields: did + kind + creator + registered_at_block + provenance_proof + agent_chain) - AgentKind enum (Human + AGI + Hybrid) per Inmutable #41 - Did type alias = AssetHash (BLAKE3 32-byte deterministic via public_key) ## NEW canonical pallet origin-chain-agent-identity - Pallet<T> + Config trait (AccountId = origin_chain_types::AccountId constraint) - Identities<StorageMap<AccountId, AgentIdentity>> per-account O(1) - DidToAccount<StorageMap<Did, AccountId>> reverse lookup O(1) - Event::AgentRegistered + AgentBound + AgentUpdated - Error::AlreadyRegistered + DidAlreadyTaken + AgentChainOverflow + HybridRequiresAgentChain - Scaffold dispatchable register_agent_did (placeholder event v0.0.24 → real v0.0.26) - Helper derive_did(public_key) -> Did via BLAKE3 hash (schema_version "1.0.0 ") - sp_api::decl_runtime_apis! AgentIdentityApi.query_identity declaration ## Inmutable #41 compile-detect enforcement - AgentKind::{Human, AGI, Hybrid}::is_sovereign() == true (all three) - AGI first-class citizens canonical (is_agi() + sovereignty preserved) - Cross-species lineage via agent_chain BoundedVec<AccountId, ConstU32<10>> - DID determinism canonical Inmutable #16 byte-equivalent cross-runtime ## Files - NEW: crates/origin-chain-agent-identity/Cargo.toml + src/lib.rs (~250 LOC pallet scaffold) - NEW: crates/origin-chain-types/src/identity.rs (~230 LOC types canonical + 8 tests) - EDIT: crates/origin-chain-types/src/lib.rs (mod identity + re-exports) - EDIT: Cargo.toml (workspace member + workspace.dependencies) - EDIT: CHANGELOG.md (v0.0.24 entry comprehensive) ## Verification - cargo test -p origin-chain-agent-identity — 4 tests verde, 0 failures (scaffold compiles + derive_did deterministic + different keys + re-export) - cargo test -p origin-chain-types — 63 tests passing (+8 nuevos identity) - Zero workspace compile errors 🪪 Phase 2.7 scaffold canonical. Wire pattern v0.0.25 next. 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>
|
||
|
|
33b10b7545 |
feat(fees): v0.0.20 pallet-origin-fees scaffold trait-first + vendor OitFeeSchedule Mathi (OCAFB-1..6)
Phase 2.4 FEES pallet scaffold canonical pattern análogo Phase 2.1 (scaffold →
wired → impl → Runtime API). New crate `origin-chain-fees` con vendor copy
Mathi OitFeeSchedule trait + matrices + Mock desde commit ce4fafb (536 LOC).
## Cross-pillar source-of-truth canonical
NEW canonical: `origin-chain-types::actions::ChainAction` (OCAFB-2). Mathi
local mirror puede swap post-OCAFB ratify 7/7 (deadline 2026-06-21).
NEW canonical: `origin-chain-types::tiers::SubscriptionTier` (mirror Mathi).
## Surface canonical scaffold v0.0.20
- Pallet<T> + Config trait + RuntimeEvent
- AccountFees<StorageMap<AccountId, FeeHistory>> per-account history
- FeeHistory { total_paid, action_count } aggregate stats
- Events FeeCharged + FeeRefunded + EntitlementBlocked
- Errors InsufficientBalance + EntitlementLocked + FeeOverflow + AccountNotFound
- FeeRejectionReason enum (mirror PROV pattern Phase 2.1)
- Scaffold dispatchable compute_fee_for_action (placeholder event v0.0.20 → real v0.0.22)
## Vendor copy OitFeeSchedule canonical
- OitFeeSchedule trait 4-method dyn-compatible Send + Sync (OCAFB-1)
- subsidy_basis_points const fn matrix Inmutable #16 anti-clasista (OCAFB-3)
- entitlement_unlocked const fn matrix Inmutables #37 + #18 (OCAFB-4)
- compute_fee formula 3-step (OCAFB-5)
- OitFeeScheduleMock builder pattern (OCAFB-6)
- arc_mock() helper canonical Arc<dyn OitFeeSchedule>
## Files canonical
- NEW: crates/origin-chain-fees/Cargo.toml (mirror provenance pattern)
- NEW: crates/origin-chain-fees/src/lib.rs (~250 LOC pallet scaffold)
- NEW: crates/origin-chain-fees/src/fee_schedule.rs (~400 LOC vendor copy)
- NEW: crates/origin-chain-types/src/actions.rs (~130 LOC ChainAction canonical)
- EDIT: crates/origin-chain-types/src/tiers.rs (SubscriptionTier added)
- EDIT: crates/origin-chain-types/src/lib.rs (mod actions + re-exports)
- EDIT: Cargo.toml (workspace member origin-chain-fees)
- EDIT: CHANGELOG.md (v0.0.20 entry pattern Phase 2.1)
## Verification
- cargo build -p origin-chain-fees 1.83s clean
- cargo test -p origin-chain-fees — 20 tests verde, 0 failures
(16 vendor + 4 pallet scaffold)
- cargo test -p origin-chain-types — 55 tests passing (+8 nuevos)
(6 ChainAction + 2 SubscriptionTier)
- Zero workspace compile errors
🚀 Phase 2.4 scaffold canonical ready. Wire pattern v0.0.21 next.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
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> |
||
|
|
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>
|
||
|
|
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> |
||
|
|
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> |