 davidherranandClaude Opus 4.7
|
199636ac05
|
feat(slice-2e): v0.0.36 Slice 2e FULLY RESUELTO — Real WASM_BINARY 1.8 MB shipped (5 layers resolved end-to-end)
Slice 2e WASM structural blocker FULLY RESUELTO end-to-end. Real
origin_chain_runtime.wasm (1,795,946 bytes ~1.8 MB) shipped post-brew LLVM
install + 5 layers de blockers resolved. PHASE 3 + PHASE 4 Testnet Q3 2026
UNBLOCKED.
5-layer resolution:
- Layer 1 alloc/exchange_malloc → WASM_BUILD_STD=0
- Layer 2a getrandom 0.2 wasm → custom feature
- Layer 2b getrandom 0.3 backends → wasm_js feature
- Layer 3 secp256k1-sys clang wasm32 → brew LLVM + CC env vars
- Layer 4 sp-io std leak → default-features=false en path deps
- Layer 5 Vec no_std impl_opaque_keys → alloc::vec::Vec import
Changes:
- Cargo.toml workspace: path deps default-features=false + getrandom_02 + getrandom_03
- runtime/Cargo.toml: substrate-wasm-builder feature-gated + getrandom deps
- runtime/src/opaque.rs: extern crate alloc + use Vec import
Verification:
- WASM_BUILD_STD=0 + brew LLVM env vars + cargo build --features wasm-build → 3.36s clean
- origin_chain_runtime.wasm 1.8 MB shipped
- cargo test --workspace — 202 tests verde 0 failures NO regression
🎉 Slice 2e FULLY RESUELTO. La nave Origin Chain zarpando hacia Phase 3 + 4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-26 18:28:38 -05:00 |
|
 davidherranandClaude Opus 4.6
|
926650308c
|
feat(session): Phase 1.5 — Session rotation 4h epochs canonical v0.0.7
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>
|
2026-05-20 19:40:54 -05:00 |
|
 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 |
|