https://github.com/keep-starknet-strange/mikan
Mikan ๐: The ZK Friendly DA Layer for Bitcoin L2s
https://github.com/keep-starknet-strange/mikan
bitcoin da-layer data-availability data-availability-sampling starknet starks
Last synced: about 1 month ago
JSON representation
Mikan ๐: The ZK Friendly DA Layer for Bitcoin L2s
- Host: GitHub
- URL: https://github.com/keep-starknet-strange/mikan
- Owner: keep-starknet-strange
- License: mit
- Created: 2025-03-14T16:56:44.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-14T16:20:18.000Z (about 1 month ago)
- Last Synced: 2025-04-14T22:14:21.641Z (about 1 month ago)
- Topics: bitcoin, da-layer, data-availability, data-availability-sampling, starknet, starks
- Language: Rust
- Homepage:
- Size: 685 KB
- Stars: 6
- Watchers: 1
- Forks: 6
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# Mikan ๐: The ZK Friendly DA Layer for Bitcoin L2s
Mikan is a ZK-Rollup friendly data availability layer built on the Malachite consensus framework.
It provides strong data availability guarantees using STARK-friendly cryptographic primitives
without requiring a trusted setup.It is design to be particularly friendly to ZK-Rollups, specifically on Bitcoin, by providing a DA layer that is
compatible with the FRI commitment scheme, and by eliminating the need for a trusted setup.> Name origin ๐ (่ๆ):
>
> Officially known as a Citrus unshiu or unshiu mikan, mikan is a type of mandarin orange and citrus fruit that originated in southern Japan approximately 400 years ago.
>
> Bitcoin goes necessarily with the orange color, so naturally a DA layer for Bitcoin L2s should be orange, and the Japanese connection is a Satoshi style touch.## ๐ผ Table of Contents
- [Mikan ๐: The ZK Friendly DA Layer for Bitcoin L2s](#mikan--the-zk-friendly-da-layer-for-bitcoin-l2s)
- [๐ผ Table of Contents](#-table-of-contents)
- [๐ง Key Features](#-key-features)
- [๐ Architecture](#-architecture)
- [๐ Cryptographic Components](#-cryptographic-components)
- [๐ฎ Getting Started](#-getting-started)
- [Prerequisites](#prerequisites)
- [Run a local testnet](#run-a-local-testnet)
- [Build the app](#build-the-app)
- [Setup the testnet](#setup-the-testnet)
- [Spawn the nodes](#spawn-the-nodes)
- [Usage for Rollups](#usage-for-rollups)
- [๐ค Contributing](#-contributing)
- [๐บ๏ธ Roadmap](#๏ธ-roadmap)
- [๐ License](#-license)
- [๐ References](#-references)## ๐ง Key Features
- **No Trusted Setup**: Unlike solutions using KZG commitments, Mikan relies on transparent
cryptography based on the FRI protocol, eliminating the need for trusted setup ceremonies.- **ZK-Friendly Proofs**: Mikan generates succinct proofs of data availability using the M31
field (Mersenne prime 2^31-1), which is STARK-friendly and can be efficiently verified
inside ZK proofs.- **Fast Consensus**: Built on the Malachite BFT consensus framework, which provides
high throughput and quick finality.## ๐ Architecture
Mikan consists of the following components:
1. **Consensus Layer**: Based on Malachite BFT, handling block production and agreement.
2. **Data Availability Layer**: Uses FRI commitments and proofs for data availability sampling.
3. **Network Layer**: Ensures quick propagation of proposal parts across the network.
4. **API**: Allows rollups to submit data and retrieve availability certificates.### ๐ Cryptographic Components
- **FRI Protocol**: Fast Reed-Solomon Interactive Oracle Proof for data availability.
- **M31 Field**: Uses the Mersenne prime 2^31-1 for efficient field arithmetic.
- **Merkle Trees**: For efficient commitments and proofs.The core primitives for the Data Availability Sampling are implemented in [FRI Extended for Data Availability: a FRI-based Data Availability Sampling library, written in Rust.](https://github.com/keep-starknet-strange/frieda).
## ๐ฎ Getting Started
### Prerequisites
- Rust 1.71.0 or later
- Cargo### Run a local testnet
#### Build the app
```bash
cargo build
```### Setup the testnet
Generate configuration and genesis for three nodes using the `testnet` command:
```bash
cargo run -- testnet --nodes 3 --home nodes
```This will create the configuration for three nodes in the `nodes` folder. Feel free to inspect this folder and look at the generated files.
### Spawn the nodes
```bash
bash spawn.bash --nodes 3 --home nodes
```If successful, the logs for each node can then be found at `nodes/X/logs/node.log`.
```bash
tail -f nodes/0/logs/node.log
```Press `Ctrl-C` to stop all the nodes.
## Usage for Rollups
Rollups can submit data to Mikan via its API:
1. **Submit Data**: Rollup submits transaction data to Mikan nodes
2. **Receive Commitment**: Mikan returns a cryptographic commitment to the data
3. **Verify Availability**: Anyone can verify data availability by samplingThe FRI commitment can be included in the rollup's state transition proof, creating
a seamless integration between the rollup's validity proofs and data availability guarantees.## ๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## ๐บ๏ธ Roadmap
See [ROADMAP.md](ROADMAP.md).
## ๐ License
This project is licensed under the [MIT License](LICENSE).
## ๐ References
- [FRI Extended for Data Availability: a FRI-based Data Availability Sampling library, written in Rust.](https://github.com/keep-starknet-strange/frieda)
- [FRIDA: Data Availability Sampling from FRI](https://eprint.iacr.org/2024/248)
- [A Guide to Selecting the Right Data Availability Layer](https://blog.availproject.org/a-guide-to-selecting-the-right-data-availability-layer/)
- [M31 arithmetic opcodes for efficient STARK verification on Bitcoin](https://hackmd.io/@abdelhamid/m31-opcodes-bitcoin-stark)
- [Malachite - Flexible BFT consensus engine in Rust](https://github.com/informalsystems/malachite)---
Started with love by [AbdelStark](https://github.com/AbdelStark) ๐งก
Feel free to follow me on Nostr if youโd like, using my public key:
```text
npub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29
```Or just **scan this QR code** to find me:
