The Open Mina Node is a Mina node written completely in Rust and capable of verifying blocks of transactions, producing blocks and generating SNARKs.
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.
Currently, with the Open Mina node, you can:
- Connect to the network and sync up to the best tip block
- Validate and apply new blocks and transactions to update consensus and ledger state.
- Produce SNARKs to complete SNARK work.
- Broadcast messages: blocks, SNARK pool
We are working on the following:
- Produce SNARKs in Rust (currently we use OCaml subprocess for that)
In the future, we plan to implement:
- Direct transfer of MINA funds
- Block production
- SNARK proof generation for transactions
- SnarkyJS support for Rust node, thanks to which you will be able to directly inject simple transactions, such as transferring Mina funds from one account to another.
- The ability to record/replay all blocks
See the detailed guide.
Run:
docker compose up
Then visit http://localhost:8070 in your browser.
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.
This installation guide has been tested on Debian and Ubuntu and should work on most distributions of Linux.
Pre-requisites:
Ubuntu or Debian-based Linux distribution with the following packages installed:
curl
git
libssl-dev
pkg-config
protobuf-compiler
build-essential
Example (debian-based):
# Either using "sudo" or as the "root" user
sudo apt install curl git libssl-dev pkg-config protobuf-compiler build-essential
Example (macOS):
If you have not yet installed homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install curl git openssl pkg-config protobuf gcc make
Steps (for Debian-based Linux distros and macOS):
Open up the command line and enter the following:
And then:
# Install rustup and set the default Rust toolchain to 1.77 (newer versions work too)
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.77
# Setup the current shell with rustup
source "$HOME/.cargo/env"
# Clone the openmina repository
git clone https://github.com/openmina/openmina.git
cd openmina/
# Build and run the node
cargo run --release -p cli node
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install [email protected]
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
nvm install 20.11.1
Download Node.js v20.11.1 from the official website, open the installer and follow the prompts to complete the installation.
npm install -g @angular/[email protected]
Open a terminal and navigate to this project's root directory
cd PROJECT_LOCATION/openmina/frontend
Install the dependencies
npm install
npm start
- core/ - Provides basic types needed to be shared across different components of the node.
- ledger/ - Mina ledger implementation in Rust.
- snark/ - Snark/Proof verification.
- p2p/ - P2p implementation for OpenMina node.
- node/ - Combines all the business logic of the node.
- cli/ - OpenMina cli.
- frontend/ - OpenMina frontend.
Details regarding architecture
- Why we are developing Open Mina
- What is Open Mina?
- Core components
- Developer tools
- Testing
- How to run
- External links