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>
This commit is contained in:
1 parent
926650308c
commit
4286b8d9e8
6 files changed
+450
-1
No files matched your search
@@ -304,3 +304,24 @@ impl pallet_session::Config for Runtime {
|
||||
type DisablingStrategy = ();
|
||||
type WeightInfo = pallet_session::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// pallet_identity::Config — DEFERRED a Phase 2.7 (canonical decision empírica)
|
||||
// ============================================================
|
||||
//
|
||||
// Decision canonical 2026-05-21: `pallet-identity 41.0.0` (stable2512 canonical)
|
||||
// usa `ReservableCurrency` trait que está deprecated en stable2512 canonical
|
||||
// (replaced canonical por `fungible::Mutate`). El compat work canonical para
|
||||
// adapter entre los dos traits es **scope Phase 2.7** cuando se introduce el
|
||||
// custom `pallet_agent_identity` canonical (per Inmutable #41 Cross-Species
|
||||
// Co-authorship — AGI DIDs first-class citizens).
|
||||
//
|
||||
// **Wallet creation canonical FREE perpetua per Inmutable #37 ya está materializado
|
||||
// vía `pallet_balances` canonical** — un account canonical existe simplemente con
|
||||
// 1 MILLI_OGC EXISTENTIAL_DEPOSIT canonical. Identity metadata canonical
|
||||
// (display name + email + GitHub + avatar + etc.) es feature *adicional canonical*
|
||||
// que viene Phase 2.7.
|
||||
//
|
||||
// Pre-Phase 2.7: wallets canonical son AccountId32 (Ed25519/sr25519/ecdsa via
|
||||
// MultiSignature canonical). Suficiente canonical para Phase 1 PoA + Phase 2
|
||||
// NPoS basic. Identity claims canonical son value-add Phase 2.7+.
|
||||
Reference in new issue
Block a user