Files
arkhe-origin-chain/crates/origin-chain-runtime/Cargo.toml
T
davidherranandClaude Opus 4.6 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>
2026-05-20 19:34:34 -05:00

90 lines
2.6 KiB
TOML

[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 canonical. Pilar 4: System+Balances+Timestamp+TransactionPayment+Aura+Grandpa pallets integrated (Phase 1.4 v0.0.6 consensus PoA per CHN-1). Roadmap: session+identity+provenance+ink!+bridges+governance progressivos."
[dependencies]
# Origin Chain canonical traits + types
origin-chain-types.workspace = true
# Substrate Primitives canonical (SBS-1 polkadot-stable2512-3)
sp-core.workspace = true
sp-runtime.workspace = true
sp-std.workspace = true
sp-version.workspace = true
sp-api.workspace = true
sp-block-builder.workspace = true
sp-inherents.workspace = true
# Consensus primitives canonical (Phase 1.4 per CHN-1 Aura+GRANDPA)
sp-consensus-aura.workspace = true
sp-consensus-grandpa.workspace = true
# FRAME canonical
frame-system.workspace = true
frame-support.workspace = true
frame-executive.workspace = true
frame-metadata-hash-extension.workspace = true
# FRAME pallets Phase 1.3 (per SBS-4 ratified)
pallet-balances.workspace = true
pallet-timestamp.workspace = true
pallet-transaction-payment.workspace = true
# FRAME pallets Phase 1.4 — Consensus PoA per CHN-1 ratified
pallet-aura.workspace = true
pallet-grandpa.workspace = true
# SCALE codec canonical
parity-scale-codec.workspace = true
scale-info.workspace = true
# Logging
log.workspace = true
# Serialization opcional
serde = { workspace = true, optional = true }
[features]
default = ["std"]
std = [
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
"sp-version/std",
"sp-api/std",
"sp-block-builder/std",
"sp-inherents/std",
"sp-consensus-aura/std",
"sp-consensus-grandpa/std",
"frame-system/std",
"frame-support/std",
"frame-executive/std",
"frame-metadata-hash-extension/std",
"pallet-balances/std",
"pallet-timestamp/std",
"pallet-transaction-payment/std",
"pallet-aura/std",
"pallet-grandpa/std",
"parity-scale-codec/std",
"scale-info/std",
"serde",
]
runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-transaction-payment/runtime-benchmarks",
# pallet-aura 39.0.0 + pallet-grandpa 40.0.0 NO exponen feature
# runtime-benchmarks en stable2512 canonical. Wire-up canonical Phase 1.5+
# cuando pallet_session se integre + benchmark scaffolding land.
"pallet-grandpa/try-runtime",
]