Proof-of-Work on the Pi-Puck

Proof-of-Work (PoW) does not run out-of-the-box due the large DAG file that has to be kept in memory. In order to reduce the DAG file size, modify the file go-ethereum/consensus/ethash/algorithm.go as follows:

Change
datasetInitBytes   = 1 << 30 // Bytes in dataset at genesis
      

to

datasetInitBytes   = 1 << 20 // Bytes in dataset at genesis
      

And comment out the following lines:

//if epoch < maxEpoch {
	  //return cacheSizes[epoch]
	  //}
      

and

//if epoch < maxEpoch {
	  //return datasetSizes[epoch]
	  //}
      

Then, compile geth directly on the Pi-Puck:

make geth
      

Or, alternatively, cross-compile geth on your host PC via

make geth-linux-arm-6 The latest version of xgo throws an error when cross-compiling, therefore, for now, we recommend compiling directly on the Pi-Puck.


Instructions by Volker Strobel (volker.strobel87@gmail.com), February 2020.