HowTo run AlphaNet

From Veriblock Wiki
Revision as of 19:40, 12 September 2019 by Overcookedpanda (talk | contribs)
Jump to: navigation, search

See: AlphaNet


When developing, it is helpful to run a local node with low difficulty and fast sync time. The AlphaNet allows this.

AlphaNet is separate from TestNet or MainNet... nodes do not talk across different networks, and coins cannot be sent from one network to the other. Alpha coins are intended for local development purposes.

AlphaNet uses port 7502 and 10502

This article assumes familiarity with NodeCore, including: NodeCore_QuickStart (has download instructions), HowTo_run_NodeCore, NodeCore_Networking

How to run alpha locally

Start NodeCore


#NodeCore Configuration
#set network to alpha and do not pull any bootstrap nodes

#Allow a CPU pool so that we can mine and get new blocks

If you wanted to set up a network of multiple nodes in alpha, you can still explicitly add nodes:


Have just these 3 files in the bin folder (delete any previous "alpha" folder if it existed)

  • nodecore
  • nodecore.bat

Run NodeCore

This should create an "bin\alpha" folder (instead of a bin\testnet or bin\mainnet folder)

Connect via the NC_CLI

Alpha runs on port 10502 (instead of 10501 or 10500)

So connect to a local alpha instance via:


Run getstateinfo

  "network_version": "Alpha",

Run a CPU miner to get coins

In the NC_CLI, start a CPU pool

#Allow a CPU pool
startpool CPU

Run the PoW CPU Miner (part of the nodecore suite). See: HowTo_run_PoW_CPU_Miner. This will require 3 inputs:

  • Number of threads --> hit [ENTER] to accept default
  • Address/Port --> hit [ENTER] to accept default of connecting to local host
  • Address --> use any address, such as the result of getinfo in the NC_CLI

NOTE: If for some reason the CPU Miner gets stuck (block height is not increasing), then restart the CPU Miner.

Bootstrapping with current Bitcoin testnet block

To change out the starting bitcoin testnet block, get the values from the VeriBlock PoP miner using showlatestbitcoinblock


 > showlatestbitcoinblock
Block hash: 000000001fd874b858bf940102e1a8816b105b5eb30685ba1ded235117e16848
Block height: 1576454
Block header: 0000002037D955FA58D1E487CB3979CD0109185D292B44D4DF319A7277443408000000009C67028FA173C9EE0E4461E611A764252E3D474390747EC444B66322DCF31589295B695DFFFF001DBD329854
   INFO: (2019-08-30 13:27:20) [V200] Success
         000000001fd874b858bf940102e1a8816b105b5eb30685ba1ded235117e16848 @ 1576454: 0000002037D955FA58D1E487CB3979CD0109185D292B44D4DF319A7277443408000000009C67028FA173C9EE0E4461E611A764252E3D474390747EC444B66322DCF31589295B695DFFFF001DBD329854

Use the following script with the hash of the latest bitcoin testnet block:

output=( $( curl -s$1 |  jq -r  '.time, .bits, .mrkl_root, .ver, .nonce, .prev_block, .height' ) )
echo "bitcoin.configured=true"
echo "initial.bitcoin.timestamp=${output[0]}"
echo "initial.bitcoin.difficulty=${output[1]}"
echo "initial.bitcoin.merkle=${output[2]}"
echo "initial.bitcoin.version=${output[3]}"
echo "initial.bitcoin.nonce=${output[4]}"
echo "initial.bitcoin.previous=${output[5]}"
echo "initial.bitcoin.height=${output[6]}"

Usage: ./script 000000001fd874b858bf940102e1a8816b105b5eb30685ba1ded235117e16848



Add the above inside and restart NodeCore, it also may require that you remove the alpha directory from your data directory and start a new AlphaNet chain.

End Result

If everything is successful, the following will all be running locally:

  1. NodeCore is running.
    1. Block height is increasing.
    2. A folder "bin\alpha" has been created
  2. NC_CLI is running, and run getinfo to see latest block and balance. Run any command from the NodeCore_CommandLine
  3. PoW CPU miner is running, submitting shares