Ethereum Wallet keeps a log of your mining activity and it is more or less real time. In my case, I have the Mac Ethereum Wallet app and if I click on Develop > Show Log File, the app takes me to the location of the log-files. On Mac, you can open the most recent log-file with Console and then you see your progress. If you are mining actively, you should see something like:
I0208 10:27:55.933072 core/blockchain.go:1070] imported 1 blocks, 0 txs (0.000 Mg) in 10.527ms (0.000 Mg/s). #495315 [94c82d0c…]
I0208 10:27:55.942106 miner/worker.go:514] commit new work on block 495316 with 4 txs & 0 uncles. Took 8.921554ms
Since I also haven't gotten any Ether for mining yet, I cannot tell you how a successful block commit and Ether transaction would look like. But at least you can see whether you are actually mining or not.
No, you won't be able to get past the point at which you changed the difficulty algorithm. You'll have to start from scratch, I'm afraid.
The error you're seeing is coming from the ValidateHeader()
function, which, surprisingly, attempts to validate the values contained in the header of the current block being imported.
In short, the Block Header Validity section of the Yellow Paper states the following:
(51)
Hd = D(H)
Which is a cryptic way of stating that the difficulty in the current block's header must match the calculated expected difficulty, given the difficulty of the block's parent, and the current block number.
expd := CalcDifficulty(config, header.Time.Uint64(), parent.Time.Uint64(), parent.Number, parent.Difficulty)
if expd.Cmp(header.Difficulty) != 0 {
return fmt.Errorf("Difficulty check failed for header (remote: %v local: %v)", header.Difficulty, expd)
}
Your CalcDifficulty()
function - which you've altered - is now returning a value which doesn't match the block header of a block which was created before you made the change.
Edit:
You could of course edit the code again to either remove or temporarily disable this check, but you'd forever have the discrepancy in your chain. It'd be up to you to decide if that matters or not.
Best Answer
There are 2 ways to do this:
Change the value of difficulty parameter in
genesis.json
file to a small number(preferably set it to 0). You can refer to this example genesis fileProblem with this method is that when the block number increases, the difficulty also starts increasing at a high rate. So, to tackle that problem refer to the below part.
consensus.go
which resides atconsensus/ethash/consensus.go
and search for the below line.return CalcDifficulty(chain.Config(), time, parent)
Now replace the above line with the below one.
return big.NewInt(1)
.Now build the go-ethereum using
make geth
command.I strongly recommend you to go through this article for much detailed implementation of the above process.