This repo contains a simple shell script that will help you set up and run a Miner Node on the Stacks 2.0 Testnet.
Note: the code was updated on 2020/12/15 to run the correct configuration for the Daemon Technologies Mining Competition.
Note: The Xenon phase is not supported by this repository (yet).
This script is designed for and tested with Ubuntu Server 20.04 LTS.
In theory, it should work for any Ubuntu-based installation but YMMV.
If you run into an error, please file an issue with more information.
To run the script, simply use the command below.
curl -sS -o- https://raw.githubusercontent.com/AbsorbingChaos/bks-setup-miner/master/config-miner-krypton.sh | bash
It will download the file from this repository and run it via bash
.
To stop the script or the miner (once it's running), press CTRL+C
on Linux, or COMMAND+.
on MacOS.
The script can be run multiple times, and will complete the following tasks:
build-essential cmake libssl-dev pkg-config jq git bc
This link will allow you to manually view or download the script, as well as the node configuration file, if you are into that kind of thing.
To run the script in debug mode, there are a few extra steps involved, but it provides a lot of useful information and records the screen output to a file that can be used to report to the team or file an issue on GitHub.
Note: The log file can grow really fast in this mode, so if leaving running for more than one day, be sure to double-check you have enough free space.
First, download the script:
curl -sS -O https://raw.githubusercontent.com/AbsorbingChaos/bks-setup-miner/master/config-miner-krypton.sh
Second, run the script with the debug
option:
bash config-miner-krypton.sh debug
In addition to the tasks listed above, this will:
cargo start
using the script
command, to a file named bks-miner-YYYYMMDD-HHMMSS.txt
cargo start
with the environment variables BLOCKSTACK_DEBUG=1
and RUST_BACKTRACE=full
This file contains a copy of all the terminal output seen on the screen, and is saved if the miner crashes or when the miner is stopped.
To view the status of the blockchain, click the link below.
http://status.test-blockstack.com/
To view a live demonstration of the setup for Virtualbox, Ubuntu Server, and usage of the script, check out the video below!
Before running the script, I recommend setting up a virtual machine using Virtualbox.
A step by step walkthrough of installing Virtualbox and setting up the Ubuntu Server virtual machine can be found at the link below as part of the Zero to Testnet Blog Series:
The specifications I used for my Ubuntu Server virtual machine are listed and pictured below:
Please note that this script is released under the MIT License. Please only run this script on a virtual machine setup for the purpose of mining on the Blockstack Stacks 2.0 Testnet, and please do not run this script on any system used in production.
THIS IS FOR TESTING PURPOSES ONLY!
If you run into any issues with the script or have any general questions about the process, feel free to file an issue here, or reach out to me via the Blockstack Discord channel @whoabuddy.