Mining Waltonchain Mainnet with CPU via CLI

in #waltonchain6 years ago

Finally, the Waltonchain Mainnet has been released and its time to get a piece of the action. Unfortunately, the documentation around this release has been scarce, to say the least, so I have created this guide to assist.

As of the 3rd of April: CPU mining is available, GPU mining is limited to Nvidia, only allows 1 GPU and does not report hashrate although some have said mining with CPU is actually vastly more efficient than even a 1080 Ti.

This guide is one of multiple:

Installing Walton Wallet and Generating your Wallet Address (Required for all other articles)
Mining with CPU via GUI
Mining with GPU via GPU
Mining with CPU via CLI using Powershell
Mining with GPU via CLI using Powershell

Mining with CPU via CLI using Powershell

Mining with CPU via Powershell is more involved but fairly straightforward.

Open up two PowerShell windows. One window will be used for mining the other for monitoring.

In both PowerShell, windows change the directory to your WTC install directory. If you used the defaults the command will be: cd "c:\Program Files\WTC"

Navigate to Walton Directory

Once you have navigated to the folder you will be able to start the daemon with the following command: .\start.bat (This command will start the daemon)

Starting Walton CLI

The next step is to set your wallet address: Start typing in the console; it will automatically show the > prompt and show what you are typing. If the writing disappears because a new block was found that is ok just keep typing and it will appear again. Type: miner.setEtherbase('COPYANDPASTPUBLICADDRESSHERE')

The next line will say true when it accepts the address.

Set Walton Address

Now all you need to do is start the miner!! Run the command: miner.start()

This command will start the miner on all available threads. I will elaborate on this in the (Additional Items) Below.

Mining Walton CLI CPU

To monitor the hashrate of your miner; in the other PowerShell, after you have changed the directory to C:\Program Files\WTC run the following commands:

.\walton.exe attach http://127.0.0.1:8545
miner.getHashrate()

Mining Walton CLI CPU Hashrate

Additional Options:


To make the most of your processor you will need to set the affinity for the process. This has mixed results. I attempted it on mine and I had a loss in hashrate. Play around with the affinity to get the best for your processor.

Once you have started mining open up Task Manager (ALT+CTRL+DEL)
Expand the Windows Powershell process
Right click on walton.exe and click on Go to Details

Walton CPU Affinity Go To

Right click on the now highlighted walton.exe process and click on Set Affinity

Walton CPU Set Affinity

Now untick every second processor. These are the hyperthreaded cores which interfere with the main cores.

Walton CPU Set Cores

If this guide was useful please feel free to donate a coffee worth of coin my way:

Ethereum:
0xb689FC318554f712EEb5D06936F2372337Fcb66D

Bitcoin:
16r3bd4VQNfurNjtUshnVek4E6gNBScPxJ

Verge:
DCydgAdJ22K3qu1VA3evhCZpoCVEZR4Xwr

Waltonchain:
0x97207b07e3c340338d2dd0fa97a125b4c9b02c79

Sort:  

Good Post
Thank you

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.030
BTC 60115.56
ETH 3203.28
USDT 1.00
SBD 2.46