7.1 Running a Devnet Locally
For testing your programs, you'll want to deploy them on a local devnet and execute test transitions there, instead of doing everything on the testnet. Here's how to run a local devnet.
Install tmux
tmuxTo run a local devnet with the script, start by installing tmux.
macOS
To install tmux on macOS, you can use the Homebrew package manager. If you haven't installed Homebrew yet, you can find instructions at their website.
# Once Homebrew is installed, run:
brew install tmuxUbuntu
On Ubuntu and other Debian-based systems, you can use the apt package manager:
sudo apt update
sudo apt install tmuxWindows
There are a couple of ways to use tmux on Windows:
Using Windows Subsystem for Linux (WSL)
First, install Windows Subsystem for Linux.
Once WSL is set up and you have a Linux distribution installed (e.g., Ubuntu), open your WSL terminal and install
tmuxas you would on a native Linux system:
sudo apt update
sudo apt install tmuxStart the Local Devnet
To start a local devnet, run:
Follow the instructions in the terminal to start the devnet, press enter to use the default parameters.
Development private keys and addresses are then printed to the terminal. You can scroll up using ctrl+b+[. Be quick because history is limited by default.
Interface
Switch Nodes (forward)
To toggle to the next node in a local devnet, run:
Switch Nodes (backwards)
To toggle to the previous node in a local devnet, run:
Select a Node (choose-tree)
To select a node in a local devnet, run:
Select a Node (manually)
To select a node manually in a local devnet, run:
Stop the Local Devnet
To stop a local devnet, run:
Then, press Enter.
Lightweight Alternative
Amaraleo is a lightweight version for running snarkOS with devnet.sh:
Last updated