From d45f46843e665c1c16dd7f1b8f2c6e559dc005ce Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Thu, 16 May 2024 21:25:04 -0500 Subject: [PATCH] sys design: organizing and add diagram --- .../docs/system-design/contracts/bench.md | 0 .../docs/system-design/contracts/forum.md | 0 .../docs/system-design/contracts/proposal.md | 0 .../system-design/contracts/reputation.md | 0 .../docs/system-design/contracts/rollup.md | 0 .../docs/system-design/contracts/work.md | 0 .../docs/{ => system-design}/system-design.md | 36 +++++++++++++++++++ specification/mkdocs.yml | 12 +++++-- 8 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 specification/docs/system-design/contracts/bench.md create mode 100644 specification/docs/system-design/contracts/forum.md create mode 100644 specification/docs/system-design/contracts/proposal.md create mode 100644 specification/docs/system-design/contracts/reputation.md create mode 100644 specification/docs/system-design/contracts/rollup.md create mode 100644 specification/docs/system-design/contracts/work.md rename specification/docs/{ => system-design}/system-design.md (68%) diff --git a/specification/docs/system-design/contracts/bench.md b/specification/docs/system-design/contracts/bench.md new file mode 100644 index 0000000..e69de29 diff --git a/specification/docs/system-design/contracts/forum.md b/specification/docs/system-design/contracts/forum.md new file mode 100644 index 0000000..e69de29 diff --git a/specification/docs/system-design/contracts/proposal.md b/specification/docs/system-design/contracts/proposal.md new file mode 100644 index 0000000..e69de29 diff --git a/specification/docs/system-design/contracts/reputation.md b/specification/docs/system-design/contracts/reputation.md new file mode 100644 index 0000000..e69de29 diff --git a/specification/docs/system-design/contracts/rollup.md b/specification/docs/system-design/contracts/rollup.md new file mode 100644 index 0000000..e69de29 diff --git a/specification/docs/system-design/contracts/work.md b/specification/docs/system-design/contracts/work.md new file mode 100644 index 0000000..e69de29 diff --git a/specification/docs/system-design.md b/specification/docs/system-design/system-design.md similarity index 68% rename from specification/docs/system-design.md rename to specification/docs/system-design/system-design.md index d1beb43..a70f0a1 100644 --- a/specification/docs/system-design.md +++ b/specification/docs/system-design/system-design.md @@ -1,3 +1,36 @@ +# System Design + +```mermaid +flowchart TD + Homeserver[Matrix\nHomeserver] + Contracts <-- Node.js blockchain\nclient library (ethers) --> API + Contracts <-- Web-based blockchain client library\n(MetaMask / Casper Wallet)--> WebApp + Contracts <-- Web-based blockchain client library\n(MetaMask / Casper Wallet)--> Widget + WebApp <-- HTTPS --> API + Widget <-- HTTPS --> API + Widget <-- Element-web Widget API\n(npm matrix-widget-api) --> Homeserver + API <-- Matrix Client-Server Protocol\n(npm matrix-bot-sdk) --> Homeserver +``` + + +Topics + +- Contracts +- Web Client +- Widget +- API / Staking Client + - API + - Read + - Write + - Import from Semantic Scholar + - Import from Matrix + - Event handlers + - Validation Pool + - Register Matrix Identity + - On-chain Direct Pool + - Rollup + - Bot Commands + ## Contracts In the [Requirements](./requirements.md) section, we identified the following smart contracts: @@ -26,3 +59,6 @@ The Rollup Post can weight authorship in accordance with the off-chain Validatio To address the need for coordination of off-chain Posts and Validation Pools, we introduce Matrix. [Matrix](matrix.org) is a messaging protocol, and it has multiple implementations. Our prototype uses Synapse as the Homeserver. Our system communicates with the Homeserver using the Client-Server protocol. +## Element-web Widget + + diff --git a/specification/mkdocs.yml b/specification/mkdocs.yml index bf0a846..a6fc2c3 100644 --- a/specification/mkdocs.yml +++ b/specification/mkdocs.yml @@ -18,5 +18,13 @@ nav: - Overview: index.md - Terminology: terminology.md - Requirements: requirements.md - - System Design: system-design.md - - Implementation: implementation.md + - System Design: + - Overview: system-design/system-design.md + - Contracts: + - Reputation: system-design/contracts/reputation.md + - Bench: system-design/contracts/bench.md + - Work: system-design/contracts/work.md + - Proposal: system-design/contracts/proposal.md + - Forum: system-design/contracts/Forum.md + - Rollup: system-design/contracts/rollup.md + - Implementation: system-design/implementation.md