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

CPU

8 cores with BMI2 and AVX CPU instruction set are required

RAM

32 GB

Storage

64 GB

Network

1 mbps

OS

Linux (Ubuntu 20.04 x64)

Installation 💾

Generating a Key Pair

Install the mina-generate-keypair utility:

echo "deb [trusted=yes] http://packages.o1test.net $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/mina.list
sudo apt-get update
sudo apt-get install -y mina-mainnet=3.0.2-4aac388

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

circle-info

Get started setting up a Mina node, learn how to generate a key pairarrow-up-right 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 permissionsarrow-up-right

Connect to the Mina Network

Steps to install mina, connect to the Mina Mainnet network, and test connectivity.

High-Level Overviewarrow-up-right

  1. Install or update your node to the latest mina daemon.

  2. Start a standalone mina node.

  3. Stop the standalone node.

  4. Configure the node as a block producer, or customize, with the ~/.mina-env file.

  5. Start a mina node with auto-restart workflows.

  6. Check your connectivity.

  7. 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-peerarrow-up-right 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 nodearrow-up-right

Kill the existing mina daemon process: Press Ctrl+C.

Start a mina node with auto-restart flows using systemdarrow-up-right

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-envarrow-up-right

To produce blocks or otherwise customize the configuration for the mina daemon:

  1. Create the ~/.mina-env file.

  2. 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.

  3. 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:

  4. 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 connectivityarrow-up-right

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