Skip to main content

Connect to Devnet

The Devnet network is designed for testing and experimentation. Devnet is a dedicated network for developers who are building on top of the Mina protocol.

On the Devnet network, MINA holds no real value. To request a prefunded account, reach out on Mina Protocol Discord.

If you are interested in running a node, connect to Mainnet network instead.

High-Level Overview

  1. Install or update your node to the required specific mina daemon.
  2. Start a mina node and connect to Devnet.
  3. Check your connectivity.

Update your software

Connecting to Devnet requires a specific build of the Mina client and a specific version of a peers list.

Follow the steps for your operating system.

Ubuntu 18.04 and Debian 9

Install the latest Stable Mina Release 1.3.1.2 or visit the GitHub Releases Page to install pre-release (Alpha/Beta) builds.

To set up the new debian stable repository and install the latest version:

echo "deb [trusted=yes] http://packages.o1test.net $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/mina.list
sudo apt-get install --yes apt-transport-https
sudo apt-get update
sudo apt-get install --yes curl unzip mina-devnet=1.3.0-9b0369c

To check that daemon installed correctly:

mina version

The expected output is:

Commit 9b0369c27bb85c8ab2f8725c6e977eb27b53b826 on branch master

Start and connect a node to Devnet

To start a Mina node instance and connect to the Devnet network:

mina daemon --peer-list-url https://storage.googleapis.com/seed-lists/devnet_seeds.txt

The --peer-list argument specifies the 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.

Docker

To run your daemon using Docker, create a directory on the host machine to mount as a volume:

cd ~
mkdir ~/.mina-config

To produce blocks or customize the configuration for the mina daemon, create the ~/.mina-env file:

export MINA_PRIVKEY_PASS="My_V3ry_S3cure_Password"
LOG_LEVEL=Info
FILE_LOG_LEVEL=Debug
EXTRA_FLAGS=" --block-producer-key <BLOCK_PRODUCER_KEY_PATH>"
PEER_LIST_URL=https://storage.googleapis.com/seed-lists/devnet_seeds.txt

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 provide only the PEER_LIST_URL.

Now, run the image with your ~/.mina-config and ~/.mina-env files mounted into the container:

docker run --name mina -d \
-p 8302:8302 \
--restart=always \
--mount "type=bind,source=$(pwd)/.mina-env,dst=/entrypoint.d/mina-env,readonly" \
--mount "type=bind,source=$(pwd)/.mina-config,dst=/root/.mina-config" \
minaprotocol/mina-daemon:1.3.1.2-25388a0-bullseye-devnet \
daemon \

Check your connectivity

Follow the logs:

docker logs -f mina

If the node crashes, save the log output to a file:

docker logs mina > mina-log.txt

Monitor connectivity to the network:

docker exec -it mina mina client status