[PR #1051] [MERGED] feat(evm): inspect offline bytecode interfaces through EVMole #2608

Closed
opened 2026-10-17 21:08:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1051
Author: @N0zoM1z0
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @N0zoM1z0

Base: main ← Head: feat/evm-interface


📝 Commits (5)

  • 648909d feat(evm): inspect offline bytecode interfaces through evmole
  • a5a3353 fix(evm): distinguish unsupported bytecode targets
  • 7392e95 style(evm): format verifier string-prefix checks
  • fd8685f chore: merge latest main into EVM interface
  • 1ad260b Merge remote-tracking branch 'origin/main' into feat/evm-interface

📊 Changes

62 files changed (+3250 additions, -63 deletions)

View changed files

➕ .github/workflows/real-evm-interface.yml (+66 -0)
📝 README.md (+1 -0)
📝 README_ar.md (+1 -1)
📝 README_ja.md (+14 -14)
📝 README_ko.md (+14 -14)
📝 README_zh.md (+14 -14)
📝 docs/architecture.mermaid (+6 -0)
📝 docs/error-contract.schema.json (+55 -0)
➕ docs/evm-bytecode.md (+84 -0)
📝 docs/product-catalog.json (+17 -9)
📝 docs/testing.md (+10 -0)
📝 docs/verification/managed-conformance-manifest.json (+2 -2)
📝 package-lock.json (+13 -0)
📝 package.json (+7 -3)
➕ scripts/fixtures/evm-interface.sol (+12 -0)
📝 scripts/lib/catalog-builders.mjs (+8 -1)
📝 scripts/lib/catalog-core.mjs (+2 -0)
📝 scripts/lib/module-boundaries.mjs (+1 -0)
➕ scripts/verify-evm-interface.mjs (+577 -0)
📝 skills/reverse-engineer-anything/SKILL.md (+8 -3)

...and 42 more files

📄 Description

Summary

Refs #972. First independent EVM capability: offline interface recovery from an explicit local raw/hex carrier. CFG/decompilation, metadata/proxy/state relationships and execution/traces remain separate increments.

  • Reuse unchanged lockfile-pinned EVMole 0.9.3 JS/WASM; retain original MIT license and commit/integrity provenance. No engine fork, signature service or chain dependency.
  • Separate pure portable contracts, application port/shared Evidence, named CLI/MCP adapters and an owned engine worker. No provider protocol in domain/application layers or import-time WASM I/O.
  • Preserve carrier SHA-256/size/encoding and decoded SHA-256/full bytes inline; SHA-256 is explicitly not Ethereum Keccak. Retain producer representation and metadata limitations.
  • Label selectors, offsets, arguments and mutability as inferences; preserve duplicates and selector zero. Kind, deployment authenticity, hardfork and completeness remain unknown.
  • Own snapshots/process cleanup, diagnostic truncation and typed failures. Bound input/reply/diagnostics/heap/time/address space; preserve tighter inherited limits and original hard limits. Configured settings are separate from unprobed effective limits. Reserved EFBIG exits require matching private failure-branch evidence; bare launcher exits remain unverified.
  • Add guides and conditional real-tool CI. Initial verified profile: Linux x64, util-linux prlimit. No RPC, explorer, wallet, broadcasting or target runtime execution authority.

CLI / MCP

rea inspect-evm-interface ./runtime.hex hex --json
{"name":"inspect_evm_interface","arguments":{"path":"/artifacts/runtime.hex","encoding":"hex"}}

Full normalized result and Evidence are inline; raw producer values remain retained.

Verification

  • Latest focused domain/error/service/provider/SDK/schema/catalog checks: 96 passed, one host skip across11 files. Integrated latest main c5d165bd, including dylib resolution and the Korean README contribution; catalog138 tools and skill version32 are aligned. Integration-focused checks: 29 passed across five files, static/format/generated docs passed.
  • npm run check:fast; npm run docs:check; npm run verify:test-discovery (all568 files exactly once).
  • Fresh npm pack / isolated installation: original license and worker included; reference clones, private plans and binary fixtures excluded.
  • 58 actual installed CLI/MCP/exec/socket cases passed with unchanged solc 0.8.30 plain/optimized/viaIR Cancun fixtures: exact selectors, inference candidates, raw/hex identities, selector zero/PUSH data, empty/truncated code, malformed carriers, EF00, inherited lower limits, missing/broken launchers, EFBIG and unmarked exit 76.
  • Fresh current-head installed smoke: eight valid/EF00 raw/hex CLI/MCP cases plus138-tool inventory passed, with inputs unchanged and descendants empty. Compiled engine/domain/application bytes exactly match the earlier complete58-case installed proof.
  • SIGXCPU launcher-fault cases test diagnostics, not actual WASM CPU exhaustion. File-size fixtures run the actual WASM worker with a one-byte allowance. Missing/wrong marker and late cancellation/output preservation have deterministic regressions.
  • Representative exec/socket observations found no target host launch or attempted network requests; this is fixture evidence, not a network sandbox claim. Inputs unchanged and verifier descendants empty.

Hopper/Ghidra were not run; this capability is independent. No private game data/bytecode binaries committed; only source-owned Solidity fixtures. Merge waits for current-head CI and review.

Review follow-up

EF00 markers now return additive unsupported_target code/category, with operation, selected path, format reason, captured diagnostics and target-specific recovery. Provider/configuration failures retain their distinct classifications. Shared error schema and generated documents are aligned. Latest error/provider/SDK/schema focused checks: 58 passed, one host skip; static/docs passed. Fresh isolated package: eight valid/EF00 raw/hex CLI/MCP cases passed, originals unchanged and descendants empty. Both earlier raw/hex false provider classifications reproduced against the previous installed package. The format-failure and cleanup regressions remain covered.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1051 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `feat/evm-interface` --- ### 📝 Commits (5) - [`648909d`](https://github.com/morluto/rea/commit/648909d0f422daabbd98141887e05d0f2dcd91e0) feat(evm): inspect offline bytecode interfaces through evmole - [`a5a3353`](https://github.com/morluto/rea/commit/a5a335307fc2efb28268e5bbe3e3381ffd3082b7) fix(evm): distinguish unsupported bytecode targets - [`7392e95`](https://github.com/morluto/rea/commit/7392e956fa19cda5bec4df6e9f727bea899765e3) style(evm): format verifier string-prefix checks - [`fd8685f`](https://github.com/morluto/rea/commit/fd8685fb37f1da1c2a39c4d7f7b05ff7ccd6e455) chore: merge latest main into EVM interface - [`1ad260b`](https://github.com/morluto/rea/commit/1ad260b0f488556aaba39b62e5114608b80b3254) Merge remote-tracking branch 'origin/main' into feat/evm-interface ### 📊 Changes **62 files changed** (+3250 additions, -63 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/real-evm-interface.yml` (+66 -0) 📝 `README.md` (+1 -0) 📝 `README_ar.md` (+1 -1) 📝 `README_ja.md` (+14 -14) 📝 `README_ko.md` (+14 -14) 📝 `README_zh.md` (+14 -14) 📝 `docs/architecture.mermaid` (+6 -0) 📝 `docs/error-contract.schema.json` (+55 -0) ➕ `docs/evm-bytecode.md` (+84 -0) 📝 `docs/product-catalog.json` (+17 -9) 📝 `docs/testing.md` (+10 -0) 📝 `docs/verification/managed-conformance-manifest.json` (+2 -2) 📝 `package-lock.json` (+13 -0) 📝 `package.json` (+7 -3) ➕ `scripts/fixtures/evm-interface.sol` (+12 -0) 📝 `scripts/lib/catalog-builders.mjs` (+8 -1) 📝 `scripts/lib/catalog-core.mjs` (+2 -0) 📝 `scripts/lib/module-boundaries.mjs` (+1 -0) ➕ `scripts/verify-evm-interface.mjs` (+577 -0) 📝 `skills/reverse-engineer-anything/SKILL.md` (+8 -3) _...and 42 more files_ </details> ### 📄 Description ## Summary Refs #972. First independent EVM capability: offline interface recovery from an explicit local raw/hex carrier. CFG/decompilation, metadata/proxy/state relationships and execution/traces remain separate increments. - Reuse unchanged lockfile-pinned EVMole 0.9.3 JS/WASM; retain original MIT license and commit/integrity provenance. No engine fork, signature service or chain dependency. - Separate pure portable contracts, application port/shared Evidence, named CLI/MCP adapters and an owned engine worker. No provider protocol in domain/application layers or import-time WASM I/O. - Preserve carrier SHA-256/size/encoding and decoded SHA-256/full bytes inline; SHA-256 is explicitly not Ethereum Keccak. Retain producer representation and metadata limitations. - Label selectors, offsets, arguments and mutability as inferences; preserve duplicates and selector zero. Kind, deployment authenticity, hardfork and completeness remain unknown. - Own snapshots/process cleanup, diagnostic truncation and typed failures. Bound input/reply/diagnostics/heap/time/address space; preserve tighter inherited limits and original hard limits. Configured settings are separate from unprobed effective limits. Reserved EFBIG exits require matching private failure-branch evidence; bare launcher exits remain unverified. - Add guides and conditional real-tool CI. Initial verified profile: Linux x64, util-linux prlimit. No RPC, explorer, wallet, broadcasting or target runtime execution authority. ## CLI / MCP ```sh rea inspect-evm-interface ./runtime.hex hex --json ``` ```json {"name":"inspect_evm_interface","arguments":{"path":"/artifacts/runtime.hex","encoding":"hex"}} ``` Full normalized result and Evidence are inline; raw producer values remain retained. ## Verification - Latest focused domain/error/service/provider/SDK/schema/catalog checks: **96 passed, one host skip across11 files**. Integrated latest main `c5d165bd`, including dylib resolution and the Korean README contribution; catalog138 tools and skill version32 are aligned. Integration-focused checks: **29 passed across five files**, static/format/generated docs passed. - `npm run check:fast`; `npm run docs:check`; `npm run verify:test-discovery` (all568 files exactly once). - Fresh `npm pack` / isolated installation: original license and worker included; reference clones, private plans and binary fixtures excluded. - **58 actual installed CLI/MCP/exec/socket cases passed** with unchanged solc 0.8.30 plain/optimized/viaIR Cancun fixtures: exact selectors, inference candidates, raw/hex identities, selector zero/PUSH data, empty/truncated code, malformed carriers, EF00, inherited lower limits, missing/broken launchers, EFBIG and unmarked exit 76. - Fresh current-head installed smoke: **eight valid/EF00 raw/hex CLI/MCP cases plus138-tool inventory passed**, with inputs unchanged and descendants empty. Compiled engine/domain/application bytes exactly match the earlier complete58-case installed proof. - SIGXCPU launcher-fault cases test diagnostics, not actual WASM CPU exhaustion. File-size fixtures run the actual WASM worker with a one-byte allowance. Missing/wrong marker and late cancellation/output preservation have deterministic regressions. - Representative exec/socket observations found no target host launch or attempted network requests; this is fixture evidence, not a network sandbox claim. Inputs unchanged and verifier descendants empty. Hopper/Ghidra were not run; this capability is independent. No private game data/bytecode binaries committed; only source-owned Solidity fixtures. Merge waits for current-head CI and review. ### Review follow-up EF00 markers now return additive `unsupported_target` code/category, with operation, selected path, format reason, captured diagnostics and target-specific recovery. Provider/configuration failures retain their distinct classifications. Shared error schema and generated documents are aligned. Latest error/provider/SDK/schema focused checks: **58 passed, one host skip**; static/docs passed. Fresh isolated package: **eight valid/EF00 raw/hex CLI/MCP cases passed**, originals unchanged and descendants empty. Both earlier raw/hex false provider classifications reproduced against the previous installed package. The format-failure and cleanup regressions remain covered. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:08:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2608
No description provided.