Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions docs/website/root/mithril/mithril-network/architecture-c4.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@startuml architecture
title "Mithril network architecture"
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml

AddElementTag("external", $bgColor="#c1ffc1")

Person(end_user, "End user", "Retrieves and verifies artifacts certified by the Mithril network")

Container_Boundary(mithril_aggregator, "Mithril aggregator", $link="https://github.com/input-output-hk/mithril/tree/main/mithril-aggregator") {
Component(mithril_aggregator_logic, "Aggregator logic", "FSM", "Maintains and transitions aggregator's internal states")
Component(mithril_aggregator_cryptographic_engine, "Cryptographic engine", "STM/Asym", "Operates cryptographic primitives")
Component(mithril_aggregator_chain_observer, "Chain observer", "", "Observes the Cardano chain")
Component(mithril_aggregator_http_server, "HTTP server", "REST API", "Serves HTTP requests to signers and clients")
ComponentDb(mithril_aggregator_persistence, "Persistence", "SQLite/FS", "Stores aggregator's data (verification keys, certificates, artifacts)")

Rel(mithril_aggregator_logic, mithril_aggregator_cryptographic_engine, "Computes protocol cryptography")
Rel_U(mithril_aggregator_chain_observer, mithril_aggregator_logic, "Notifies aggregator's logic about chain state changes")
BiRel(mithril_aggregator_logic, mithril_aggregator_persistence, "Accesses aggregator's state")
BiRel(mithril_aggregator_http_server, mithril_aggregator_persistence, "Accesses aggregator's state")
}

Container_Boundary(mithril_signer, "Mithril signer", $link="https://github.com/input-output-hk/mithril/tree/main/mithril-signer") {
Component(mithril_signer_logic, "Signer logic", "FSM", "Maintains and transitions signer's internal states ")
Component(mithril_signer_cryptographic_engine, "Cryptographic engine", "STM/Asym", "Operates cryptographic primitives")
Component(mithril_signer_chain_observer, "Chain observer", "", "Observes the Cardano chain")
Component(mithril_signer_http_client, "HTTP client", "REST API", "Sends HTTP requests to the aggregator via the relay")
ComponentDb(mithril_signer_persistence, "Persistence", "SQLite/FS", "Stores signer's data (signing keys)")

BiRel(mithril_signer_logic, mithril_signer_http_client, "Retrieves aggregator's data")
Rel(mithril_signer_logic, mithril_signer_cryptographic_engine, "Computes protocol cryptography")
Rel_U(mithril_signer_chain_observer, mithril_signer_logic, "Notifies signer's logic about chain state changes")
BiRel(mithril_signer_logic, mithril_signer_persistence, "Accesses signer's state")
}

Container_Boundary(mithril_relay, "Mithril relay") {
Component(mithril_relay_forward_proxy, "Forward proxy", "Squid", "Proxies HTTPS calls to the aggregator")
}

Container_Boundary(mithril_client, "Mithril client", $link="https://github.com/input-output-hk/mithril/tree/main/mithril-client") {
Component(mithril_client_logic, "Client logic", "Client commands", "Retrieves artifacts and verifies their authenticity")
Component(mithril_client_cryptographic_engine, "Cryptographic engine", "STM/Asym", "Operates cryptographic primitives")
Component(mithril_client_http_client, "HTTP client", "REST API", "Sends HTTP requests to the aggregator")

BiRel(end_user, mithril_client_logic, "CLI or browser", "User interaction")
BiRel(mithril_client_logic, mithril_client_http_client, "Retrieves aggregator's data and artifacts")
Rel(mithril_client_logic, mithril_client_cryptographic_engine, "Computes protocol cryptography")
}

Rel(mithril_signer_http_client, mithril_relay_forward_proxy, "", "JSON/TCP")
Rel(mithril_relay_forward_proxy, mithril_aggregator_http_server, "", "JSON/HTTPS")
Rel(mithril_client_http_client, mithril_aggregator_http_server, "", "JSON/HTTPS")

Component(mithril_aggregator_cardano_node, "Cardano node", "N2C/FS", "Cardano full node", $tags="external")
Rel_L(mithril_aggregator_chain_observer, mithril_aggregator_cardano_node, "Retrieves Cardano chain state")
Component(mithril_signer_cardano_node, "Cardano node", "N2C/FS", "Cardano block-producing node", $tags="external")
Rel_D(mithril_signer_chain_observer, mithril_signer_cardano_node, "Retrieves Cardano chain state and KES signing keys")
BiRel(mithril_signer_cardano_node, mithril_aggregator_cardano_node, "N2N protocol")

Component(mithril_artifact_storage, "Artifact storage", "Cloud", "Cloud file storage", $tags="external")
Rel(mithril_aggregator_logic, mithril_artifact_storage, "HTTPS", "Stores artifacts")
Rel(mithril_client_http_client, mithril_artifact_storage, "HTTPS", "Downloads artifacts")
@enduml
33 changes: 14 additions & 19 deletions docs/website/root/mithril/mithril-network/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,38 @@ sidebar_label: Architecture

# Mithril network architecture

:::tip
:::info

For more information about the Mithril protocol, read [about Mithril](../mithril-protocol/protocol.md).
* The current Mithril network relies on a single aggregator. However, the team is working on a more decentralized version, where multiple aggregators will operate within the same Mithril network.

:::

## Introduction
## Architecture diagram

Currently, the Mithril network operates as a collection of nodes responsible for generating snapshots and certificates, facilitating the fast bootstrapping of a Cardano node. This network functions on top of the Cardano network.
[![Architecture](images/architecture.svg)](images/architecture.svg)

:::info

The role of a Mithril network is to enable end users to restore a full Cardano node in less than two hours.
## Mithril nodes

:::

The network is composed of three nodes:
The network is composed of the following nodes:

* [**Mithril aggregator**](./aggregator.md):

> The trustless node that orchestrates the work of the Mithril signer nodes, gathering their individual signatures to produce Mithril multi-signatures and their associated certificates. The aggregator is also in charge of creating and storing the ledger state snapshot archive.
> The trustless node that orchestrates the work of the Mithril signer nodes, gathering their individual signatures to produce Mithril multi-signatures and their associated certificates. The aggregator is also in charge of creating and storing the ledger state snapshot archives.

* [**Mithril signer**](./signer.md):

> The node that works transparently on top of the stake pool operator's Cardano node and individually signs the ledger state.
> The node that works transparently on top of the stake pool operator's Cardano node and individually signs the Cardano chain state.

* [**Mithril client**](./client.md):

> The node used to restore a Cardano full node by retrieving a remote snapshot and its certificate chain from a Mithril aggregator. It then employs Mithril cryptographic primitives to verify their authenticity and validity.
> The node used to restore artifacts produced by a Mithril aggregator. It then employs Mithril cryptographic primitives to verify their authenticity and validity.

## Architecture overview
* **Mithril relay**:

:::info
> A forward proxy that is used to secure communications between the Mithril signer and the Mithril aggregator. More information is available in the [Mithril signer deployment model](../../manual/getting-started/run-signer-node#mithril-signer-deployment-model) section.

* This document is subject to change as it is a work in progress.
* The team is currently working on further decentralizing the network architecture.
:::tip

:::
For more information about the Mithril protocol, read [about Mithril](../mithril-protocol/protocol.md).

[![Architecture](images/architecture.jpg)](images/architecture.jpg)
:::
Binary file not shown.
Loading