feat: Reth execution layer integration for the Lean Chain (POC Phases 1-3)#1392
Open
alok-108 wants to merge 6 commits into
Open
feat: Reth execution layer integration for the Lean Chain (POC Phases 1-3)#1392alok-108 wants to merge 6 commits into
alok-108 wants to merge 6 commits into
Conversation
- Add reth crates (node-builder, node-ethereum, chainspec, exex, etc.) - Add alloy-signer-local, alloy-provider, alloy-network - Fix vergen constraint: >=9.0,<9.1 -> >=9.0,<10 - Fix vergen-git2 trait conflict: 1.0 -> >=9.0,<10
- Create patched reth-fs-util with directory fsync gated behind #[cfg(unix)] - Apply via Cargo [patch] section to override upstream crate - Resolves 'os error 5: Access is denied' on Windows NTFS
Phase 1 - Minimal Embedding: - New reth-poc binary target preserves original ream binary - Reth types (ChainSpec, EthereumNode) compile and instantiate Phase 2 - Transaction Lifecycle with ExEx: - Custom ReamExEx listens for ChainCommitted notifications - EIP-1559 tx constructed, signed, and submitted to mempool - Block auto-mined, ExEx confirmation verified - Wallet -> tx -> block -> confirmation demo in single process Phase 3 - State Verification: - Verify sender balance decreased (1 ETH + gas) - Verify receiver balance increased (1 ETH) - Verify nonce incremented (0 -> 1) - Compare genesis vs block ReamLabs#1 state roots Windows fixes included: - Custom thread with 16 MB stack (stack overflow fix) - Disable IPC endpoint (config.rpc.ipcdisable = true) - Custom workspace-local DatadirArgs for permissions - Fix reth-static-file-types for Windows
- run_check.ps1: cargo check with MSVC dev environment - run_demo.ps1: cargo run with MSVC + LIBCLANG_PATH - find_alloys.ps1: helper to list alloy crate versions
- walkthrough.md: complete architecture, verification outputs - task.md: phase-wise completion tracker - Cargo.lock: updated dependency lockfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong?
The Post Quantum spec is currently consensus-only. Ream's blocks carry only attestations, and there is no way for a wallet to submit a transaction against a lean network.
What this PR does
This PR embeds
rethdirectly into the Ream binary as a library, and drives it from inside the lean stack via reth's Execution Extensions (ExEx) framework. One process, no HTTP bridge between Execution and Consensus.Success bar achieved: A working "wallet → tx → block → confirmation" demo on a local lean devnet running as a single binary with reth embedded.
Three Phases Completed
ReamExExVerified Output
🔧 Ream × Reth Integration POC
📦 Node launched successfully in test environment!
📦 ExEx Received ChainCommitted Notification!
Block Number: 1
Transactions count: 1
Tx Hash: 0x4947...3f1a
🔍 State Verification (Post-Execution)
✅ Receiver Balance: 1.00 ETH
✅ Nonce incremented: 0 → 1
✅ State roots differ (genesis ≠ block 1)
🎉 SUCCESS: Transaction processed and confirmed by ExEx inside Ream!
11 Windows-Specific Issues Resolved
vergen version conflict, libclang/MSVC setup, disk space, Unix-specific code patches, fsync crash, stack overflow, IPC socket error, and more. All fixes documented in code.
Next Steps