Files
arkhe-origin-chain/crates/origin-chain-runtime
davidherran 86d9251908 feat(revive): v0.0.39 — pallet-revive wired runtime Index 11 (22 Config types + GenesisConfig + WASM rebuild) 🎉🎉
Ship 2 v0.0.39 SHIPPED — pallet-revive 0.10.1 integration end-to-end post
Ship 1.5 v0.0.38 workspace bump stable2509-3 atómico. SBS-5 ratificado
(supersedes CHN-6 v1.0): smart contracts PolkaVM RISC-V + ink! v6 + Solidity
deployables canonical post Slice 3.1 SCAFFOLD COMPLETE pending Ship 3+4
(v0.0.40 integration tests + v0.0.41 ReviveApi).

Cambios:
- Cargo.toml workspace.dependencies: pallet-revive 0.10.1 crates.io
  (NOT git source — git source pulled duplicate frame-system/sp-runtime copies
  rompiendo trait bounds canonical. Crates.io 0.10.1 deps match workspace
  bumped stable2509-3 generation clean canonical empírico).
- crates/origin-chain-runtime/Cargo.toml: pallet-revive added dep + features.std.
- crates/origin-chain-runtime/src/lib.rs: Runtime macro Index 11 added
  `pub type Revive = pallet_revive::Pallet<Runtime>` canonical.
- crates/origin-chain-runtime/src/configs.rs: pallet_revive::Config impl con
  22 associated types per pallet-revive 0.10.1 docs.rs canonical surface:
  * Runtime types: RuntimeEvent, RuntimeCall, RuntimeHoldReason
  * Currency/Balance: Currency=Balances, Time=Timestamp, WeightPrice=TransactionPayment
  * Storage/Deposit: DepositPerByte=MILLI_OGC, DepositPerItem=OGC,
    CodeHashLockupDepositPercent=30%
  * EVM/Mapping: AddressMapper=AccountId32Mapper, ChainId=9_120_005 (EIP-155
    unique Origin Metaverse), NativeToEthRatio=1_000_000 (OGC 12 dec → ETH 18),
    AllowEVMBytecode=true, EthGasEncoder=()
  * Precompiles=() Slice 3.1 SCAFFOLD interim
  * Limits: WeightInfo=SubstrateWeight, RuntimeMemory=128 MB, PVFMemory=2 GB
    (per integrity_test formula `storage_limit = (PVFMemory-RuntimeMemory)/2`
    needed PVFMemory > 1.5 GB para pass max_storage_size ~650 MB check)
  * Access Control: UploadOrigin=EnsureSigned, InstantiateOrigin=EnsureSigned
  * Safety: FindAuthor=() (no pallet_authorship), UnsafeUnstableInterface=false
- crates/origin-chain-runtime/src/genesis_config_presets.rs: ReviveConfig::default()
  added a build_genesis canonical (Slice 3.1 SCAFFOLD: no pre-mapped accounts,
  no genesis contracts — Phase 3.x maduración añade dev mapped_accounts +
  templates contracts Slices 3.2-3.6).

API diffs encontrados empírico pallet-revive 0.10.1 vs 0.12.2 audit inicial:
- 0.10.1 NO expone: RuntimeOrigin, DebugEnabled, FeeInfo, MaxEthExtrinsicWeight,
  GasScale, DepositPerChildTrieItem (todos added en 0.12+ Asset Hub generation).
- 0.10.1 SÍ require: WeightPrice (Convert<Weight, Balance>) + EthGasEncoder
  (gas conversion helper) — NO en 0.12.2 audit anterior.

Verificación:
- cargo check --workspace clean (warnings pre-existentes deprecated patterns)
- cargo test --workspace: 203 tests verde 0 failures NO regresiones
- cargo build --features wasm-build: WASM_BINARY 2.8 MB shipped clean
  (grew from 1.8 MB v0.0.36 baseline — +1 MB pallet-revive PolkaVM bytecode)
- Runtime integrity test (__construct_runtime_integrity_test) PASS post memory
  tuning empírico-validated (16/16 runtime tests verde).

Próximo Ship 3 v0.0.40: pallet-revive real impl + 10 integration tests E2E
(upload_code + instantiate + bare_call + storage deposit + AddressMapper +
gas metering + access control + ChainId EIP-155 + contract destruction).

⚓ Phase 3 Slice 3.1 Ship 2/4 SHIPPED. La nave entra zone canonical smart contracts.

🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 08:36:24 -05:00
..