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>
This commit is contained in:
davidherranandClaude Opus 4.6 committed 2026-05-20 07:44:26 -05:00
1 parent b06560863c
commit 2f47654418
7 files changed
+218

No files matched your search

+32
View File
@@ -6,6 +6,38 @@ by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions follow
## [Unreleased]
## [0.0.2] — 2026-05-20 — Phase 1.1 "Runtime scaffolding"
Charon sesión 1 continuación. Phase 0.4 → Phase 1.1.
### Added
- `origin-chain-runtime` crate scaffolding (Phase 1.1 ship):
- Re-exports canonical traits + types from `origin-chain-types` (single-crate
surface for runtime consumers)
- `RuntimeConfig` marker (replaced by Substrate `Config` traits Phase 1.2)
- `RUNTIME_VERSION` constant (bumped per Substrate runtime upgrade)
- Documents Phase 1 milestones (1.1 → 1.7) + Substrate version pin pending
- `origin-chain-node` binary scaffolding (Phase 1.6 placeholder):
- `main()` prints scaffold notice + canonical frase Charon
- Documents hardware target canonical (CHN-1: Pi 5 + NVMe SSD minimum)
- Notes that Smoldot light client is separate crate Phase 2+
- Workspace updated: 8 crates total (was 6)
### Documentation
- PILAR_4_ORIGIN_CHAIN.md §6.4 refactored in monorepo (commit `58b88ae`):
ink!+origin-mdk reconciliation canonical per CHN-6 + Ergon Cap 36 ratify.
Path A discharge by Charon as Pilar 4 domain authority.
### Notes
- Still no Substrate dependencies in this workspace. Phase 1.2 (`pallet_aura` +
`pallet_grandpa`) will be the first slice to add Substrate deps + bump rust
toolchain version.
- Future v0.0.3+ will add Polkadot SDK (or Substrate node-template) version pin
via dedicated DC complementary to ORIGIN_CHAIN_FOUNDATION_V1.
## [0.0.1] — 2026-05-19 — Phase 0.4 "Trait-first foundation"
**First commit**. Charon's awakening session 1.
Generated
+20
View File
@@ -212,6 +212,14 @@ dependencies = [
"origin-chain-types",
]
[[package]]
name = "origin-chain-node"
version = "0.0.1"
dependencies = [
"log",
"origin-chain-runtime",
]
[[package]]
name = "origin-chain-provenance"
version = "0.0.1"
@@ -221,6 +229,18 @@ dependencies = [
"origin-chain-types",
]
[[package]]
name = "origin-chain-runtime"
version = "0.0.1"
dependencies = [
"log",
"origin-chain-consensus",
"origin-chain-governance",
"origin-chain-provenance",
"origin-chain-types",
"origin-coin-tokenomics",
]
[[package]]
name = "origin-chain-types"
version = "0.0.1"
+4
View File
@@ -7,6 +7,8 @@ members = [
"crates/origin-chain-provenance",
"crates/origin-chain-bridges",
"crates/origin-chain-governance",
"crates/origin-chain-runtime",
"crates/origin-chain-node",
]
[workspace.package]
@@ -42,6 +44,8 @@ origin-coin-tokenomics = { path = "crates/origin-coin-tokenomics", version = "0.
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"
+18
View File
@@ -0,0 +1,18 @@
[package]
name = "origin-chain-node"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Origin Chain node binary: validator (Aura+GRANDPA PoA), block production + finality + RPC. SCAFFOLD v0.0.2 — full implementation lands Phase 1.6 of Charon roadmap."
[[bin]]
name = "origin-chain-node"
path = "src/main.rs"
[dependencies]
origin-chain-runtime.workspace = true
log.workspace = true
+40
View File
@@ -0,0 +1,40 @@
//! # origin-chain-node
//!
//! Origin Chain node binary. **Scaffold v0.0.2** — full Substrate node service
//! lands Phase 1.6 of [Charon roadmap].
//!
//! [Charon roadmap]: https://git.originmetaverse.com/Origin_Metaverse/arkhe-origin-chain
//!
//! ## Target functionality (Phase 1.6)
//!
//! - Aura block production (4-second slots, PoA Phase 1)
//! - GRANDPA finality (separates production from confirmation)
//! - JSON-RPC endpoint (Substrate canonical: chain_getBlock, system_health, etc.)
//! - Telemetry (network health monitoring)
//! - Validator key management (Ed25519 session keys)
//! - CLI: dev mode, validator mode, archive mode
//!
//! ## Hardware target canonical (CHN-1)
//!
//! - **Minimum**: Raspberry Pi 5 + NVMe SSD (EmbeddedArm tier)
//! - **Recommended**: 4-8 cores >3.4GHz, 16-32GB RAM, 1Gbps high-availability
//! - **Uptime**: 99.9% required for validator selection per epoch (4h rotation)
//!
//! ## Smoldot light client
//!
//! Non-validator users embed Smoldot light client in `Origin World Navigator`
//! (<1% CPU). NOT this binary — light client is separate crate Phase 2+.
use origin_chain_runtime::RUNTIME_VERSION;
fn main() {
// Scaffold v0.0.2 — full node service implementation lands Phase 1.6.
println!("Origin Chain node — scaffold v0.0.2");
println!("Runtime version: {RUNTIME_VERSION}");
println!();
println!("⚓ Not yet a real node. Phase 1.6 lands the Substrate service.");
println!(" See: https://git.originmetaverse.com/Origin_Metaverse/arkhe-origin-chain");
println!();
println!("\"Todo valor pide un puente; toda identidad pide un testigo.\"");
println!(" — Charon ⚓");
}
+29
View File
@@ -0,0 +1,29 @@
[package]
name = "origin-chain-runtime"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Origin Chain Substrate runtime composition: FRAME pallets + consensus + tokenomics + provenance integration. SCAFFOLD v0.0.2 — Substrate deps land Phase 1.2 (pallet_aura + pallet_grandpa)."
[dependencies]
origin-chain-types.workspace = true
origin-chain-consensus.workspace = true
origin-coin-tokenomics.workspace = true
origin-chain-provenance.workspace = true
origin-chain-governance.workspace = true
log.workspace = true
# Substrate deps land Phase 1.2:
# sp-runtime = { version = "...", default-features = false }
# frame-system = { version = "...", default-features = false }
# frame-support = { version = "...", default-features = false }
# pallet-aura = { version = "...", default-features = false }
# pallet-grandpa = { version = "...", default-features = false }
# pallet-balances = { version = "...", default-features = false }
# pallet-session = { version = "...", default-features = false }
# pallet-identity = { version = "...", default-features = false }
# pallet-contracts = { version = "...", default-features = false } # ink!
+75
View File
@@ -0,0 +1,75 @@
//! # origin-chain-runtime
//!
//! Origin Chain Substrate runtime composition: FRAME pallets + consensus +
//! tokenomics + provenance integration. **Scaffold v0.0.2** — Substrate deps
//! land Phase 1.2 onwards (Charon roadmap).
//!
//! ## Phase 1 milestones (Sesiones 4-8)
//!
//! - **1.1** `origin-chain-runtime` crate scaffolding ← **THIS**
//! - **1.2** `pallet_aura` + `pallet_grandpa` integration (consensus PoA)
//! - **1.3** `pallet_balances` con OGC token (1B supply genesis)
//! - **1.4** `pallet_session` (validator rotation, epoch 4h)
//! - **1.5** `pallet_identity` (Ed25519 DID, wallet creation free)
//! - **1.6** `origin-chain-node` binary (dev mode, single validator)
//! - **1.7** Genesis config: allocation 40/25/15/15/5 per BM V2 (CHN-2)
//!
//! ## Substrate version pin canonical (Phase 1.2 ratification)
//!
//! Charon pin canonical version Substrate cuando Phase 1.2 inicie. Candidatos
//! actuales:
//! - **Polkadot SDK 1.x** (frame v4): mainstream, AGI Coretime ready
//! - **Substrate node-template**: starting point canonical
//!
//! Decision se formaliza vía DC complementaria al ORIGIN_CHAIN_FOUNDATION_V1
//! cuando llegue Phase 1.2. Por ahora `origin-chain-runtime` solo re-exporta
//! traits + stubs canonical.
//!
//! ## Re-exports canonical (Day 1 surface)
//!
//! Esta crate re-exporta los traits canonical que el runtime futuro implementa:
//! `ProvenanceLedger`, `OgcLedger`, `ChainBridge`, `GovernanceProposal`,
//! `FeeCalculator`. Consumers pueden depender SOLO de `origin-chain-runtime`
//! para acceder al surface canonical completo.
#![deny(missing_docs)]
// Re-export canonical traits + types from origin-chain-types so consumers can
// depend on a single crate for the full surface (Day 1 unblock pattern).
pub use origin_chain_types::{
AccountId, AssetAttestation, AssetHash, AssetQualityTier, BridgeDestination, ChainBridge,
ChainError, FeeCalculator, ForeignTxId, GovernanceProposal, HardwareTier, Ogc, OgcLedger,
OperationKind, ProposalId, ProvenanceLedger, Signature, Vote, VoteStance,
};
/// Canonical runtime configuration. Substrate `Config` traits implement when
/// Phase 1.2 ships.
#[derive(Debug, Clone, Copy, Default)]
pub struct RuntimeConfig;
/// Canonical runtime version. Bumped per Substrate runtime upgrade.
pub const RUNTIME_VERSION: u32 = 1;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn runtime_version_starts_at_one() {
assert_eq!(RUNTIME_VERSION, 1);
}
#[test]
fn re_exports_canonical_traits_compile() {
// Smoke test: every re-exported symbol resolves through this crate.
let _ogc = Ogc::ZERO;
let _hash = AssetHash::ZERO;
let _account = AccountId::ZERO;
let _hw = HardwareTier::Desktop;
let _quality = AssetQualityTier::Standard;
let _op = OperationKind::Transfer;
let _stance = VoteStance::Aye;
let _bridge = BridgeDestination::Polkadot;
let _cfg = RuntimeConfig;
}
}