November 2018
Intermediate to advanced
528 pages
13h 21m
English
To explore this option, you'll need to do some Golang hacking! Don't worry; there's nothing complex.
In Geth's code (the consensus.go file at; https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/consensus.go), there is a function called CalcDifficulty that represents the difficulty adjustment algorithm. It returns the difficulty that a new block should have when created, given the parent block's time and difficulty. To fix the difficulty, we need to fix the returned value as follows:
func CalcDifficulty(config *params.ChainConfig, time uint64, parent *types.Header) *big.Int { return big.NewInt(1)}
Afterwards, compile your new Geth client following the instructions presented in the ...
Read now
Unlock full access