Skip to content

Instantly share code, notes, and snippets.

@himu007
Last active August 8, 2019 18:51
Show Gist options
  • Save himu007/8845f5baba8e1cdd21c0fe9c2278e117 to your computer and use it in GitHub Desktop.
Save himu007/8845f5baba8e1cdd21c0fe9c2278e117 to your computer and use it in GitHub Desktop.
@himu007
Copy link
Author

himu007 commented Aug 8, 2019

Test adaptivepow

You need latest nPSV branch of Komodo. Best to use tmux for monitoring or use multiple terminal windows whichever is easy. You also need a good server with many CPU thread

Update OS & Install deps

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool libncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev libdb++-dev ntp ntpdate nano software-properties-common curl libevent-dev libcurl4-gnutls-dev cmake clang libsodium-dev -y

Clone and Compile

cd ~
git clone https://github.com/jl777/komodo
cd komodo
git checkout nSPV
./zcutil/fetch-params.sh
./zcutil/build.sh -j$(nproc)

Testing Steps

Steps might change anytime, make sure to get latest instructions from jl777 in Discord

  • start the chain (check #talk-mining or ask jl777 for latest chain name)
  • mine with 30 threads till height 65, after that RST will kick in (number of threads depends on your machine specs)
  • continue mining about 30-40 blocks until the second hash on mining printout is 0 (monitor the CSV file)
  • mine more 17 blocks with second hash 0
  • then try to stablilize the diff by starting 3 threads
  • continue mining with stable hashrate
  • once the diff is stable start 30 threads
  • repeat the 30 & 3 threads mining testing (10x, 1x)
  • record the block number where you change the threads
  • send the CSV file to jl777 for review at the end of testing

Start the chain

Get latest chain name from jl777 to use with -ac_name=

cd ~
cd komodo/src
./komodod -ac_name=ZAWY21 -ac_adaptivepow=1 -ac_supply=1000000 -ac_reward=10000000000 -ac_cc=2 -addnode=5.9.109.210 -addnode=178.159.11.114 &

Start mining

The test will be 10x and 1x mining and repeat. Seek jl777's advice on latest testing.
Make sure you have connection to other node. Use getinfo or getpeerinfo call to ensure that.

./komodo-cli -ac_name=ZAWY21 setgenerate true 30

Monitor the CSV file

Latest nSPV branch has a new RPC call genminingCSV. This call generates a CSV file inside the directory where you ran the komodod from. The file name is basically CHAINNAME_mining.csv. Monitoring of this file has 2 part. In one terminal window and tmux pane, you keep generating the CSV file every 5 or 10 seconds and in another terminal window or tmux pane, you tail the csv file.

Generate the CSV file every 5 seconds

watch -n 5 ./komodo-cli -ac_name=ZAWY21 genminingCSV

Tail the CSV file

tail -f ~/komodo/src/ZAWY21_mining.csv

Here is an example setup for this tesing (your flow may very).
https://cdn.discordapp.com/attachments/456900588018597918/609095396928651269/Screenshot_from_2019-08-08_19-46-56.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment