Mina Protocol
Mina is a layer-1 blockchain with a 22KB blockchain & zero knowledge smart contracts (“zkApps”) written in TypeScript.
Resources
Hardware requirements
Mina Daemon Node
8 cores with BMI2 and AVX CPU instruction set are required
32 GB
64 GB
1 mbps
Linux (Ubuntu 20.04 x64)
Installation 💾
Generating a Key Pair
Install the mina-generate-keypair utility:
The expected output is: Commit 93e02797f72abe2cbf8dfca6f2328e9c8cd76546 on branch berkeley
Generate your keys
Run the mina advanced generate-keypair
command:
When prompted, type in the password you intend to use to secure this key. Do NOT forget this password. If already set, the tool uses the password from the MINA_PRIVKEY_PASS
environment variable instead of prompting you.
Validate your private key
Now that you've created your key, validate that it works. It's sufficient to use the mina advanced validate-keypair
command to verify that you can sign a transaction.
Block Producer Getting Started
Get started setting up a Mina node, learn how to generate a key pair for use with the network, and install the mina daemon
.
Install:
Now install the node package:
verify the mina daemon installation, run:
The expected output is Commit 93e02797f72abe2cbf8dfca6f2328e9c8cd76546 on branch berkeley
.
If you are using UFW, allow these permissions
Connect to the Mina Network
Steps to install mina, connect to the Mina Mainnet network, and test connectivity.
High-Level Overview
Install or update your node to the latest mina daemon.
Start a standalone mina node.
Stop the standalone node.
Configure the node as a block producer, or customize, with the
~/.mina-env
file.Start a mina node with auto-restart workflows.
Check your connectivity.
Monitor the mina client status.
Start a standalone mina node
Start a standalone mina node to make sure everything works.
To start a mina node instance and connect to the live network:
The --peer-list
argument specifies the source file of seed peer addresses for the initial peer to connect to on the network. Mina is a peer-to-peer protocol, so there is no dependence on a single centralized server.
If you have a key with MINA stake and want to produce blocks:
where ~/keys/my-wallet
is the path to your private key, if not the default.
Stop the standlone node
Kill the existing mina daemon
process: Press Ctrl+C
.
Start a mina node with auto-restart flows using systemd
Now that you've confirmed things are okay by running the standalone process, start mina with auto-restart workflows that allow the node to continue running after you log out and restart automatically when the machine restarts.
Create and customize the .mina-env
To produce blocks or otherwise customize the configuration for the mina daemon:
Create the
~/.mina-env
file.To produce blocks, add the required configuration:
Replace
<BLOCK_PRODUCER_KEY_PATH>
with the full path to your block producer private key. For example,/home/ubuntu/keys/my-wallet
.If you do not want to produce blocks, then you can keep
~/.mina-env
empty for now.To change how mina is configured, specify flags to the mina daemon process with space-separated arguments between the quotes in
EXTRA_FLAGS=""
.You can change the default values with
EXTRA_FLAGS
:External port 8302
Change with
-external-port
Mainnet seed peers list https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt
Change with
--peer-list-url
After your
.mina-env
file is ready, start a mina node instance and connect to the live network using systemctl to control systemd:These commands allow the node to continue running after you log out and restart automatically when the machine reboots.
Check your connectivity
Monitor the mina process that's running in the background and auto-restarting.
Check if mina
had any trouble getting started:
Stop mina gracefully and stop automatically restarting the service:
Manually restart the mina process:
Look at logs that show the last 1000 lines, and follow from there:
In some cases, you might need to run the following command to view the logs:
Last updated