Analyzing Miner Data

Getting into the details.

Table of Contents

About stacks-dump

stacks-dump is a tool from Pascal (@psq) that analyzes the information from a miner in stacks-node storage and provides information such as Actual Wins, Total Wins, Total Mined, and more.

This script should be run against the stacks-node working directory, which is saved to /tmp by default unless the working_dir value is set in the stacks-node toml config file.

Note: on Windows, the default temp directory used by stacks-node is on the C drive under tmp, which is accessible from /mnt/c/tmp on WSL.

An example of the folder name: /tmp/stacks-testnet-5c87e24790411516


Finding the stacks-node Directory

By default, every time stacks-node is restarted it creates a new directory in the /tmp (C:\tmp on Windows / /mnt/c/tmp on WSL) folder to save data. This can lead to several versions of the stacks-testnet-randomstring folder, and there are two methods to find the correct one to use.

Miner Still Running

Note: The commands in this section were written for Mac, Linux, or Windows WSL users.

If stacks-node is still running, then you can use the following commands to find out what directory is in use.

First, check for the PID of the running stacks-node process.

ps -ax | grep stacks | grep -v grep

Which will output something similar to:

3322 tty1     S+     0:00 ./stacks-node krypton

In this case, 3322 is the PID, which we will use to find the open files by this process.

lsof -p 3322 | grep tmp
ctrl + c (to end the process)

Which will output something similar to:

stacks-no 3322 whoabuddy   44u      REG    8,2     16384 3801116 /tmp/stacks-testnet-cbd987d44ca5058e/burnchain/db/bitcoin/regtest/burnchain.db

In this case, /tmp/stacks-testnet-cbd987d44ca5058e/ is the folder where my data is stored, and the example I will use throughout the instructions.

Miner Stopped

Note: The commands in this section were written for Mac, Linux, or Windows WSL users.

If stacks-node is no longer running, then you have to figure out which folder in /tmp to use. If there is only one, then that is the one, but if there are multiple, then you will need to look for either the most recently modified or the largest folder of the set.

First, review all possible folders by modified date.

ls -l /tmp | grep stacks

Which will output something similar to:

drwxrwxr-x 3 whoabuddy whoabuddy 4096 Dec 31 13:48 stacks-testnet-0d33c213b410ab82
drwxrwxr-x 4 whoabuddy whoabuddy 4096 Dec 31 13:47 stacks-testnet-8eedb619cefbdd92
drwxrwxr-x 3 whoabuddy whoabuddy 4096 Dec 31 13:51 stacks-testnet-915614ad40dfed6f
drwxrwxr-x 4 whoabuddy whoabuddy 4096 Dec 31 13:46 stacks-testnet-cbd987d44ca5058e

In this case, Dec 31 13:51 is the last-used folder, which would contain data from my most recent run.

If that folder didn’t appear to have the correct information after we run stacks-dump, we could also look for the largest folder.

du -sh /tmp/stacks*

Which will output something similar to:

632K  /tmp/stacks-testnet-0d33c213b410ab82
2.0M  /tmp/stacks-testnet-8eedb619cefbdd92
16K   /tmp/stacks-testnet-915614ad40dfed6f
2.7M  /tmp/stacks-testnet-cbd987d44ca5058e

In this case, 2.7M is my largest folder so /tmp/stacks-testnet-cbd987d44ca5058e would be my target for stacks-dump, however actual testnet data will be much larger (gigabytes in size).

Using stacks-dump

Once we know our target folder from the steps above, then we can start setting up and using stacks-dump to analyze the information.


  • Node 14.x
  • Yarn
  • Git


The steps below will download stacks-dump from GitHub, change to the directory, then install the required packages via yarn.

git clone
cd stacks-dump


From the stacks-dump folder above, run the following command to analyze the miner’s data.

The steps below will use the latest version of stacks-dump, using the start and end blocks from the competition, and outputting the information in CSV format so it can easily be transferred to a spreadsheet.

For more information and all options for stacks-dump usage, please see the readme on GitHub .

node report -c /tmp/stacks-testnet-ea025d61c75f983a/

Which will review the information in stacks-node storage, and output a chart of stats that can be copy/pasted into a spreadsheet.

Sample Data

Here is an example of the data from my node following the competition:

STX address,BTC address,actual wins,total wins,total mined,%actual wins,%won,paid satoshis,theoritical win%,avg paid

... 700 more lines ...


Copy to Spreadsheet

To view an animation of copying and pasting this information from the terminal, click here to view a (fairly large) gif file.