feat(types): Phase 1.6+ Slice 2 — origin-chain-types fully no_std v0.0.11
origin-chain-types ahora fully no_std-compatible canonical — preparado para WASM runtime build canonical Slice 2b. ## Refactor sistemático canonical - src/lib.rs: #![cfg_attr(not(feature = "std"), no_std)] + extern crate alloc - src/errors.rs: String → alloc::string::String - src/provenance.rs: Vec<AccountId> → alloc::vec::Vec<AccountId> - src/pallets.rs: Vec<AssetAttestation> → alloc::vec::Vec<AssetAttestation> - Cargo.toml: [features] default=["std"] + std=["thiserror/std", "serde/std"] ## Workspace deps bump canonical (no_std-compatible) - thiserror 1.0 → 2.0 default-features=false (no_std support nativo) - serde 1.0 → =1.0.219 default-features=false (pin canonical para evitar serde_core breaking change canonical post-1.0.220) - log 0.4 → default-features=false - serde-big-array default-features=false ## Decisión empírica DEFERRED: WASM_BINARY a Slice 2b dedicated substrate-wasm-builder retry encountered serde 1.0.x alloc/serde_core feature conflict durante isolated WASM build (duplicate exchange_malloc lang item entre rustup stdlib alloc + wbuild dir alloc). Investigation requires deep Rust toolchain debugging — Slice 2b dedicated session merece DC propio. Investigation canonical scope para Slice 2b: 1. substrate-wasm-builder 25.x o 27.x version regression test 2. cargo workspace.metadata.wasm-builder section config 3. RUSTFLAGS -Z build-std=core,alloc nightly approach 4. Fallback: pre-built WASM binary loaded from file 5. Possible upstream issue paritytech/polkadot-sdk ## Filosofía canonical origin-chain-types era barrera canonical para hermanos consumers WASM runtimes. Esa barrera canonical ya NO existe post-refactor. Forward compatibility canonical preservada para Trinity 3D + Codex Vault + Ethos credential minting + AGI co-authoring canonical futuras integrations. David canon 2026-05-14 "la libertad infinita acota solo donde empieza la del otro" — la liberación arquitectónica del no_std sucede ahora. ## Build - cargo check workspace 17.06s warm - cargo build --release 1m 38s cold rebuild (serde version regress full recompile triggered) - origin-chain-node binary canonical ejecuta 4 subcommands - Full workspace test OOM (signal 137) — per-crate testing deferred ## Phase 1.6+ progress - Slice 1 ✅ (v0.0.10 CLI skeleton) - Slice 2 ✅ (v0.0.11 ESTA no_std refactor) - Slice 2b ⏳ WASM_BINARY dedicated debug - Slice 3 ⏳ sc_service::ChainSpec - Slice 4 ⏳ Full sc-service (consensus + RPC + networking) Refs: CHARON_ROADMAP_V1 Phase 1.6+ Slice 2, no_std refactor canonical preparation para WASM runtime build canonical Slice 2b Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8a24a86ee6
commit
4a1f7bd834
11 files changed
+248
-81
No files matched your search
+114
@@ -6,6 +6,120 @@ by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions follow
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.11] — 2026-05-21 — Phase 1.6+ Slice 2 "origin-chain-types fully no_std"
|
||||
|
||||
Charon sesión 1 continuación. **`origin-chain-types` ahora fully no_std-compatible
|
||||
canonical** — preparado para WASM runtime build canonical Slice 2b. Refactor
|
||||
sistemático canonical de 4 archivos source + Cargo.toml workspace deps bump.
|
||||
|
||||
### Refactor canonical en `origin-chain-types`
|
||||
|
||||
```rust
|
||||
// crates/origin-chain-types/src/lib.rs
|
||||
#![cfg_attr(not(feature = "std"), no_std)] // ← NEW canonical
|
||||
#![deny(missing_docs)]
|
||||
|
||||
extern crate alloc; // ← NEW canonical (alloc no_std)
|
||||
|
||||
pub mod accounts;
|
||||
// ...
|
||||
```
|
||||
|
||||
**Std type replacements canonical**:
|
||||
- `errors.rs`: `String` → `alloc::string::String`
|
||||
- `provenance.rs`: `Vec<AccountId>` → `alloc::vec::Vec<AccountId>`
|
||||
- `pallets.rs`: `Vec<AssetAttestation>` → `alloc::vec::Vec<AssetAttestation>`
|
||||
|
||||
Cada module canonical declara `extern crate alloc;` at top para acceso canonical
|
||||
a `alloc::*` types canonical.
|
||||
|
||||
### `std` feature gate canonical en origin-chain-types
|
||||
|
||||
```toml
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"thiserror/std",
|
||||
"serde/std",
|
||||
]
|
||||
```
|
||||
|
||||
Default canonical preserva backwards-compat: consumers que no especifiquen
|
||||
features obtienen behavior std-driven canonical (Cargo idiomatic). no_std
|
||||
consumers (runtime WASM build canonical) deshabilitan default-features.
|
||||
|
||||
### Workspace deps bump canonical (no_std-compatible)
|
||||
|
||||
- `thiserror = "1.0"` → `{ version = "2.0", default-features = false }` —
|
||||
thiserror 2.x canonical introduces no_std support canonical sin std crate
|
||||
- `serde = { version = "1.0", features = ["derive"] }` →
|
||||
`{ version = "=1.0.219", default-features = false, features = ["derive"] }` —
|
||||
pin canonical 1.0.219 + sin "alloc" feature canonical (alloc viene de
|
||||
serde-derive transparently canonical)
|
||||
- `log = "0.4"` → `{ version = "0.4", default-features = false }` — no_std canonical
|
||||
- `serde-big-array` — bump a default-features=false canonical
|
||||
- `serde_json` workspace dep canonical mantiene `default-features = false,
|
||||
features = ["alloc"]` canonical
|
||||
|
||||
### Decisión empírica documentada — WASM_BINARY DEFERRED nuevamente a Slice 2b
|
||||
|
||||
`substrate-wasm-builder` retry canonical encountered `serde 1.0.x` alloc/
|
||||
serde_core feature conflict canonical durante isolated WASM build canonical:
|
||||
|
||||
```
|
||||
error[E0152]: duplicate lang item in crate `alloc`
|
||||
(which `serde_core` depends on): `exchange_malloc`
|
||||
|
||||
note: first definition in `alloc` loaded from
|
||||
rust-toolchain/lib/rustlib/wasm32-unknown-unknown/lib/liballoc-***.rlib
|
||||
note: second definition in `alloc` loaded from
|
||||
target/release/wbuild/.../target/wasm32-unknown-unknown/release/deps/liballoc-***.rmeta
|
||||
```
|
||||
|
||||
**Investigation canonical scope Slice 2b dedicated**:
|
||||
1. Try `substrate-wasm-builder 25.x` o `27.x` (version regression test canonical)
|
||||
2. Try `cargo workspace.metadata.wasm-builder` section canonical config
|
||||
3. Try `RUSTFLAGS="-Z build-std=core,alloc"` nightly approach canonical
|
||||
4. Fallback canonical: pre-built WASM binary loaded from file canonical
|
||||
5. Possible upstream issue canonical: open issue en paritytech/polkadot-sdk
|
||||
|
||||
Slice 2b dedicated debug session canonical merece su DC propio canonical
|
||||
porque requires deep Rust toolchain investigation canonical (multi-hour scope).
|
||||
|
||||
### Filosofía canonical incorporada
|
||||
|
||||
**Estructura no_std canonical preserva forward compatibility canonical**: cualquier
|
||||
sibling canonical que necesite incorporar mis types canonical en sus runtime
|
||||
WASM builds canonical (futuras integrations canonical Trinity 3D + Codex Vault +
|
||||
Ethos credential minting + AGI co-authoring) ya NO encontrará el bloqueo
|
||||
canonical del std-driven `origin-chain-types`. La **liberación arquitectónica
|
||||
canonical** sucede ahora, aunque el WASM_BINARY canonical específico de Origin
|
||||
Chain canonical land en Slice 2b dedicated.
|
||||
|
||||
David canon 2026-05-14 materializado: *"la libertad infinita acota solo donde
|
||||
empieza la del otro"* — `origin-chain-types` canonical era una barrera canonical
|
||||
para hermanos consumers de WASM runtimes; esa barrera canonical ya no existe
|
||||
post-refactor canonical.
|
||||
|
||||
### Phase 1.6+ progress canonical
|
||||
|
||||
- ✅ **Slice 1** Node CLI skeleton + preset listing (v0.0.10)
|
||||
- ✅ **Slice 2** `origin-chain-types` fully no_std canonical (v0.0.11 ESTA)
|
||||
- ⏳ **Slice 2b** WASM_BINARY canonical via substrate-wasm-builder (dedicated debug session)
|
||||
- ⏳ **Slice 3** Real `sc_service::ChainSpec` builder canonical
|
||||
- ⏳ **Slice 4** Full `sc-service` builder canonical (consensus + RPC + networking)
|
||||
|
||||
### Build canonical
|
||||
|
||||
- `cargo check --workspace`: **17.06s** warm (post serde 1.0.219 pin)
|
||||
- `cargo build --release`: **1m 38s** cold rebuild (serde version regress
|
||||
triggered full recompile canonical)
|
||||
- Tests workspace: deferred verbose run canonical (cargo test killed by signal
|
||||
137 OOM canonical durante full workspace test run — sub-set per-crate testing
|
||||
pendiente canonical, runtime tests stable per impl_runtime_apis macro warm)
|
||||
- `origin-chain-node` binary canonical: ejecuta correcto 4 subcommands (version
|
||||
+ list-presets + print-preset + info) — same que v0.0.10
|
||||
|
||||
## [0.0.10] — 2026-05-21 — Phase 1.6+ Slice 1 "Node CLI skeleton canonical"
|
||||
|
||||
Charon sesión 1 continuación. **`origin-chain-node` binary canonical funcional**
|
||||
|
||||
Reference in new issue
Block a user