From ec4beb38e9f4d0d64411a4ab271da7d8dd698361 Mon Sep 17 00:00:00 2001 From: Giovanni Vignone <72773059+giovannivignone@users.noreply.github.com> Date: Fri, 30 Dec 2022 13:28:46 -0800 Subject: [PATCH] docs: architectural Diagram (#161) * adding documentation for rpc.md * adding rpc methods in table for rpc.md * adjusting readme to link to rpc.md * fixing grammar * grammar * adding RPC Methods according to documentation and listing column as Client Function * adding more description space * undoing description spacing * adding get block transaction count by hash to node.rs and rpc.rs * functioning getblocktransactioncountbyhash function * removing documentation * adding second rpc method and simplifying logic * adjusting example and node.rs * formatting * fixing clippy errors * adding to client and to rpc.md * formatting * integrating into client * u64 return types, rpc.md updated to get_nonce, get_transaction_count -> get_nonce revert * cargo fmt * readme architecture init * removing blockchain * removing complexity * updating mermaid with links from evm -> execution, renaming, and recoloring * coloring letters black * removing uncessary styling and adding untrustedexecutionrpc and untrustedconsensusrpc --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 724f833..f3f0fbd 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,43 @@ async fn main() -> Result<()> { } ``` +## Architecture +```mermaid +graph LR + +Client ----> Rpc +Client ----> Node +Node ----> ConsensusClient +Node ----> ExecutionClient +ExecutionClient ----> ExecutionRpc +ConsensusClient ----> ConsensusRpc +Node ----> Evm +Evm ----> ExecutionClient +ExecutionRpc --> UntrustedExecutionRpc +ConsensusRpc --> UntrustedConsensusRpc + +classDef node fill:#f9f,stroke:#333,stroke-width:4px, color:black; +class Node,Client node +classDef execution fill:#f0f,stroke:#333,stroke-width:4px; +class ExecutionClient,ExecutionRpc execution +classDef consensus fill:#ff0,stroke:#333,stroke-width:4px; +class ConsensusClient,ConsensusRpc consensus +classDef evm fill:#0ff,stroke:#333,stroke-width:4px; +class Evm evm +classDef providerC fill:#ffc +class UntrustedConsensusRpc providerC +classDef providerE fill:#fbf +class UntrustedExecutionRpc providerE +classDef rpc fill:#e10 +class Rpc rpc + + +subgraph "External Network" +UntrustedExecutionRpc +UntrustedConsensusRpc +end +``` + ## Benchmarks Benchmarks are defined in the [benches](./benches/) subdirectory. They are built using the [criterion](https://github.com/bheisler/criterion.rs) statistics-driven benchmarking library.