|
1 | | -# The Open Mina Node |
| 1 | +<div align="center"> |
| 2 | + <picture> |
| 3 | + <source media="(prefers-color-scheme: dark)" srcset="docs/assets/OpenMinaGH_Light.svg"> |
| 4 | + <source media="(prefers-color-scheme: light)" srcset="docs/assets/OpenMinaGH_Dark.svg"> |
| 5 | + <img alt="The Open Mina Node is a fast and secure implementation of the Mina protocol in Rust." |
| 6 | + src="docs/assets/OpenMinaGH_Light.svg" |
| 7 | + width="152px"> |
| 8 | + </picture> |
2 | 9 |
|
3 | | -## With the Rust-based Open Mina node, you can produce, validate and apply blocks |
| 10 | +![Beta][beta-badge] [![release-badge]][release-link] [![Changelog][changelog-badge]][changelog] [![Apache licensed]][Apache link] |
4 | 11 |
|
5 | | -[](https://github.com/openmina/openmina/actions/workflows/daily.yaml) [![Changelog][changelog-badge]][changelog] [![release-badge]][release-link] [![Apache licensed]][Apache link] |
| 12 | +_The **Open Mina Node** is a fast and secure implementation of the Mina protocol in **Rust**._ |
| 13 | +_Currently in **public beta**, join our [Discord community](https://discord.com/channels/484437221055922177/1290662938734231552) to help test future releases._ |
6 | 14 |
|
7 | | -## Run the Block Producer |
| 15 | +</div> |
8 | 16 |
|
9 | | -Once you have completed the [pre-requisites](./docs/docker-installation.md) for your operating system, follow these steps: |
| 17 | +--- |
10 | 18 |
|
11 | | -### Setup Option 1: Download Docker Compose Files from the Release |
| 19 | +## Getting Started |
12 | 20 |
|
13 | | -1. **Download the Docker Compose files:** |
| 21 | +### Building from Source |
14 | 22 |
|
15 | | - - Go to the [Releases page](https://github.com/openmina/openmina/releases) of this repository. |
16 | | - - Download the latest `openmina-vX.Y.Z-docker-compose.zip` (or `.tar.gz`) file corresponding to the release version (available since v0.8.0). |
| 23 | +- [Rust Node](/docs/building-from-source-guide.md#how-to-build-and-launch-a-node-from-source) and [Dashboards](./docs/building-from-source-guide.md#how-to-launch-the-ui) |
17 | 24 |
|
18 | | -2. **Extract the files:** |
| 25 | +### Run Node on Devnet via Docker |
19 | 26 |
|
20 | | - - Unzip or untar the downloaded file: |
21 | | - ```bash |
22 | | - unzip openmina-vX.Y.Z-docker-compose.zip |
23 | | - ``` |
24 | | - or |
25 | | - ```bash |
26 | | - tar -xzvf openmina-vX.Y.Z-docker-compose.tar.gz |
27 | | - ``` |
28 | | - - Replace `vX.Y.Z` with the actual release version you downloaded. |
| 27 | +- [Non-Block Producing Node](/docs/alpha-testing-guide.md) Connect to peers and sync a node on the devnet; no devnet stake needed. |
| 28 | +- [Block Producing Node](/docs/block-producer-guide.md) Produce blocks on the devnet; sufficient devnet stake needed. |
| 29 | +- [Local Block Production Demo](/docs/local-demo-guide.md) Produce blocks on a custom local chain without devnet stake. |
29 | 30 |
|
30 | | -3. **Navigate to the extracted directory:** |
31 | | - ```bash |
32 | | - cd openmina-vX.Y.Z-docker-compose |
33 | | - ``` |
| 31 | +<img src="docs/assets/NodeUI.png" alt="Block production Node UI"> |
34 | 32 |
|
35 | | -### Setup Option 2: Clone the Repository |
| 33 | +--- |
36 | 34 |
|
37 | | -1. **Clone this repository:** |
| 35 | +## Release Process |
38 | 36 |
|
39 | | - ```bash |
40 | | - git clone https://github.com/openmina/openmina.git |
41 | | - ``` |
| 37 | +**This project is in beta**. We maintain a monthly release cycle, providing [updates every month](https://github.com/openmina/openmina/releases). |
42 | 38 |
|
43 | | -2. **Navigate to the repository:** |
44 | | - ```bash |
45 | | - cd openmina |
46 | | - ``` |
47 | 39 |
|
48 | | -### Launch |
49 | 40 |
|
50 | | -**Run the following command to start the demo:** |
| 41 | +## Core Features |
51 | 42 |
|
52 | | -```bash |
53 | | -docker compose -f docker-compose.local.producers.yml up --pull always --force-recreate |
54 | | -``` |
55 | | - |
56 | | -And finally: |
57 | | - |
58 | | -**Open your browser and visit [http://localhost:8070](http://localhost:8070)** |
59 | | - |
60 | | -You should see the following screen: |
61 | | - |
62 | | - |
63 | | - |
64 | | -## Description |
65 | | - |
66 | | -The Open Mina Node is a Mina node written completely in Rust and capable of verifying blocks of transactions, producing blocks and generating SNARKs. |
67 | | - |
68 | | -In the design of the Open Mina node, we are utilizing much of the same logic as in the Mina Web Node. The key difference is that unlike the Web Node, which is an in-browser node with limited resources, the Open Mina node is able to perform resource-intensive tasks such as SNARK proof generation. |
69 | | - |
70 | | -## Overview of the Node’s current functionalities |
71 | | - |
72 | | -| Current functionalities | In Development | Future Plans | |
73 | | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | --------------------------------------------------- | |
74 | | -| ☑ **Produce and prove blocks** (with and without transactions). | ☐ Receiving and broadcasting transactions from/into the transaction pool. | ☐ Direct transfer of MINA funds using Webnode | |
75 | | -| ☑ **Produce SNARK proofs** for transactions. | ☐ A block replayer that uses data from the archive nodes | ☐ O1JS support for Webnode. | |
76 | | -| ☑ **Connect to the network** and sync up to the best tip block | | | |
77 | | -| ☑ **Validate and apply new blocks** and transactions to update consensus and ledger state. | | | |
78 | | -| ☑ **Broadcast messages**: blocks, SNARK pool | | | |
79 | | - |
80 | | -Please note that receiving and broadcasting transactions from/into the transaction pool is already possible, but is still an early alpha version and needs more work. |
81 | | - |
82 | | -## Updates to the Front End |
83 | | - |
84 | | -We've added two new pages to the node's front end: |
85 | | - |
86 | | -### Mempool |
87 | | - |
88 | | - |
89 | | - |
90 | | -Shows a list of the transactions from the pool and a side panel detail. |
91 | | - |
92 | | -### Benchmarks |
93 | | - |
94 | | - |
95 | | - |
96 | | -The benchmarks page helps us to send transactions. The transactions are signed in the front end by the Mina signer. |
97 | | -Every user can send transactions and they can see in the mempool whether the transactions were sent by their node. |
98 | | - |
99 | | -## Launch the block producer demo |
100 | | - |
101 | | -Run the Open Mina block producer node by following this [guide](https://github.com/openmina/openmina/blob/main/docs/producer-demo.md). |
102 | | - |
103 | | -## How to launch the node (with Docker compose): |
104 | | - |
105 | | -From the directory containing the Docker Compose files (either the root of the cloned repository or the directory where the released Docker Compose files were extracted): |
106 | | - |
107 | | -``` |
108 | | -docker compose up --pull always |
109 | | -``` |
110 | | -
|
111 | | -Then visit http://localhost:8070 in your browser. |
112 | | -
|
113 | | - |
114 | | -
|
115 | | -By default, `docker compose up` will use the latest node and frontend images available (tagged with `latest`), but specific versions can be selected by using the `OPENMINA_TAG` and `OPENMINA_FRONTEND_TAG` variables. |
116 | | -
|
117 | | -## How to launch the node (without Docker compose): |
118 | | -
|
119 | | -This installation guide has been tested on Debian and Ubuntu and should work on most distributions of Linux. |
120 | | -
|
121 | | -**Pre-requisites:** |
122 | | -
|
123 | | -Ubuntu or Debian-based Linux distribution with the following packages installed: |
124 | | -
|
125 | | -- `curl` |
126 | | -- `git` |
127 | | -- `libssl-dev` |
128 | | -- `pkg-config` |
129 | | -- `protobuf-compiler` |
130 | | -- `build-essential` |
131 | | -
|
132 | | -Example (debian-based): |
133 | | -
|
134 | | -```sh |
135 | | -# Either using "sudo" or as the "root" user |
136 | | -sudo apt install curl git libssl-dev pkg-config protobuf-compiler build-essential |
137 | | -``` |
138 | | - |
139 | | -Example (macOS): |
140 | | - |
141 | | -If you have not yet installed homebrew: |
142 | | - |
143 | | -```sh |
144 | | -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
145 | | -``` |
146 | | - |
147 | | -```sh |
148 | | -brew install curl git openssl pkg-config protobuf gcc make |
149 | | -``` |
150 | | - |
151 | | -**Steps (for Debian-based Linux distros and macOS):** |
152 | | - |
153 | | -Open up the command line and enter the following: |
154 | | - |
155 | | -And then: |
156 | | - |
157 | | -```sh |
158 | | -# Install rustup and set the default Rust toolchain to 1.83 (newer versions work too) |
159 | | -curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.83 |
160 | | -# Setup the current shell with rustup |
161 | | -source "$HOME/.cargo/env" |
162 | | -# Clone the openmina repository |
163 | | -git clone https://github.com/openmina/openmina.git |
164 | | -cd openmina/ |
165 | | -# Build and run the node |
166 | | -cargo run --release -p cli node |
167 | | -``` |
168 | | - |
169 | | -## How to launch the UI: |
170 | | - |
171 | | -## Prerequisites |
172 | | - |
173 | | -### 1. Node.js v20.11.1 |
174 | | - |
175 | | -#### MacOS |
176 | | - |
177 | | -```bash |
178 | | -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
179 | | - |
180 | | -``` |
181 | | - |
182 | | -#### Linux |
183 | | - |
184 | | -```bash |
185 | | -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash |
186 | | -source ~/.bashrc |
187 | | -nvm install 20.11.1 |
188 | | -``` |
189 | | - |
190 | | -#### Windows |
191 | | - |
192 | | -Download [Node.js v20.11.1](https://nodejs.org/) from the official website, open the installer and follow the prompts to complete the installation. |
193 | | - |
194 | | -### 2. Angular CLI v17.3.0 |
195 | | - |
196 | | -```bash |
197 | | -npm install -g @angular/ [email protected] |
198 | | -``` |
199 | | - |
200 | | -### 3. Installation |
201 | | - |
202 | | -Open a terminal and navigate to this project's root directory |
203 | | - |
204 | | -```bash |
205 | | -cd PROJECT_LOCATION/openmina/frontend |
206 | | -``` |
207 | | - |
208 | | -Install the dependencies |
209 | | - |
210 | | -```bash |
211 | | -npm install |
212 | | -``` |
213 | | - |
214 | | -## Run the application |
215 | | - |
216 | | -```bash |
217 | | -npm start |
218 | | -``` |
| 43 | +- **Mina Network**: Connect to peers, sync up, broadcast messages |
| 44 | +- **Block Production**: Produces, validates, and applies blocks according to Mina's consensus. |
| 45 | +- **SNARK Generation**: Produce SNARK proofs for transactions |
| 46 | +- **Debugging**: A block replayer that uses data from the archive nodes |
219 | 47 |
|
220 | 48 | ## Repository Structure |
221 | 49 |
|
222 | | -- [core/](core) - Provides basic types needed to be shared across different |
223 | | - components of the node. |
| 50 | +- [core/](core) - Provides basic types needed to be shared across different components of the node. |
224 | 51 | - [ledger/](ledger) - Mina ledger implementation in Rust. |
225 | 52 | - [snark/](snark) - Snark/Proof verification. |
226 | 53 | - [p2p/](p2p) - P2p implementation for OpenMina node. |
227 | 54 | - [node/](node) - Combines all the business logic of the node. |
228 | | - - [native/](node/native) - OS specific pieces of the node, which is |
229 | | - used to run the node natively (Linux/Mac/Windows). |
| 55 | + - [native/](node/native) - OS specific pieces of the node, which is used to run the node natively (Linux/Mac/Windows). |
230 | 56 | - [testing/](node/testing) - Testing framework for OpenMina node. |
231 | 57 | - [cli/](cli) - OpenMina cli. |
232 | 58 | - [frontend/](frontend) - OpenMina frontend. |
233 | 59 |
|
234 | | -[Details regarding architecture](ARCHITECTURE.md) |
235 | | - |
236 | 60 | ## The Open Mina Documentation |
237 | 61 |
|
| 62 | +### What is Open Mina? |
| 63 | + |
238 | 64 | - [Why we are developing Open Mina](docs/why-openmina.md) |
239 | | -- What is Open Mina? |
240 | | - - [Openmina Node](#the-open-mina-node) |
241 | | - - [The Mina Web Node](https://github.com/openmina/webnode/blob/main/README.md) |
242 | | -- Core components |
243 | | - - [P2P communication](https://github.com/openmina/openmina/blob/documentation/docs/p2p_service.md) |
244 | | - - [GossipSub](https://github.com/openmina/mina-wiki/blob/3ea9041e52fb2e606918f6c60bd3a32b8652f016/p2p/mina-gossip.md) |
245 | | - - [Scan state](docs/scan-state.md) |
246 | | - - [SNARKs](docs/snark-work.md) |
247 | | -- Developer tools |
248 | | - - [Debugger](https://github.com/openmina/mina-network-debugger/blob/main/README.md) |
249 | | - - [Front End](https://github.com/openmina/mina-frontend/blob/main/README.md) |
250 | | - - [Dashboard](https://github.com/openmina/mina-frontend/blob/main/docs/MetricsTracing.md#Dashboard) |
251 | | -- [Testing](docs/testing/testing.md) |
252 | | -- How to run |
253 | | - - [Launch Openmina node](#how-to-launch-without-docker-compose) |
254 | | - - [Launch Node with UI](#how-to-launch-with-docker-compose) |
255 | | - - [Debugger](https://github.com/openmina/mina-network-debugger?tab=readme-ov-file#Preparing-for-build) |
256 | | - - [Web Node](https://github.com/openmina/webnode/blob/main/README.md#try-out-the-mina-web-node) |
257 | | -- External links |
258 | | - - [Medium](https://medium.com/openmina) |
259 | | - - [Twitter](https://twitter.com/viable_systems) |
| 65 | + |
| 66 | +### Core components |
| 67 | + |
| 68 | +- [P2P communication](https://github.com/openmina/openmina/blob/documentation/docs/p2p_service.md) |
| 69 | + - [GossipSub](https://github.com/openmina/mina-wiki/blob/3ea9041e52fb2e606918f6c60bd3a32b8652f016/p2p/mina-gossip.md) |
| 70 | +- [Scan state](docs/scan-state.md) |
| 71 | +- [SNARKs](docs/snark-work.md) |
| 72 | + |
| 73 | +### Developer tools |
| 74 | + |
| 75 | +- [Front End](./docs/building-from-source-guide.md#how-to-launch-the-ui) |
| 76 | + |
| 77 | +### Testing Framework for Mina |
| 78 | + |
| 79 | +- [Full Testing Documentation](docs/testing/testing.md) |
| 80 | + |
| 81 | +### How to run |
| 82 | + |
| 83 | +- [Non-Block Producing Node](./docs/alpha-testing-guide.md) |
| 84 | +- [Block Producing Node](./docs/block-producer-guide.md) |
| 85 | +- [Local Block Production Demo](./docs/local-demo-guide.md) |
260 | 86 |
|
261 | 87 | [changelog]: ./CHANGELOG.md |
| 88 | +[beta-badge]: https://img.shields.io/badge/status-beta-yellow |
262 | 89 | [changelog-badge]: https://img.shields.io/badge/changelog-Changelog-%23E05735 |
263 | 90 | [release-badge]: https://img.shields.io/github/v/release/openmina/openmina |
264 | 91 | [release-link]: https://github.com/openmina/openmina/releases/latest |
|
0 commit comments