Files
arkhe-origin-chain/Cargo.toml
T
davidherran ec5b5bd2b2 feat(revive): v0.0.37 — pallet-revive workspace scaffold + ChainAction Phase 3 extension 🎉
Phase 3 Slice 3.1 Ship 1 SCAFFOLD shipped. Path A inicio post sesión 3+
extended histórica (35 ships v0.0.1→v0.0.36 + Slice 2e WASM RESUELTO). David
autorizó "vamos con todas en orden desde A" — pallet-revive smart contracts
PolkaVM RISC-V + ink! v6 + Solidity per SBS-5 ratificado (supersedes CHN-6 v1.0).

Cambios:
- Cargo.toml workspace.dependencies: pallet-revive 0.12.2 + pallet-revive-uapi 0.13.0
  Version pin canonical para stable2512-3 verificado vía
  github.com/paritytech/polkadot-sdk/blob/polkadot-stable2512-3/substrate/frame/revive/Cargo.toml
  (latest 0.17.0 requiere bump Substrate generation — scope Phase 8+).
- crates/origin-chain-types/src/actions.rs: ChainAction enum extension OCAFB-2
  semver-respecting con 3 nuevas variants ordinals 4/5/6:
  * DeployContract (pallet-revive::instantiate)
  * CallContract (pallet-revive::call)
  * UploadContractCode (pallet-revive::upload_code sin instantiate)
  Ordinals 0-3 {Read/Write/Compute/Transfer} preservados intactos. Wire format
  stable canonical — name() snake_case + ordinal() u8 + from_ordinal() forward-compat
  + serde + scale-codec roundtrip todos actualizados. +1 test
  chain_action_phase_3_variants_distinct_from_legacy.
- crates/origin-chain-fees/src/fee_schedule.rs: subsidy_basis_points + entitlement_unlocked
  matches updated exhaustivamente para 3 nuevas variants. Mapping interim conservador
  (DeployContract/UploadContractCode ~= Write semantics, CallContract ~= Compute).
  Refinement Phase 3.2 con Mathi OitFeeSchedule extension post-OCAFB ratify +
  measurements empíricos gas/deposit reales.

Verificación:
- cargo check --workspace clean (0 errors, warnings pre-existentes)
- cargo test --workspace: 203 tests verde (baseline 202 + 1 new test) 0 failures
- ChainAction actions::tests 7/7 verde (4 originales updated + 3 nuevos covered)

Próximo Ship 2 v0.0.38: pallet-revive wired runtime Index 11 (27 Config types
associated types + parameter_types canonical Asset Hub Westend reference).

⚓ Path A Phase 3 kickoff. La nave continúa zarpando.

🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 20:29:11 -05:00

209 lines
11 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-fees",
"crates/origin-chain-agent-identity",
"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 = "38.1.0", default-features = false }
sp-genesis-builder = { version = "0.17.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 }
# ============================================================
# Phase 3 — pallet-revive smart contracts per SBS-5 ratified
# (supersedes CHN-6 v1.0 → CHN-6 v2.0 PolkaVM + ink! v6 + Solidity)
# Version pin: 0.12.2 (canonical para stable2512-3, verified vía
# github.com/paritytech/polkadot-sdk/blob/polkadot-stable2512-3/substrate/frame/revive/Cargo.toml).
# Bump a 0.17.0 scope Phase 8+ (post-mainnet Substrate generation upgrade).
# ============================================================
pallet-revive = { version = "0.12.2", default-features = false }
pallet-revive-uapi = { version = "0.13.0", default-features = false, features = ["scale"] }
# pallet-identity DEFERRED a Phase 2.7 — canonical decision empírica 2026-05-21:
# pallet-identity 41.0.0 usa ReservableCurrency trait (deprecated en stable2512,
# replaced por fungible::Mutate). Compat work canonical es scope Phase 2.7 cuando
# se introduce `pallet_agent_identity` custom canonical (Inmutable #41 AGI DID).
# pallet-identity = { version = "41.0.0", default-features = false }
# RuntimeAPI canonical (consumed by node binary + RPC server Phase 1.6+)
frame-system-rpc-runtime-api = { version = "36.0.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { version = "40.0.0", default-features = false }
# Genesis canonical Phase 1.7 — chain_spec BM V2 allocation
# Nota canonical 2026-05-21: sp-keyring NO incluido — version conflict canonical
# con sp_core stable2512 (sp-keyring 42 trae sp_core diferente). En su lugar,
# hardcodeo canonical bytes de Substrate well-known dev accounts canonical
# (Alice/Bob/Charlie/Dave/Eve) en genesis_config_presets.rs — same canonical
# values que sp-keyring usaría but sin la dep brittle canonical.
serde_json = { version = "1", default-features = false, features = ["alloc"] }
# WASM builder canonical (Phase 1.6+ runtime WASM build para chain_spec)
substrate-wasm-builder = { version = "26.0.1" }
# Substrate client canonical (Phase 1.6+ node binary service builder)
sc-cli = { version = "0.51.0" }
sc-service = { version = "0.50.0" }
# Slice 3 (v0.0.13) canonical — `sc_chain_spec::GenericChainSpec` builder canonical
# para Phase 1.6+ ChainSpec serialization. Pattern canonical mock-WASM fallback:
# `ChainSpec::builder(MOCK_WASM, None).with_genesis_config_patch(preset_json)`
# bypassa runtime WASM execution — depends on Slice 2c land canonical solo para
# `node run` real (Slice 4 territory). JSON serialization funciona canonical.
# sc-chain-spec canonical EVITADA Slice 3 (see comentario superior canonical)
sc-executor = { version = "0.42.0" }
sc-network = { version = "0.49.1" }
sc-consensus = { version = "0.48.0" }
sc-consensus-aura = { version = "0.49.0" }
sc-consensus-grandpa = { version = "0.34.0" }
sc-transaction-pool = { version = "39.0.0" }
sc-transaction-pool-api = { version = "39.0.0" }
sc-client-api = { version = "39.0.0" }
sc-basic-authorship = { version = "0.49.0" }
sc-telemetry = { version = "28.1.0" }
sc-offchain = { version = "44.0.0" }
# RPC server canonical (jsonrpsee)
jsonrpsee = { version = "0.24.3", features = ["server"] }
substrate-frame-rpc-system = { version = "43.0.0" }
pallet-transaction-payment-rpc = { version = "43.0.0" }
# CLI + async canonical
clap = { version = "4.5.13", features = ["derive"] }
futures = { version = "0.3.31", features = ["thread-pool"] }
# SCALE codec canonical (canonical Substrate serialization)
parity-scale-codec = { version = "3.7", default-features = false, features = ["derive", "max-encoded-len"] }
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
# ============================================================
# no_std-compatible canonical (Slice 2 — required by substrate-wasm-builder WASM runtime build)
thiserror = { version = "2.0", default-features = false }
# serde pin canonical =1.0.217 — mínima version compatible con frame-support
# 40.1.0 canonical (requires ^1.0.217). Slice 2b investigation registered
# canonical: 1.0.217 NO resuelve WASM build alloc conflict canonical — issue
# es estructural Cargo + substrate-wasm-builder + rustup precompiled alloc.
# Slice 2c canonical requires Larihana Substrate-adjacent expertise canonical.
serde = { version = "=1.0.217", default-features = false, features = ["derive"] }
log = { version = "0.4", default-features = false }
# ============================================================
# Internal crates canonical (workspace path deps)
# ============================================================
origin-chain-types = { path = "crates/origin-chain-types", version = "0.0.1", default-features = false }
origin-chain-consensus = { path = "crates/origin-chain-consensus", version = "0.0.1", default-features = false }
origin-coin-tokenomics = { path = "crates/origin-coin-tokenomics", version = "0.0.1", default-features = false }
origin-chain-provenance = { path = "crates/origin-chain-provenance", version = "0.0.1", default-features = false }
origin-chain-fees = { path = "crates/origin-chain-fees", version = "0.0.1", default-features = false }
origin-chain-agent-identity = { path = "crates/origin-chain-agent-identity", version = "0.0.1", default-features = false }
origin-chain-bridges = { path = "crates/origin-chain-bridges", version = "0.0.1", default-features = false }
origin-chain-governance = { path = "crates/origin-chain-governance", version = "0.0.1", default-features = false }
origin-chain-runtime = { path = "crates/origin-chain-runtime", version = "0.0.1", default-features = false }
origin-chain-node = { path = "crates/origin-chain-node", version = "0.0.1" }
# ============================================================
# Slice 2e v0.0.35 — canonical [patch.crates-io] WASM dependency overrides
# ============================================================
#
# Empirical finding canonical 2026-05-26: getrandom 0.2.17 default config NO
# compatible canonical wasm32-unknown-unknown target. Substrate runtime WASM
# requires custom canonical RNG source canonical, NOT browser JS fallback.
#
# Patch canonical: enable getrandom `custom` feature para permit FRAME runtime
# provide RNG via sp-io::offchain (off-chain worker) o panic placeholder
# (no on-chain RNG needed para Phase 1.6 ChainSpec build).
# ============================================================
# Slice 2e v0.0.36 — Direct getrandom deps para activate `custom` feature
# via Cargo feature unification (both 0.2 + 0.3 transitive in FRAME stack).
# ============================================================
#
# Empirical Slice 2e investigation:
# - getrandom 0.2.17 transitive via const-random-macro → frame-support-procedural
# - getrandom 0.3.4 transitive via ahash → schnellru → sp-trie → frame-support
#
# Cargo feature unification ensures wasm32-unknown-unknown target compat
# vía custom RNG source (FRAME runtime provides via sp-io).
#
# `custom` feature activates pre-0.3 versions; `std` para 0.3+ branches.
getrandom_02 = { package = "getrandom", version = "0.2", default-features = false, features = ["custom"] }
getrandom_03 = { package = "getrandom", version = "0.3", default-features = false, features = ["wasm_js"] }
[profile.release]
# Slice 2b finding canonical: lto/codegen-units customization triggers alloc
# recompile en wbuild → duplicate exchange_malloc lang item canonical. Defaults
# canonical preservan stdlib alloc cache canonical sin recompile.
opt-level = 3
[profile.dev]
opt-level = 1