whoabuddy

May 134 min read

Step 1: Running a Follower Node (Zero to Testnet Series)

NOTE! Argon is live now!

The second phase of the testnet, Argon, launched on 06/03/2020 so the instructions below are not 100% correct.

You can see the differences on the Testnet website, mainly to the start command, but the post below will remain up as a general reference to both the process I originally took with the Neon phase, as well as a basic outline of what's required to run a node on Argon.

Also, if you are interested in mining during the Argon phase, check out this repository with a one-liner script to get you online! It's much easier!!

Background

This series of blog posts will be broken up by topic based on setting up and using Virtualbox and Ubuntu Server to perform tasks as laid out on the Blockstack Testnet website.

As the testnet website expands it is my hope to expand this series as well documenting my experiences.

Prerequisites

Before we run the Blockstack testnet node, there are a few things we need to complete. A lot of this information can be found in and will follow along with the Blockstack documentation under Run a Stacks Testnet Node.

Install Ubuntu Packages

Since we are using Ubuntu, we need to install some packages before installing Rust or anything else.

At the terminal prompt:

  1. Type in: sudo apt-get install -y build-essential cmake libssl-dev pkg-config and press Enter
  2. Type in your sudo password and press Enter
  3. The installations will process automatically, and once complete you will be at a blank command prompt again

Install Rust

Next, we install the Rust programming language.

At the terminal prompt:

  1. Type in: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh and press Enter
  2. The installation script will display some information about the default settings for installation, as well as prompt for input.
  3. Type 1 and press Enter to proceed with the installation (default).
  4. When the installation is complete, you will receive confirmation and be at a blank command prompt again
  5. Before you can use cargo and other Rust-related commands, type in: source $HOME/.cargo/env and press Enter

Clone the Repository

Next, we download (clone) the files required to run the Blockstack Testnet node from the Blockstack Github repository.

At the terminal prompt:

  1. Type in: git clone https://github.com/blockstack/stacks-blockchain.git and press Enter
  2. Type in: cd ./stacks-blockchain and press Enter
🎉 Congratulations, if you made it this far then you are ready to run a Blockstack Testnet node! ☕

Running the Node

The instructions here vary slightly from the Testnet instructions, and should provide a more stable experience. Instead of installing the testnet to a local directory, we use cargo to build the testnet then run it, using the command below.

  1. Type in: cargo testnet neon and press Enter
  2. Rust will compile and start the node, which takes an average of 5-10 minutes depending on your configuration and available memory
  3. When the node starts, a message similar to this will be seen containing First-ever block:

That's it! The Blockstack Testnet node is now officially up and running, and the screen will continue to update with information as the node processes transactions from the network.

Note: If you want to run the testnet with debugging enabled, change the command above to RUST_BACKTRACE=FULL BLOCKSTACK_DEBUG=1 cargo testnet neon, however this results in significantly more output on the screen and can be difficult to read. If you run into any errors, please search for or file an issue on the Blockstack stacks-blockchain repository, or reach out to me on the Blockstack Discord - @whoabuddy

Pulling in Changes (Updates)

From time to time we will need to pull the most updated code from Github to run our node. Follow the instructions below to stop a running node, update the code, and start it again.

  1. Using the keyboard, press Ctrl+C to stop the node. A blank terminal prompt should appear.
  2. Type in: git pull and press Enter from the ./stacks-node folder to download and apply the latest changes
  3. Type in: cargo testnet neon to start the node again

Share this story