Open lukasimrich opened 5 months ago
The OpenMina Node is a Mina node written entirely in Rust, capable of verifying blocks of transactions, producing blocks and generating SNARKs.
Unlike the resource-limited Mina Web Node, OpenMina handles resource-intensive tasks like SNARK proof generation.
The OpenMina node allows you to | In Development | Future Plans |
---|---|---|
☑ Connect to the network and sync up to the best tip block | ☐ Produce SNARKs in Rust (currently we use OCaml subprocess for that) | ☐ Direct transfer of MINA funds |
☑ Validate and apply new blocks and transactions to update consensus and ledger state | ☐ Block production | |
☑ Produce SNARKs to complete SNARK work | ☐ The ability to record/replay all blocks | |
☑ Broadcast messages: blocks, SNARK pool | ☐ SnarkyJS support for Rust node, enabling direct injection of simple transactions, such as transferring Mina funds | |
☑ SNARK proof generation for transactions |
This demo runs in a private network with block proofs disabled, eliminating the need to wait for staking ledger inclusion.
docker compose up
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.
Ubuntu or Debian-based Linux distribution with the following packages installed:
curl
git
libssl-dev
pkg-config
protobuf-compiler
build-essential
If Homebrew is not installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install curl git openssl pkg-config protobuf gcc make
# Either using "sudo" or as the "root" user
sudo apt install curl git libssl-dev pkg-config protobuf-compiler build-essential
Steps (for Debian-based Linux distros and macOS):
Open up the command line and enter the following:
# 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 node@20.11.1
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/cli@16.2.0
cd PROJECT_LOCATION/openmina/frontend
npm install
npm start
Details regarding architecture
This demo runs in a private network with block proofs disabled, eliminating the need to wait for staking ledger inclusion.
docker compose up
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.
Ubuntu or Debian-based Linux distribution with the following packages installed:
curl
git
libssl-dev
pkg-config
protobuf-compiler
build-essential
If Homebrew is not installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install curl git openssl pkg-config protobuf gcc make
# Either using "sudo" or as the "root" user
sudo apt install curl git libssl-dev pkg-config protobuf-compiler build-essential
Steps (for Debian-based Linux distros and macOS):
Open up the command line and enter the following:
# 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 node@20.11.1
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/cli@16.2.0
cd PROJECT_LOCATION/openmina/frontend
npm install
npm start
Details regarding architecture
This demo showcases the block production capabilities of OpenMina nodes within a private network. It launches three OpenMina nodes on your local machine, operating in a private network environment. For the purpose of this demonstration, block proofs are disabled. This setup allows you to observe block production immediately, without the need to wait for your account to be included in the staking ledger on testnets.
Download Docker Desktop for Mac from the Docker Website.
Open the downloaded .dmg
file and drag Docker to the Applications folder.
Open Docker from the Applications folder and follow the installation steps.
Open up a terminal window by using the shortcut Command + Space and type in terminal
Verify the installation by running the following command in your terminal:
docker --version
Set up Docker's apt repository:
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Install the Docker packages:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Add your user to the docker
group:
sudo usermod -aG docker $USER
newgrp docker
Verify the installation:
docker run hello-world
Download Docker Desktop for Windows from the Docker Website.
Run the installer and follow the instructions.
After installation, Docker will start automatically. Verify that Docker Desktop is running by checking the Docker icon in your system tray.
Open a terminal by pressing command + space on your keyboard and type in terminal
Clone this repository:
git clone https://github.com/openmina/openmina.git
Navigate to the repository:
cd openmina
Run the following command to start the demo:
docker compose -f docker-compose.local.producers.yml up
Open you browser and visit http://localhost:8070
Clone this repository:
git clone https://github.com/openmina/openmina.git
Navigate to the repository:
cd openmina
Run the following command to start the demo:
docker compose -f docker-compose.local.producers.yml up
Open you browser and visit http://localhost:8070
Open the command prompt by pressing the windows button on your keyboard and type in command prompt
Clone this repository:
git clone https://github.com/openmina/openmina.git
Navigate to the repository:
cd openmina
Run the following command to start the demo:
docker compose -f docker-compose.local.producers.yml up
Open you browser and visit http://localhost:8070
WHAT Readme docs and Producer Demo docs
WHY I went through these docs a few times as a user, and had some ideas to improve structure so it prioritizes macOS and it is easier to follow
HOW
[x] First, I condensed the start and added TOC, TOC is a nice touch to showcase what is actually inside and we have two slightly distinct categories: (1)Trying stuff, (2)Exploring and Understanding Code
[x] Second, I added some context to block producer section, so it is more obvious what to expect in the detailed guide
[x] Third, I restructured and Renamed Titles around building a node, I wanted headlines to be as informative as it gets - So I replaced generic how to launch with/without docker compose with more specific titles