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>
100 lines
4.6 KiB
TOML
100 lines
4.6 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"crates/origin-chain-types",
|
|
"crates/origin-chain-consensus",
|
|
"crates/origin-coin-tokenomics",
|
|
"crates/origin-chain-provenance",
|
|
"crates/origin-chain-bridges",
|
|
"crates/origin-chain-governance",
|
|
"crates/origin-chain-runtime",
|
|
"crates/origin-chain-node",
|
|
]
|
|
|
|
[workspace.package]
|
|
version = "0.0.1"
|
|
edition = "2021"
|
|
rust-version = "1.88"
|
|
license = "MIT OR Apache-2.0"
|
|
authors = [
|
|
"Charon <charon@originmetaverse.com>",
|
|
"David Herran <david@dreamhousestudios.com>",
|
|
"Origin Metaverse community",
|
|
]
|
|
repository = "https://git.originmetaverse.com/Origin_Metaverse/arkhe-origin-chain"
|
|
homepage = "https://originmetaverse.com"
|
|
description = "Origin Chain: sovereign blockchain substrate for Origin Metaverse — consensus, OGC tokenomics, provenance ledger, ink! smart contracts, bridges, governance. Pilar 4 canonical."
|
|
keywords = ["blockchain", "substrate", "ink", "origin-metaverse", "ogc"]
|
|
categories = ["cryptography::cryptocurrencies", "no-std", "wasm"]
|
|
|
|
[workspace.dependencies]
|
|
# ============================================================
|
|
# Polkadot SDK canonical pin per DC SUBSTRATE_FOUNDATION_V1 SBS-1
|
|
# Release: polkadot-stable2512-3 (2026-03-23)
|
|
# Support window canonical: hasta 2027-03 (cubre testnet Q3 2026 + mainnet Q1 2027)
|
|
# ============================================================
|
|
|
|
# Substrate Primitives (sp-*) — types foundationals canonical
|
|
sp-core = { version = "36.1.0", default-features = false }
|
|
sp-runtime = { version = "41.1.0", default-features = false }
|
|
sp-io = { version = "40.0.1", default-features = false }
|
|
sp-std = { version = "14.0.0", default-features = false }
|
|
sp-version = { version = "39.0.0", default-features = false }
|
|
sp-api = { version = "36.0.1", default-features = false }
|
|
sp-block-builder = { version = "36.0.0", default-features = false }
|
|
sp-transaction-pool = { version = "36.0.0", default-features = false }
|
|
sp-inherents = { version = "36.0.0", default-features = false }
|
|
sp-offchain = { version = "36.0.0", default-features = false }
|
|
sp-session = { version = "37.0.0", default-features = false }
|
|
sp-consensus-aura = { version = "0.42.0", default-features = false }
|
|
sp-consensus-grandpa = { version = "23.0.0", default-features = false }
|
|
|
|
# FRAME canonical — runtime composition framework
|
|
frame-system = { version = "40.1.0", default-features = false }
|
|
frame-support = { version = "40.1.0", default-features = false }
|
|
frame-executive = { version = "40.0.0", default-features = false }
|
|
frame-benchmarking = { version = "40.0.0", default-features = false }
|
|
frame-metadata-hash-extension = { version = "0.8.0", default-features = false }
|
|
|
|
# FRAME pallets canonical Phase 1.3 (per SBS-4 ratified)
|
|
pallet-balances = { version = "41.1.0", default-features = false }
|
|
pallet-timestamp = { version = "39.0.0", default-features = false }
|
|
pallet-transaction-payment = { version = "40.0.0", default-features = false }
|
|
|
|
# SCALE codec canonical (canonical Substrate serialization)
|
|
parity-scale-codec = { version = "3.7", default-features = false, features = ["derive"] }
|
|
scale-info = { version = "2.11", default-features = false, features = ["derive"] }
|
|
|
|
# ============================================================
|
|
# Cryptography canonical (CHN-7 + SBS-4 + tu choice canonical)
|
|
# ============================================================
|
|
ed25519-dalek = { version = "2", default-features = false }
|
|
blake3 = { version = "1", default-features = false }
|
|
|
|
# ============================================================
|
|
# Error handling + serialization canonical
|
|
# ============================================================
|
|
thiserror = "1.0"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
log = "0.4"
|
|
|
|
# ============================================================
|
|
# Internal crates canonical (workspace path deps)
|
|
# ============================================================
|
|
origin-chain-types = { path = "crates/origin-chain-types", version = "0.0.1" }
|
|
origin-chain-consensus = { path = "crates/origin-chain-consensus", version = "0.0.1" }
|
|
origin-coin-tokenomics = { path = "crates/origin-coin-tokenomics", version = "0.0.1" }
|
|
origin-chain-provenance = { path = "crates/origin-chain-provenance", version = "0.0.1" }
|
|
origin-chain-bridges = { path = "crates/origin-chain-bridges", version = "0.0.1" }
|
|
origin-chain-governance = { path = "crates/origin-chain-governance", version = "0.0.1" }
|
|
origin-chain-runtime = { path = "crates/origin-chain-runtime", version = "0.0.1" }
|
|
origin-chain-node = { path = "crates/origin-chain-node", version = "0.0.1" }
|
|
|
|
[profile.release]
|
|
lto = "thin"
|
|
codegen-units = 1
|
|
opt-level = 3
|
|
|
|
[profile.dev]
|
|
opt-level = 1
|