|
1 | | -# CLAUDE.md |
2 | | - |
3 | | -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
4 | | - |
5 | | -## Common Development Commands |
6 | | - |
7 | | -### Building |
8 | | -- **Release build**: `just build` |
9 | | -- **Debug build**: `just build-dev` |
10 | | -- **Build all workspace members**: `just build-all` |
11 | | - |
12 | | -### Testing |
13 | | -- **Run all tests**: `just test` |
14 | | -- **Run tests with output**: `just test-verbose` |
15 | | -- **Unit tests only**: `just test-unit` |
16 | | -- **Integration tests**: `just test-integration` |
17 | | -- **Test specific crate**: `just test-node`, `just test-evolve`, `just test-common` |
18 | | - |
19 | | -### Code Quality |
20 | | -- **Format code**: `just fmt` |
21 | | -- **Check formatting**: `just fmt-check` |
22 | | -- **Run linter**: `just lint` |
23 | | -- **Run all checks**: `just check-all` |
24 | | - |
25 | | -### Running the Node |
26 | | -- **Run with defaults**: `just run` |
27 | | -- **Run with debug logs**: `just run-dev` |
28 | | -- **Direct execution**: `./target/release/ev-reth node --chain <CHAIN_SPEC> --datadir <DATA_DIR> --http --ws` |
29 | | - |
30 | | -## High-Level Architecture |
31 | | - |
32 | | -Ev-reth is a specialized Ethereum execution client built on Reth that integrates with Evolve. The key architectural innovation is accepting transactions directly through the Engine API instead of the traditional mempool. |
33 | | - |
34 | | -### Core Components |
35 | | - |
36 | | -1. **EvolvePayloadBuilder** (`crates/node/src/builder.rs`) |
37 | | - - Accepts transactions from Engine API payload attributes |
38 | | - - Executes transactions and builds blocks |
39 | | - - Manages state transitions |
40 | | - |
41 | | -2. **EvolveEngineTypes** (`bin/ev-reth/src/main.rs`) |
42 | | - - Custom Engine API types supporting transaction submission |
43 | | - - Handles payload attribute validation and processing |
44 | | - |
45 | | -3. **EvolveEngineValidator** (`bin/ev-reth/src/main.rs`) |
46 | | - - Modified validator that bypasses certain checks for Evolve compatibility |
47 | | - - Maintains security while allowing flexible block production |
48 | | - |
49 | | -### Transaction Flow |
50 | | -1. Ev-reth submits transactions via `engine_forkchoiceUpdatedV3` with transactions in payload attributes |
51 | | -2. Transactions are decoded from RLP format and validated |
52 | | -3. Payload builder executes transactions against current state |
53 | | -4. Block is constructed and returned via Engine API |
54 | | - |
55 | | -### Key Design Decisions |
56 | | -- Transactions bypass the mempool entirely, submitted directly via Engine API |
57 | | -- Block validation is relaxed for ev-node produced blocks (hash validation bypassed) |
58 | | -- Custom gas limits can be specified per payload |
59 | | -- Modular workspace structure separates concerns between general node logic and Evolve-specific features |
60 | | - |
61 | | -### Testing Strategy |
62 | | -- Unit tests for individual components |
63 | | -- Integration tests in `crates/tests/` covering: |
64 | | - - Engine API interactions |
65 | | - - Payload building with transactions |
66 | | - - State execution validation |
67 | | - - Evolve-specific scenarios |
| 1 | +See [AGENTS.md](./AGENTS.md) |
0 commit comments