`Error: Bad header size` when starting miner


Hi, I’m trying to start a miner when I have hsd running:

root@Handshake:~/hsd# ps -ef | grep hsd
root     26754     1  2 08:17 ?        00:00:02 hsd

But when I try to run the miner I get the following:

root@Handshake:~/hs-miner# ./bin/hs-miner --rpc-host localhost --rpc-port 13037
Miner params:
  Backend: lean
  CUDA: false
  Network: testnet
  Edge Bits: 23
  Proof Size: 42
  Easipct: 50

  0: <Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz> 1033375744 64 1886388224

Starting miner...
Error: Bad header size.
    at Miner.getWork (/root/hs-miner/bin/miner.js:141:13)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Any ideas what could be wrong here?


Good question. So as of testnet3 hs-miner was deprecated along with cuckoo cycle PoW in favor of cBlake PoW. You can currently cpumine with hsd (cpuminer code is now just bundled into hsd/lib/mining) if you call the rpc method “setgenerate”. You can also grep your hsd logs for cpu miner stats/logs. https://handshake-org.github.io/api-docs/#setgenerate
If you were after a gpu miner:: We’re finalizing a beta build of a gpu miner currently so check back here and to Handshake Alliance as we will have that beta miner coming (gut feeling maybe couple weeks). What kind of hardware/os are you intending to mine on?


Hey @kbambridge thanks for trying out the software!

You can see a fix for that problem here: https://github.com/handshake-org/hs-miner/pull/13

We actually observed higher hashrate with the hsd CPU miner compared to updated GPU miner. Not much work was put into updating the hs-miner to the new PoW algorithm.

The original PoW algorithm was going to be Cuckoo Cycle, but it was decided to switch away from that because of a worry that asics would be created faster than expected and that it would be expensive to develop asics for it, meaning that only a few groups would have the ability to do so.

Handshake’s philosophy is to use a PoW algorithm that is very similar to existing PoW algorithms but tweaked such that no currently existing asics can work for it, but it should be easy for anybody to develop asics for it.

You can see a discussion thread here on the topic: https://github.com/handshake-org/hsd/issues/71

This blog post also covers relevant information: https://blog.sia.tech/the-state-of-cryptocurrency-mining-538004a37f9b


Thanks for the info! This is for testing so I can just use a CPU miner for now. I may do some mining on a nvidia gpu later.

The miner seems to have trouble collecting all the peers though, it seems to hover around 6/8 and fails regularly with various IPs with socket hangup and connection timed out. My guess is that there are some dead nodes in the peer list for some running handshake nodes.