From a55d39cbabb21ac92940da6013a8945212ffa805 Mon Sep 17 00:00:00 2001 From: musitdev Date: Tue, 1 Aug 2023 17:21:20 +0200 Subject: [PATCH] put in separate file --- docs/architecture.md | 50 ++++++++++++++++++++++++++++++ docs/rpcv2.md | 5 +++ docs/tasks.md | 72 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 docs/architecture.md create mode 100644 docs/tasks.md diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 00000000..d2bfa861 --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,50 @@ +## Architecture + +``` mermaid +flowchart TB + rpc(RPC access) + sup(Supervisor loop) + sol(Solana connector) + block(block processor) + blstore(Block storage) + tx(Tx processing) + sendtx(Send TX TPU) + clus(Cluster processing) + clusstore(Cluster Storage) + histo(History Processing) + faith(Faithful service) + subgraph Main loop + rpc --> |new request| sup + end + subgraph Solana + direction TB + sol --> |new block-slot|sup + sol --> |new epoch|sup + sup --> |geyser call| sol + end + subgraph Block + direction TB + sup --> |update block-block| block + block --> |get data| sup + block --> |query block| blstore + end + subgraph History + direction TB + sup --> |query| histo + histo --> |get data| block + histo --> |get data| faith + end + subgraph Tx + direction TB + sup --> |update block|tx + sup --> |send Tx request|tx + tx --> |get data| sup + tx --> |send Tx| sendtx + end + subgraph Cluster + direction TB + sup --> |update epoch|clus + clus --> |get data| sup + clus --> |store data|clusstore + end +``` diff --git a/docs/rpcv2.md b/docs/rpcv2.md index 9668c325..9a39a98b 100644 --- a/docs/rpcv2.md +++ b/docs/rpcv2.md @@ -871,7 +871,9 @@ This domain is not part of the RPC service functionalities. Another project will ### Architecture + Main architecture + ``` mermaid flowchart TB rpc(RPC access) @@ -922,6 +924,7 @@ flowchart TB ``` send_transaction + ``` mermaid flowchart TB user(Web3 User) @@ -938,7 +941,9 @@ flowchart TB cluster -->|forward epoch info:stake, slots| lite cluster -->|forward epoch info: stake| proxy ``` + getblocks + ``` mermaid flowchart TB user(Web3 User) diff --git a/docs/tasks.md b/docs/tasks.md new file mode 100644 index 00000000..161234e8 --- /dev/null +++ b/docs/tasks.md @@ -0,0 +1,72 @@ +## Task definition + +```mermaid +stateDiagram + a1: Architecture skeleton + c1: geyser connector + c2: Faithful connector + c22: Triton block index + c3: TPU connector + c4: gossip listening + s1: Data model + s2: Storage definition + s3: Block storage + s4: Cluster storage + b1: Block processing + b2: Update block + b3: get block + b4: get current data + b5: Block RPC call + t1: Tx processing + t2: notify Tx + t22: update Tx cache + t3: Sendtransacton + t333: replay Tx + t33: confirm Tx + t4: get Tx + Status + h1: History getBlock + h2: History getBlocks + h3: History calls + cl1: Cluster data + cl2: cluster RPC solana + cl3: cluster epoch update + cl4: cluster info + cl5: cluster epoch notification + cl6: cluster RPC call + + + [*] --> a1 + [*] --> c1 + [*] --> c2 + c2 --> c22 + [*] --> c3 + [*] --> c4 + [*] --> s1 + [*] --> cl1 + s1 --> s2 + s2 --> s3 + s2 --> s4 + a1 --> s2 + a1 --> b1 + b1 --> b2 + b2 --> b3 + b2 --> b4 + b4 --> b5 + a1 --> t1 + t1 --> t2 + t1 --> t22 + t1 --> t3 + t1 --> t4 + t2 --> t33 + t33 --> t333 + cl1 --> cl2 + cl1 --> cl3 + c4 --> cl4 + cl3 --> cl5 + cl5 --> cl6 + s3 --> h1 + c22 --> h1 + b3 --> h1 + h1 --> h2 + h2 --> h3 +```