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
- Install or update your node to the required specific mina daemon.
- Start a mina node and connect to Devnet.
- 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 20.04 and Debian 11
Install the latest Stable Mina Release 3.0.3 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:
sudo rm /etc/apt/sources.list.d/mina*.list
sudo echo "deb [trusted=yes] http://packages.o1test.net $(lsb_release -cs) devnet" | sudo tee /etc/apt/sources.list.d/mina-devnet.list
sudo apt-get install --yes apt-transport-https
sudo apt-get update
sudo apt-get install --yes curl unzip mina-devnet=3.0.0
To check that daemon installed correctly:
mina version
The expected output is:
Commit dc6bf78b8ddbbca3a1a248971b76af1514bf05aa on branch berkeley
Generate keypairs
mkdir -p .mina-config/keys
As described in the Generate keypairs guide, each node in the Mina network must possess its own distinct libp2p key pair to comminicate with other nodes.
export MINA_LIBP2P_PASS="My_V3ry_S3cure_Password"
mina libp2p generate-keypair -privkey-path .mina-config/keys/libp2p-key
If you wish to participate in the network as a block producer or a snark-coordinator, you will also need a wallet key pair.
export MINA_PRIVKEY_PASS="My_V3ry_S3cure_Password"
mina-generate-keypair --privkey-path .mina-config/keys/my-wallet
Set the correct permissions
When running your daemon using Docker, ensure your private keys have the correct permissions.
chmod 700 .mina-config/keys
chmod 600 .mina-config/keys/libp2p-key
chmod 600 .mina-config/keys/my-wallet
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://bootnodes.minaprotocol.com/networks/devnet.txt \
--libp2p-keypair .mina-config/keys/libp2p-key
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 produce blocks or otherwise customize the configuration for the mina daemon, create a .mina-env
files with the following:
export MINA_PRIVKEY_PASS="My_V3ry_S3cure_Password"
export MINA_LIBP2P_PASS="My_V3ry_S3cure_Password"
LOG_LEVEL=Info
FILE_LOG_LEVEL=Debug
EXTRA_FLAGS=" --block-producer-key /data/.mina-config/keys/my-wallet --libp2p-keypair /data/.mina-config/keys/libp2p-key"
PEER_LIST_URL=https://bootnodes.minaprotocol.com/networks/devnet.txt
In the example above, /data/.mina-config/keys/my-wallet
is the absolute path of your block producer private key mounted in the container.
If you do not want to produce blocks, provide only the PEER_LIST_URL
and the --libp2p-keypair
flag.
EXTRA_FLAGS="--libp2p-keypair /data/.mina-config/keys/libp2p-key"
Now, run the image with your .mina-config
and .mina-env
and keys
files mounted into the container:
docker run --name mina -d \
-p 8302:8302 \
--restart=always \
-v $(pwd)/.mina-config:/data/.mina-config \
-v $(pwd)/.mina-env:/entrypoint.d/mina-env \
gcr.io/o1labs-192920/mina-daemon:3.0.3-d800da8-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