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>
107 lines
4.9 KiB
TOML
107 lines
4.9 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, features = ["serde"] }
|
|
sp-consensus-grandpa = { version = "23.1.0", default-features = false, features = ["serde"] }
|
|
|
|
# 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 }
|
|
|
|
# FRAME pallets canonical Phase 1.4 — Consensus PoA per CHN-1 ratified
|
|
pallet-aura = { version = "39.0.0", default-features = false }
|
|
pallet-grandpa = { version = "40.0.0", default-features = false }
|
|
|
|
# FRAME pallets canonical Phase 1.5 — Session rotation per CHN-1 4h epochs
|
|
pallet-session = { version = "40.0.1", 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
|