Skip to content

Mikan ๐ŸŠ: The ZK Friendly DA Layer for Bitcoin L2s

License

Notifications You must be signed in to change notification settings

stevencartavia/mikan

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

๐Ÿ”ง 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..

๐ŸŽฎ Getting Started

Prerequisites

  • Rust 1.71.0 or later
  • Cargo

Run a local testnet

Build the app

cargo build

Setup the testnet

Generate configuration and genesis for three nodes using the testnet command:

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 spawn.bash --nodes 3 --home nodes

If successful, the logs for each node can then be found at nodes/X/logs/node.log.

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 sampling

The 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.

๐Ÿ“ License

This project is licensed under the MIT License.

๐Ÿ“š References


Started with love by AbdelStark ๐Ÿงก

Feel free to follow me on Nostr if youโ€™d like, using my public key:

npub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29

Or just scan this QR code to find me:

Nostr Public Key QR Code

About

Mikan ๐ŸŠ: The ZK Friendly DA Layer for Bitcoin L2s

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 97.3%
  • Shell 2.7%