From db7834dd51df1fcfe00f43a8e183bbe08492347e Mon Sep 17 00:00:00 2001 From: Pana Date: Fri, 6 Sep 2024 19:46:44 +0800 Subject: [PATCH] Update layout doc (#10739) --- docs/repo/layout.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/repo/layout.md b/docs/repo/layout.md index 28ea9f473..ddc1af132 100644 --- a/docs/repo/layout.md +++ b/docs/repo/layout.md @@ -19,8 +19,10 @@ Generally reth is composed of a few components, with supporting crates. The main - [RPC](#rpc) - [Transports](#transports) - [Common](#common-1) + - [Utilities Crates](#utilities-crates) - [Payloads](#payloads) - [Primitives](#primitives) + - [Optimism](#optimism) - [Misc](#misc) The supporting crates are split into two categories: [primitives](#primitives) and [miscellaneous](#misc). @@ -87,7 +89,10 @@ Different consensus mechanisms. Crates related to transaction execution. -- [`revm`](../../crates/revm): An implementation of an executor using `revm` +- [`revm`](../../crates/revm): Revm utils and implementations specific to reth. +- [`evm`](../../crates/evm): Traits for configuring an EVM specifics. +- [`execution-types`](../../crates/evm/execution-types): Commonly used types for (EVM) block execution. +- [`execution-errors`](../../crates/evm/execution-errors): Commonly used error types used when doing block execution. ### Sync @@ -110,13 +115,15 @@ The RPC component mainly lives in [`rpc/rpc`](../../crates/rpc/rpc), which imple - `txpool_` - `web3_` +These RPC interface is defined in [`rpc/rpc-api`](../../crates/rpc/rpc-api). + The engine API ([`engine_`][engine-spec]) lives in [`rpc/rpc-engine-api`](../../crates/rpc/rpc-engine-api) (this is *not* an interface crate despite the confusing name). There is also a crate to easily configure an RPC server: [`rpc/rpc-builder`](../../crates/rpc/rpc-builder). #### Transports -The RPC component is based on the `jsonrpsee` crate which provides JSONRPC over WebSockets and HTTP. +The RPC component is based on the [`jsonrpsee`][jsonrpsee] crate which provides JSONRPC over WebSockets and HTTP. The IPC transport lives in [`rpc/ipc`](../../crates/rpc/ipc). @@ -126,6 +133,15 @@ The IPC transport lives in [`rpc/ipc`](../../crates/rpc/ipc). - Supported transports: HTTP, WS, IPC - Supported namespaces: `eth_`, `engine_`, `debug_` - [`rpc/rpc-types`](../../crates/rpc/rpc-types): Types relevant for the RPC endpoints above, grouped by namespace +- [`rpc/rpc-eth-api`](../../crates/rpc/rpc-eth-api/): Reth RPC 'eth' namespace API (including interface and implementation), this crate is re-exported by `rpc/rpc-api` +- [`rpc/rpc-eth-types`](../../crates/rpc/rpc-eth-types/): Types `supporting implementation` of 'eth' namespace RPC server API +- [`rpc/rpc-server-types`](../../crates/rpc/rpc-server-types/): RPC server types and constants + +#### Utilities Crates + +- [`rpc/rpc-types-compat`](../../crates/rpc-types-compat): This crate various helper functions to convert between reth primitive types and rpc types. +- [`rpc/layer`](../../crates/rpc/rpc-layer/): Some RPC middleware layers (e.g. `AuthValidator`, `JwtAuthValidator`) +- [`rpc/rpc-testing-util`](../../crates/rpc/rpc-testing-util/): Reth RPC testing helpers ### Payloads @@ -140,8 +156,13 @@ Crates related to building and validating payloads (blocks). These crates define primitive types or algorithms. - [`primitives`](../../crates/primitives): Commonly used types in Reth. +- [`primitives-traits`](../../crates/primitives-traits/): Common abstracted types in reth. - [`trie`](../../crates/trie): An implementation of a Merkle Patricia Trie used for various roots (e.g. the state root) in Ethereum. +### Optimism + +Crates related to the Optimism rollup are lives in [optimism](../../crates/optimism/). + ### Misc Small utility crates.