0

I want the blocktime to be the same as in the genesis-block, currently the longer the chain becomes the longer the wait time is.

So far I found the following resolution: fast blocktime in private net

However when I check the file in the go-ethereum repository under: https://github.com/ethereum/go-ethereum/blob/master/core/block_validator.go

Then I don't see the difficulty being set. Where can I change the function so that the difficulty remains the same as in the genesis block? How do I make sure this change works on all my nodes? Does the hash-value of the files needs to be the same or how does the system know the nodes are the same?

1 Answer 1

0

The function calcDifficulty was moved to consensus/ethash/consensus.go.

In order for this changes to work in all your nodes you have to compile and use your own binaries exclusively.

By using your own calcDifficulty you are altering the consensus algorithm. Nodes with the standard algorithm will likely see your blocks as invalid because the timestamp will not follow the original consensus and will reject them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.