6

Step 1: I'm running "Local Private Ethereum Network". And have two local nodes. Node2 is attached to Node1. I started mining in Node1 and it was successful.

INFO [01-11|18:37:01] Successfully sealed new block            number=1 hash=176552…694cb6
INFO [01-11|18:37:01] 🔨 mined potential block                  number=1 hash=176552…694cb6

But, node2 gives the error below:

WARN [01-11|18:37:01] Discarded bad propagated block           number=1 hash=176552…694cb6

Since node1 successfully created a NEW BLOCK, I expect node2 'to accept' it.

But, node2 gives error like above.

Step 2: Restarted node2, and re-attached the node2 to node1. Now the previously mined-but-discarded-block was 'imported successfully'.

Step 3: Initiated mining on node2. node2 successfully mined a block. But, this time, the newly mined block was discarded by node1. Restarted node1. Re-attached node2 to node1. Previously mined-but-discarded-block was imported successfully. So, there is a pattern that 'the newly mined blocks are not imported immediately. But, are imported only after the restart of the peer node - which discarded it'.

How to make the peer nodes synchronize automatically and import the newly mined blocks on the fly?

3

I was having the same trouble with version 1-8-1-stable of geth. I could not find any documentation for this so I grep'd this error message into source code of 'geth' to find below if condition (link):

// If fast sync is running, deny importing weird blocks
        if atomic.LoadUint32(&manager.fastSync) == 1 {
            log.Warn("Discarded bad propagated block", "number", blocks[0].Number(), "hash", blocks[0].Hash())
            return 0, nil
}

It says that if your node is running in fastSync mode then some blocks are discarded. When I started all of my nodes in full sync mode with option --syncmode "full" all nodes accepted the block immediately. Moreover I was also having the issue that my transactions were not getting properly broadcasted. Running node in full sync mode solved that problem too!

The question that still remains is, why is this block considered weird?

  • 1
    Thanks @Nullpointer! Making use of --syncmode "full" solved the issue. Now the newly created block gets imported instantaneously. – RafiAlhamd Mar 17 '18 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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