{"id":26451246,"url":"https://github.com/abdelstark/mikan","last_synced_at":"2025-03-18T16:39:47.059Z","repository":{"id":283100092,"uuid":"948622873","full_name":"AbdelStark/mikan","owner":"AbdelStark","description":"Mikan 🍊: The ZK Friendly DA Layer for Bitcoin L2s","archived":false,"fork":false,"pushed_at":"2025-03-18T15:28:26.000Z","size":697,"stargazers_count":1,"open_issues_count":19,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T15:43:58.848Z","etag":null,"topics":["bitcoin","da-layer","data-availability","data-availability-sampling","starknet","starks"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbdelStark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-14T16:56:44.000Z","updated_at":"2025-03-18T15:27:17.000Z","dependencies_parsed_at":"2025-03-18T15:55:10.966Z","dependency_job_id":null,"html_url":"https://github.com/AbdelStark/mikan","commit_stats":null,"previous_names":["abdelstark/mikan"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdelStark%2Fmikan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdelStark%2Fmikan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdelStark%2Fmikan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdelStark%2Fmikan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbdelStark","download_url":"https://codeload.github.com/AbdelStark/mikan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244261487,"owners_count":20424948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","da-layer","data-availability","data-availability-sampling","starknet","starks"],"created_at":"2025-03-18T16:39:46.459Z","updated_at":"2025-03-18T16:39:47.052Z","avatar_url":"https://github.com/AbdelStark.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://github.com/AbdelStark/bitcoin-mcp/actions/workflows/ci.yml\"\u003e\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/AbdelStark/mikan/ci.yml?style=for-the-badge\" height=30\u003e\u003c/a\u003e\n\u003ca href=\"https://bitcoin.org/\"\u003e \u003cimg alt=\"Bitcoin\" src=\"https://img.shields.io/badge/Bitcoin-000?style=for-the-badge\u0026logo=bitcoin\u0026logoColor=white\" height=30\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n# Mikan 🍊: The ZK Friendly DA Layer for Bitcoin L2s\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e\n    \u003ca href=\"https://github.com/AbdelStark/mikan\"\u003e\n      DOCS\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://eprint.iacr.org/2024/248\"\u003e\n      FRIDA PAPER\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/keep-starknet-strange/frieda\"\u003e\n      FRIEDA LIB\n    \u003c/a\u003e\n  \u003c/h3\u003e\n\n  \u003cimg src=\"./docs/img/mikan.png\" alt=\"Mikan\" width=\"300\"\u003e\n\u003c/div\u003e\n\nMikan is a ZK-Rollup friendly data availability layer built on the Malachite consensus framework.\nIt provides strong data availability guarantees using STARK-friendly cryptographic primitives\nwithout requiring a trusted setup.\n\nIt is design to be particularly friendly to ZK-Rollups, specifically on Bitcoin, by providing a DA layer that is\ncompatible with the FRI commitment scheme, and by eliminating the need for a trusted setup.\n\n\u003e Name origin 🍊 (蜜柑):\n\u003e\n\u003e 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.\n\u003e\n\u003e 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.\n\n## 💼 Table of Contents\n\n- [Mikan 🍊: The ZK Friendly DA Layer for Bitcoin L2s](#mikan--the-zk-friendly-da-layer-for-bitcoin-l2s)\n  - [💼 Table of Contents](#-table-of-contents)\n  - [🔧 Key Features](#-key-features)\n  - [📐 Architecture](#-architecture)\n    - [🔑 Cryptographic Components](#-cryptographic-components)\n  - [🎮 Getting Started](#-getting-started)\n    - [Prerequisites](#prerequisites)\n    - [Run a local testnet](#run-a-local-testnet)\n      - [Build the app](#build-the-app)\n    - [Setup the testnet](#setup-the-testnet)\n    - [Spawn the nodes](#spawn-the-nodes)\n  - [Usage for Rollups](#usage-for-rollups)\n  - [🤝 Contributing](#-contributing)\n  - [🗺️ Roadmap](#️-roadmap)\n  - [📝 License](#-license)\n  - [📚 References](#-references)\n\n## 🔧 Key Features\n\n- **No Trusted Setup**: Unlike solutions using KZG commitments, Mikan relies on transparent\n  cryptography based on the FRI protocol, eliminating the need for trusted setup ceremonies.\n\n- **ZK-Friendly Proofs**: Mikan generates succinct proofs of data availability using the M31\n  field (Mersenne prime 2^31-1), which is STARK-friendly and can be efficiently verified\n  inside ZK proofs.\n\n- **Fast Consensus**: Built on the Malachite BFT consensus framework, which provides\n  high throughput and quick finality.\n\n## 📐 Architecture\n\nMikan consists of the following components:\n\n1. **Consensus Layer**: Based on Malachite BFT, handling block production and agreement.\n2. **Data Availability Layer**: Uses FRI commitments and proofs for data availability sampling.\n3. **Network Layer**: Ensures quick propagation of proposal parts across the network.\n4. **API**: Allows rollups to submit data and retrieve availability certificates.\n\n### 🔑 Cryptographic Components\n\n- **FRI Protocol**: Fast Reed-Solomon Interactive Oracle Proof for data availability.\n- **M31 Field**: Uses the Mersenne prime 2^31-1 for efficient field arithmetic.\n- **Merkle Trees**: For efficient commitments and proofs.\n\nThe 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).\n\n## 🎮 Getting Started\n\n### Prerequisites\n\n- Rust 1.71.0 or later\n- Cargo\n\n### Run a local testnet\n\n#### Build the app\n\n```bash\ncargo build\n```\n\n### Setup the testnet\n\nGenerate configuration and genesis for three nodes using the `testnet` command:\n\n```bash\ncargo run -- testnet --nodes 3 --home nodes\n```\n\nThis will create the configuration for three nodes in the `nodes` folder. Feel free to inspect this folder and look at the generated files.\n\n### Spawn the nodes\n\n```bash\nbash spawn.bash --nodes 3 --home nodes\n```\n\nIf successful, the logs for each node can then be found at `nodes/X/logs/node.log`.\n\n```bash\ntail -f nodes/0/logs/node.log\n```\n\nPress `Ctrl-C` to stop all the nodes.\n\n## Usage for Rollups\n\nRollups can submit data to Mikan via its API:\n\n1. **Submit Data**: Rollup submits transaction data to Mikan nodes\n2. **Receive Commitment**: Mikan returns a cryptographic commitment to the data\n3. **Verify Availability**: Anyone can verify data availability by sampling\n\nThe FRI commitment can be included in the rollup's state transition proof, creating\na seamless integration between the rollup's validity proofs and data availability guarantees.\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 🗺️ Roadmap\n\nSee [ROADMAP.md](ROADMAP.md).\n\n## 📝 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## 📚 References\n\n- [FRI Extended for Data Availability: a FRI-based Data Availability Sampling library, written in Rust.](https://github.com/keep-starknet-strange/frieda)\n- [FRIDA: Data Availability Sampling from FRI](https://eprint.iacr.org/2024/248)\n- [A Guide to Selecting the Right Data Availability Layer](https://blog.availproject.org/a-guide-to-selecting-the-right-data-availability-layer/)\n- [M31 arithmetic opcodes for efficient STARK verification on Bitcoin](https://hackmd.io/@abdelhamid/m31-opcodes-bitcoin-stark)\n- [Malachite - Flexible BFT consensus engine in Rust](https://github.com/informalsystems/malachite)\n\n---\n\nStarted with love by [AbdelStark](https://github.com/AbdelStark) 🧡\n\nFeel free to follow me on Nostr if you’d like, using my public key:\n\n```text\nnpub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29\n```\n\nOr just **scan this QR code** to find me:\n\n![Nostr Public Key QR Code](https://hackmd.io/_uploads/SkAvwlYYC.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdelstark%2Fmikan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdelstark%2Fmikan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdelstark%2Fmikan/lists"}