|
1 | | -# kora |
| 1 | +<h1 align="center"> |
| 2 | + <img src="./assets/banner.svg" alt="Kora" width="100%" align="center"> |
| 3 | +</h1> |
| 4 | + |
| 5 | +<h4 align="center"> |
| 6 | + A minimal commonware + revm execution client. Built in Rust. |
| 7 | +</h4> |
| 8 | + |
| 9 | +<p align="center"> |
| 10 | + <img src="https://img.shields.io/crates/msrv/kora?style=flat&labelColor=1C2C2E&color=fbbf24&logo=rust&logoColor=white" alt="MSRV"> |
| 11 | + <a href="https://github.com/refcell/kora/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/refcell/kora/ci.yml?style=flat&labelColor=1C2C2E&label=ci&logo=GitHub%20Actions&logoColor=white" alt="CI"></a> |
| 12 | + <a href="https://github.com/refcell/kora/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-d1d1f6.svg?style=flat&labelColor=1C2C2E&color=a78bfa&logo=googledocs&logoColor=white" alt="License"></a> |
| 13 | +</p> |
| 14 | + |
| 15 | +<p align="center"> |
| 16 | + <a href="#whats-kora">What's Kora?</a> • |
| 17 | + <a href="#usage">Usage</a> • |
| 18 | + <a href="#architecture">Architecture</a> • |
| 19 | + <a href="#contributing">Contributing</a> • |
| 20 | + <a href="#license">License</a> |
| 21 | +</p> |
| 22 | + |
| 23 | +> [!CAUTION] |
| 24 | +> Kora is pre-alpha software. Do not expect this to run. Do not run this in production. |
2 | 25 |
|
3 | 26 | > [!IMPORTANT] |
4 | | -> |
5 | | -> This is pre-alpha software. |
6 | | -> Do not expect this to run. |
7 | | -> Do not run this in production. |
| 27 | +> Kora uses BLS12-381 threshold consensus via [commonware](https://github.com/commonwarexyz/monorepo), [REVM](https://github.com/bluealloy/revm) for EVM execution, and [QMDB](https://github.com/kora-labs/qmdb) for state storage. |
| 28 | +
|
| 29 | +## What's Kora? |
| 30 | + |
| 31 | +Kora is a minimal, high-performance execution client built entirely in Rust. It combines commonware's BLS12-381 threshold consensus with REVM for EVM execution and QMDB for efficient state storage. |
8 | 32 |
|
9 | | -A minimal [commonware](https://github.com/commonwarexyz/monorepo) + [revm](https://github.com/bluealloy/revm) execution client. |
| 33 | +The architecture is modular with distinct layers: |
| 34 | +- **Consensus** - BLS12-381 threshold signatures via commonware simplex |
| 35 | +- **Execution** - EVM state transitions powered by REVM |
| 36 | +- **Storage** - High-performance state management with QMDB |
| 37 | +- **Network** - P2P transport and message marshaling |
10 | 38 |
|
11 | | -## Build |
| 39 | +## Usage |
| 40 | + |
| 41 | +Start the devnet with interactive DKG (Distributed Key Generation): |
12 | 42 |
|
13 | 43 | ```sh |
14 | | -cargo build --release |
| 44 | +just devnet |
15 | 45 | ``` |
16 | 46 |
|
| 47 | +> [!TIP] |
| 48 | +> See the [Justfile](./Justfile) for other useful commands. |
| 49 | +
|
| 50 | +### Devnet Commands |
| 51 | + |
| 52 | +| Command | Description | |
| 53 | +|---------|-------------| |
| 54 | +| `just devnet` | Start the devnet with interactive DKG | |
| 55 | +| `just devnet-down` | Stop the devnet | |
| 56 | +| `just devnet-reset` | Reset devnet (clears all state, requires fresh DKG) | |
| 57 | +| `just devnet-logs` | View devnet logs | |
| 58 | +| `just devnet-status` | View devnet status | |
| 59 | +| `just devnet-stats` | Live devnet monitoring dashboard | |
| 60 | + |
| 61 | +## Architecture |
| 62 | + |
| 63 | +The devnet runs in three phases: |
| 64 | + |
| 65 | +### Phase 0: Init Config |
| 66 | +Generates ed25519 identity keys for each validator node. |
| 67 | + |
| 68 | +### Phase 1: DKG Ceremony |
| 69 | +Interactive threshold key generation using Ed25519 simplex consensus. Validators collaborate to generate a shared BLS12-381 threshold key. |
| 70 | + |
| 71 | +### Phase 2: Validators |
| 72 | +Full validator nodes running: |
| 73 | +- BLS12-381 threshold consensus |
| 74 | +- REVM execution engine |
| 75 | +- QMDB state storage |
| 76 | + |
| 77 | +### Observability |
| 78 | +Prometheus metrics with Grafana dashboards for monitoring. |
| 79 | + |
| 80 | +### Crate Structure |
| 81 | + |
| 82 | +``` |
| 83 | +bin/ |
| 84 | +├── kora # Main validator binary |
| 85 | +└── keygen # Key generation for devnet |
| 86 | +
|
| 87 | +crates/ |
| 88 | +├── node/ # Node components |
| 89 | +│ ├── consensus # BLS threshold consensus |
| 90 | +│ ├── executor # REVM execution |
| 91 | +│ ├── ledger # Block/transaction ledger |
| 92 | +│ ├── txpool # Transaction pool |
| 93 | +│ ├── service # Node service orchestration |
| 94 | +│ ├── dkg # Distributed key generation |
| 95 | +│ └── ... |
| 96 | +├── storage/ # Storage layer |
| 97 | +│ ├── qmdb # QMDB integration |
| 98 | +│ ├── backend # Storage backend |
| 99 | +│ ├── handlers # State handlers |
| 100 | +│ ├── overlay # State overlay |
| 101 | +│ └── ... |
| 102 | +├── network/ # Network layer |
| 103 | +│ ├── transport # P2P transport |
| 104 | +│ └── marshal # Message serialization |
| 105 | +└── utilities/ # Utilities |
| 106 | + ├── cli # CLI helpers |
| 107 | + ├── crypto # Cryptographic utilities |
| 108 | + └── sys # System utilities |
| 109 | +``` |
| 110 | + |
| 111 | +## Contributing |
| 112 | + |
| 113 | +Contributions are welcome! Please feel free to submit a Pull Request. |
| 114 | + |
17 | 115 | ## License |
18 | 116 |
|
19 | | -MIT |
| 117 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
0 commit comments