Skip to content

Commit

Permalink
docs: create 'Beginner' sub section of 'About Mithril'
Browse files Browse the repository at this point in the history
  • Loading branch information
jpraynaud committed Dec 4, 2024
1 parent 0b9c55a commit affb52c
Show file tree
Hide file tree
Showing 11 changed files with 139 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Should you have any questions, ideas or issues, we would like to hear from you:
- #ask-mithril on the IOG [Discord server](https://discord.gg/5kaErDKDRq)
- Create a GitHub [Discussion](https://github.com/input-output-hk/mithril/discussions)
- Create a GitHub [Issue](https://github.com/input-output-hk/mithril/issues/new)
- Ask on Cardano [StackExchange](https://cardano.stackexchange.com/questions/tagged/mithril) using the `mithril` tag
- Ask on Cardano [StackExchange](https://cardano.stackexchange.com/search?q=mithril) using the `mithril` tag

When contributing to this project and interacting with others, please follow our [Code of Conduct](./CODE-OF-CONDUCT.md) and our [Contributing Guidelines](./CONTRIBUTING.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const config = {
},
{
label: "Stack Exchange",
href: "https://cardano.stackexchange.com/questions/tagged/mithril",
href: "https://cardano.stackexchange.com/search?q=mithril",
},
],
},
Expand Down
4 changes: 4 additions & 0 deletions docs/website/root/mithril/advanced/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ title: Advanced
---

import DocCardList from "@theme/DocCardList";

This section delves into the technical aspects of Mithril, providing detailed insights into its protocol, phases, certificate chain design, and network architecture. Explore these topics to understand how Mithril solves blockchain challenges at a deeper level.

<DocCardList />
4 changes: 4 additions & 0 deletions docs/website/root/mithril/advanced/mithril-network/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ title: Mithril network
---

import DocCardList from "@theme/DocCardList";

This section explores the Mithril network, which consists of various nodes that work together to execute the protocol’s rules for signing, aggregating, and verifying blockchain data. By distributing these responsibilities across a decentralized network, Mithril ensures secure, efficient, and scalable data validation without requiring full node operations.

<DocCardList />
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ title: Mithril protocol
---

import DocCardList from "@theme/DocCardList";

This section explains the Mithril protocol, which serves as the foundational cryptographic framework for the system. It outlines the processes for creating and verifying multi-signatures, enabling secure and efficient blockchain data validation. By leveraging a stake-based threshold signature scheme, the Mithril protocol ensures scalability, decentralization, and integrity within the network.

<DocCardList />
9 changes: 9 additions & 0 deletions docs/website/root/mithril/beginner/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Beginner
---

import DocCardList from "@theme/DocCardList";

This section introduces Mithril in simple terms, explaining its purpose, key features, and how it solves blockchain challenges. Explore Mithril’s benefits and high-level functionality now.

<DocCardList />
6 changes: 6 additions & 0 deletions docs/website/root/mithril/beginner/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"label": "Beginner",
"collapsible": true,
"collapsed": false,
"position": 2
}
49 changes: 49 additions & 0 deletions docs/website/root/mithril/beginner/how-it-works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
sidebar_position: 3
sidebar_label: How it works
---

# How it works

The protocol utilizes a lottery mechanism where the probability of a signer winning is directly proportional to their stake. This lottery determines which signers are eligible to participate in the signing round. The generated signatures are then combined by an aggregator into a **Mithril multi-signature**, which requires a predefined threshold (quorum) of the total stake to be reached.

The **Mithril protocol** consists of three phases:

- **Protocol establishment.** During this phase, the protocol parameters are established. These parameters are crucial for security and include:
- **m**: the number of lotteries each signer can participate in for each message
- **k**: the minimum number of unique winning lottery indices needed to create a multi-signature
- **f**: a tuning parameter that adjusts the chances of signers winning a lottery based on their stake.
- **Initialization.** In this phase, participating signers generate and broadcast their keys along with a proof of possession. This process happens at the start of each new epoch, which is five days on Cardano. The aggregate verification key (AVK), a condensed representation of the key registration process, is computed and later used to sign and verify multi-signatures.
- **Operations.** This phase involves the creation and broadcasting of individual signatures by signers. Aggregators collect these signatures and combine them into multi-signatures once the quorum is reached. These multi-signatures are then sealed into a Mithril certificate along with the AVK.

:::info

Refer to the [Protocol phases](../advanced/mithril-protocol/protocol.md) overview for more details.

:::

Mithril involves three main participants – **signers, aggregators, and clients** – working together to ensure secure and efficient data verification.

The operations phase is the core of the Mithril process, involving the generation of individual signatures, their aggregation into a multi-signature, and the creation of a certificate that verifies the authenticity of blockchain data:

- **Message signing.** When a new message, such as a snapshot of the Cardano blockchain, requires certification, a multi-party signing round is initiated.
- **Lottery participation.** Each signer (SPO) participates in the lottery process pertaining to the message, with the likelihood of winning influenced by the signer's stake and other parameters.
- **Individual signature generation.** Signers who win at least one lottery create individual signatures for the message using their specific signing key, sending these signatures to the Mithril aggregator.
- **Aggregation.** The aggregator collects individual signatures and combines them into a single multi-signature once the requisite number of unique winning lottery indices is met (quorum).
- **Certificate generation.** This multi-signature, along with the signed message and additional metadata, forms a Mithril certificate. This certificate serves as verification that a sufficient amount of stake has endorsed the message.
- **Verification.** Clients, including light wallets or node operators, can confirm the authenticity of their assets (information retrieved from some untrusted sources) via the certificates. The verification process is efficient and does not require downloading the entire blockchain history; it entails checking the multi-signature against the known aggregate verification key and tracing the certificate back to a trusted genesis certificate.

To fully understand Mithril, it is essential to explore its advanced operational aspects, which include its cryptographic foundations, the roles and security requirements of SPOs, and the strategic upgrade paths for the network.

To explore advanced topics, see:

- Mithril protocol
- [Protocol phases](../advanced/mithril-protocol/protocol.md)
- [Certificate chain design](../advanced/mithril-protocol/certificates.md)
- [Protocol security](../advanced/mithril-protocol/security.md)
- [Threat model analysis](../advanced/threat-model.md)
- Mithril network
- [Architecture](../advanced/mithril-network/architecture.md)
- [Mithril aggregator](../advanced/mithril-network/aggregator.md)
- [Mithril signer](../advanced/mithril-network/signer.md)
- [Mithril client](../advanced/mithril-network/client.md)
24 changes: 24 additions & 0 deletions docs/website/root/mithril/beginner/mithril-in-a-nutshell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 1
sidebar_label: Mithril in a nutshell
---

# Mithril in a nutshell

Let’s start with some background information to understand the current challenge and the solution that Mithril provides.

Running a Cardano node allows users to interact with the blockchain in a trustless and decentralized way. The network relies on thousands of nodes working together to validate blocks and transactions, creating a unified and secure system. Each node holds a full copy of the blockchain, ensuring independence and decentralization. However, node synchronization is resource-intensive. For example, Daedalus, a full-node wallet, downloads and independently validates every transaction in the blockchain’s history. This process requires significant time, storage, and computational power, creating a barrier for users who lack the necessary resources or technical expertise.

This challenge leaves users and developers with limited choices: invest in the costly setup and maintenance of a full node or rely on centralized services, which compromises Cardano’s core principle of decentralization.

## How Mithril helps

The Mithril protocol is designed to enhance blockchain efficiency and scalability by leveraging stake-based multi-signatures. It achieves higher performance without increasing trust requirements, offering a modular and transparent setup. Signers operate independently to produce individual signatures, which aggregators combine into a single, efficient multi-signature.

Consider this analogy. Think of it like a community vote where only people who own a certain amount of tokens can participate. Each participant’s vote is signed, and these signatures are then combined to show that a significant portion of the token holders agree on the outcome.

Unlike traditional systems requiring all participants to validate data, Mithril uses a stake-based threshold multi-signature scheme (STM). This means only a minimum fraction of the total stake is needed to generate a valid signature, ensuring both security and efficiency.

Operating in a trustless setting, Mithril relies solely on existing proof-of-stake assumptions for consensus security. This makes it ideal for applications such as wallet-as-a-service or mobile clients, which can securely verify and exchange data using certificates from Mithril nodes.

Additionally, Mithril enables rapid Certification by allowing stakeholders to validate checkpoints rather than the entire transaction history. This feature is especially beneficial for light clients, such as light wallets, and extends to use cases like data synchronization between layer 2 chains and full node bootstrapping.
24 changes: 24 additions & 0 deletions docs/website/root/mithril/beginner/why-use-mithril.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 2
sidebar_label: Why should you use Mithril?
---

# Why should you use Mithril?

Mithril was developed with a focus on optimization, scalability, and interoperability. It addresses several key challenges in the blockchain ecosystem:

## Challenges

- **Slow node bootstrapping.** Synchronizing a full Cardano node from scratch can take days, hindering user participation and development.
- **Light client security and decentralization.** Light clients such as wallets offer efficiency but often rely on centralized and trusted third parties for data, compromising security and decentralization.
- **Layer 2 interaction.** Layer 2 solutions designed to enhance scalability need efficient methods to verify their state and interact with the main chain without requiring validator nodes to run a full Cardano node.

## Solutions

Mithril addresses these challenges through its stake-based threshold multi-signature (STM) scheme. This approach allows for efficient and secure verification of blockchain data without the need to run a full node, thereby improving scalability and accessibility.

Here's how Mithril provides solutions:

- **Fast bootstrapping.** Mithril enables the rapid setup of a full Cardano node in under 20 minutes by providing certified snapshots of the Cardano database. These snapshots can be quickly verified using the multi-signature scheme.
- **Secure and efficient data exchange for lightweight applications.** Lightweight applications such as wallets can leverage Mithril to verify transaction data associated with specific addresses without relying on third parties or running a full node. This maintains decentralization and security while offering greater efficiency.
- **Support for layer 2 solutions.** Mithril allows lightweight verification of the state and transactions of layer 2 solutions, improving their interaction with the main chain. For example, it can verify the stake of validator nodes in a bridge.
49 changes: 13 additions & 36 deletions docs/website/root/mithril/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,31 @@ sidebar_position: 1
sidebar_label: Introduction
---

# About Mithril
# Introduction

:::info
Mithril is a protocol and network specifically designed for proof-of-stake blockchains. Its primary goal is to provide lightweight and secure access to blockchain data while ensuring a high level of security and decentralization. Originally developed for Cardano during its Basho development phase, which focuses on optimization, scalability, and interoperability, Mithril has numerous potential applications. These include synchronizing data for both light and full-node wallets, as well as facilitating data exchanges with layer 2 solutions such as bridges, sidechains, rollups, and state channels.

Explore the Mithril protocol through our [protocol simulation](../manual/develop/protocol-simulation.md). This interactive experience will provide you with insights into how participants collaborate to generate a **multi-signature**, and you'll also gain a clearer understanding of the protocol parameters.
This section provides a detailed overview of the Mithril protocol and the network, their purpose, and how Mithril addresses key challenges in blockchain scalability and security. The section includes both beginner-friendly explanations and advanced technical insights, guiding readers from foundational concepts to in-depth protocol details.

:::

## Mithril in a nutshell

Mithril is a research project whose goal is to provide [Stake-based Threshold Multisignatures](https://iohk.io/en/research/library/papers/mithrilstake-based-threshold-multisignatures/) on top of the Cardano network.

In a nutshell, Mithril can be summarized as:

> A protocol that allows stakeholders in a proof-of-stake blockchain network to individually sign messages that are aggregated into a multi-signature, which guarantees that they represent a minimum share of the total stake.
In other words, an adversarial participant with less than this share of the total stake will not be able to produce valid multi-signatures :closed_lock_with_key:.

## What you'll find in this guide

In this guide, you will find:

- The **Mithril protocol** documentation:

- [Mithril protocol in depth](./advanced/mithril-protocol/protocol.md)

- [Mithril certificate chain in depth](./advanced/mithril-protocol/certificates.md)

- An interactive protocol discovery through the [Mithril simulation](../manual/develop/protocol-simulation.md)

- The **Mithril network** documentation:

- [Mithril network architecture](./advanced/mithril-network/architecture.md)

- [Mithril aggregator node](./advanced/mithril-network/aggregator.md)
If you're new to Mithril, see the ‘Beginner' explainers:

- [Mithril signer node](./advanced/mithril-network/signer.md)
- [Mithril in a nutshell](./beginner/mithril-in-a-nutshell.md)
- [Why should you use Mithril?](./beginner/why-use-mithril.md)
- [How it works](./beginner/how-it-works.md)

- [Mithril client node](./advanced/mithril-network/client.md)
To dive deeper into advanced topics, see:

- The [**Mithril threat model**](./advanced/threat-model)
- [Mithril protocol](./advanced/mithril-protocol/README.mdx)
- [Mithril network](./advanced/mithril-network/README.mdx)
- [Mithril security](./advanced/mithril-protocol/security.md)
- [Threat model analysis](./advanced/threat-model.md)

:::tip

If you need help, feel free to reach out to the Mithril team:

- [GitHub discussions](https://github.com/input-output-hk/mithril/discussions)

- [Stack Exchange](https://cardano.stackexchange.com/questions/tagged/mithril)
- [Stack Exchange](https://cardano.stackexchange.com/search?q=mithril)

:::

0 comments on commit affb52c

Please sign in to comment.