informalsystems / informalsystems/emerald

add `crates/execution/evm` (move engine + EVM code, impl trait)

Open
#222 0 comments 0 reactions 1 assignee Claimed by @rnbguy View on GitHub
Dominant language
Rust
Stars
25
Forks
9
PR merge metrics
No merged PRs in 30d

Description

move all Engine API / EVM code into `crates/execution/evm` and implement `ExecutionLayer` for `EvmExecutionLayer`. old crate locations become re-export shims so nothing downstream breaks.

### what moves

| source | destination |
|--------|-------------|
| `engine/src/engine.rs` | `crates/execution/evm/src/engine.rs` |
| `engine/src/engine_rpc.rs` | `crates/execution/evm/src/engine_rpc.rs` |
| `engine/src/ethereum_rpc.rs` | `crates/execution/evm/src/ethereum_rpc.rs` |
| `engine/src/auth.rs` | `crates/execution/evm/src/auth.rs` |
| `engine/src/json_structures.rs` | `crates/execution/evm/src/json_structures.rs` |
| `app/src/validators.rs` | `crates/execution/evm/src/validators.rs` |
| `app/src/payload.rs` | `crates/execution/evm/src/payload.rs` |

### new files

- `execution_layer.rs` - `EvmExecutionLayer` struct + `impl ExecutionLayer`
- `block.rs` - `EvmBlock` wrapper (holds `ExecutionPayloadV3` + `ExecutionBlock` metadata)
- `config.rs` - `EvmConfig` (absorbs `EthereumConfig`, fee_recipient, retry, fork detection)
- `error.rs` - `EvmError`

### things absorbed inside `EvmExecutionLayer`

- `RetryConfig` (retry logic)
- `fee_recipient` (block building)
- `Fork` / `ChainConfig` (hardfork scheduling)
- `ValidatedPayloadCache` (redundant newPayload avoidance)
- `check_capabilities()` (engine API handshake at construction)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.