2017-08-12 08:39:48 UpdateTip: new best=00000024a3327afa5e3ff620607e48841ec35c6a92a554a132e0dbb616b5526d height=2782 log2_work=32.427115 tx=3308 date=2017-08-12 08:39:47 progress=1.000000 cache=0.0MiB(117tx)
2017-08-12 08:39:48
** TestBlockValidity FAILED - pindexNew->pprev != chainActive.Tip() (assert(pindexNew->pprev == chainActive.Tip())); **
2017-08-12 08:39:48
BiblepayMiner -- runtime error: CreateNewBlock: TestBlockValidity failed: (code 0)
2017-08-12 08:39:48 ProcessNewBlock : ACCEPTED
2017-08-12 08:39:55 CMasternodeSync::IsBlockchainSynced -- found enough peers on the same height as we are, done
So, (assuming I'm reading this right) the error isn't related to block 2782, but rather the following block. Block 2782 was received by the network and accepted by your node. Your node then calls CreateNewBlock where it assembles the transactions and headers to create block 2783 before sending the block on to be hashed (which is the actual mining process).
At the top of the CreateNewBlock method, pindexPrev is defined as a pointer to the block currently at the top of the chain (2782 in this case):
CBlockIndex* pindexPrev = chainActive.Tip();
That's referenced throughout the block creation to get information necessary for creating the new block. Once the block is finished being created, TestBlockValidity is called with pindexPrev as one of the arguments:
if (!TestBlockValidity(state, chainparams, *pblock, pindexPrev, false, false)) {
throw std::runtime_error(strprintf("%s: TestBlockValidity failed: %s", __func__, FormatStateMessage(state)));
}
and in that method it's failing this test:
if (!(pindexPrev && pindexPrev == chainActive.Tip()))
{
LogPrintf(" \r\n ** TestBlockValidity FAILED - pindexNew->pprev != chainActive.Tip() (assert(pindexNew->pprev == chainActive.Tip())); ** \r\n");
return false;
}
then returns and throws the runtime error seen in the error log.
pindexPrev is never reassigned, so in order to fail the test pindexPrev == chainActive.Tip() that means that the value returned by chainActive.Tip() changed. I don't see anything in CreateNewBlock() that looks like it's changing the blockchain, so it's probably caused by another thread. That's all I can gather from reading the code, finding out more would require actual debugging.
I'm not sure where the thrown exception gets handled, so I don't know how the node responds to this. The entire thing doesn't crash so something takes care of it, but I don't know if it attempts to build a new block or what. Mining doesn't seem to just stop since blocks continue to be mined after the error. I'm also not sure how much of this is Biblepay-specific code and how much is carried over from Dash.
Oh, and looking through some of my really old logs, this is what an error looks like when a peer sends you an invalid block:
2017-08-07 09:09:28 ERROR: CheckProofOfWork(): BibleHash does not meet POW level
2017-08-07 09:09:28 ERROR: CheckBlockHeader(): proof of work failed
2017-08-07 09:09:28 Misbehaving: 97.99.69.33:40000 (0 -> 50)
2017-08-07 09:09:28 ERROR: invalid header received 0000024a49a386eee621d31124cf1dea0131b0b0233ec168f8dbcc8ea22cca0e
2017-08-07 09:09:28 ProcessMessages(headers, 82 bytes) FAILED peer=1
Also, I looked through the chain parameters and they appear to be configured correctly for a 7 minute block time, so whatever is affecting that is more complex than just a configuration error.