Skip to content

Instantly share code, notes, and snippets.

@dmdeklerk
Last active March 15, 2018 19:56
Show Gist options
  • Save dmdeklerk/69ffa040d67fa41ffd3b5261e922e64e to your computer and use it in GitHub Desktop.
Save dmdeklerk/69ffa040d67fa41ffd3b5261e922e64e to your computer and use it in GitHub Desktop.
B E T A N E T Installation Instructions

HEAT - B E T A N E T

HEAT beta network is an exact clone of the main HEAT blockchain, the HEAT developers use the beta network to try out and test updates before we apply them to the main network.

The beta server is built in such a way that its safe to run it besides your existing HEAT server (on the same machine).

In order to truly replicate the main chain beta net releases are seeded with all past blocks and transactions from the main chain.

To prevent transaction replay (sending betanet transactions to the main net) the transaction byte layout is different on beta net, preventing them to be valid on the main net.

Beta net releases have a snapshot height which indicates at what height we snapshot the main chain, beta net releases have this snapshot height built in.

When running the beta net server you have the choice of downloading the blockchain from the network, or to speed up things you could copy over the main chain blockchain which can be found in the blockchain folder.

Installation

These instructions apply for linux servers.

# create the application folder
$ mkdir betanet
$ cd betanet

# download the installation script 
$ wget https://gist.githubusercontent.com/dmdeklerk/ae2561ad9ca43ea2236d697490b60b3f/raw/256cac30e9b42cf690e624e8d5bd95960f06f943/update.sh

# run the update script to download, note that this instruction will chance with each new release 
$ sh update.sh 2.5.0-BETANET~17 7f90ef0f6f8e5d901902c9dcd66ff265ddeedb573a6a9f9f9fe5f3fc88e6f925 https://heatwallet.com/downloads/betanet/heatledger-2.5.0-BETANET~17.zip

# now optionally seed your installation with the main net chain by coppying over the blockchain folder
# start your beta net server
$ bin/heatledger

Alternative - run in background

An alternative method is to run the server in a background process.

# to start a bakcground terminal
$ screen -mS BETANET

# you are in a detached screen now, to start the server
$ bin/heatledger

# now to exit the screen (which keeps it running in the bakcground)
CTRL + A than press d

# to watch the log in the bakcground process
$ tail -f /path/to/betanet/heatledger.log

# to go back to the background process (in order to stop it)
$ screen -r BETANET

To start mining

All the main net leases exist on the beta net, you can start mining on beta net just like you do on main net. Using your same secret phrase to your account to which the balance is leased.

The only thing thats different is the port number of the API server.

$ curl http://localhost:7761/api/v1/mining/start/SECRET%20GOES%20

Notice the port number on beta net is 7761.

Access the B E T A N E T client

To make it easier to inspect and use the beta net you can access it from the heatwallet.com client. On https://heatwallet.com go to the top right menu button and in the menu click About HEAT.

The dialog has a link to switch to beta net.

When you do the client will display clearly that its in beta net now.

screen shot

Updates

Betanet is actively being monitored, debugged and improved. To enable fast update iterations we provide a single command update mechanism.

Whenever a new build is availabe we will notify users in the betanet channel on discord and include an update command, the command includes the download location and a SHA hash to confirm its authenticity.

To perform an update do:

# if using screen, enter your screen first
$ screen -r

# stop the running server
CTRL+C

# run the update command
$ sh update.sh 2.5.0-BETANET~17 7f90ef0f6f8e5d901902c9dcd66ff265ddeedb573a6a9f9f9fe5f3fc88e6f925 https://heatwallet.com/downloads/betanet/heatledger-2.5.0-BETANET~17.zip

# now start beta net server again and you are done, dont forget to start mining again
$ bin/heatledger

Seed chain

To save time your could download a blockchain from here.

https://heatwallet.com/downloads/betanet/blockchain.zip

To install on linux

$ wget https://heatwallet.com/downloads/betanet/blockchain.zip
$ unzip blockchain.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment