Coinbase validation after block #305000
Maybe it happens only to me, but after block #305000 the validation Block#coinbase_value fails.
Thanks for bringing it up, I'll look into it. Need to sync a fresh blockchain though, so it's gonna take a bit... You're using the utxo backend on postgres?
Does this fix your issue? Still couldn't test it with the real blockchain, but it would make sense...
Updated and started over but no change:
INFO network: 176.57.142.30:8221 << getblocks: 0000000000000000142bb90561e1a907d500bf534a6727a63a92af5b6abc6160
WARN network: ValidationError storing block 000000000000000050ad924af73fd35698f68841e1658536e4fce99ec9262423: block error: context check 2 - coinbase_value failed
and all blocks afterwards are orphans. I've even tried:
delete from utxo where blk_id in (select id from blk where height > 304000);
delete from blk where height > 304000;
and resumed the node, but after 1000 blocks the problem is still same.
Hmm, strange... My node finally synced to that block, and went over it without any problems.
I'm on commit 5f508d35bf2e42e355446d8ed11304dff0b88be5 now, with ruby 2.1.1p76 and postgres 9.1.14 on debian 7.8 (wheezy). What is your environment?
Btw. just deleting the utxo records can't work, you'd also need to restore the old ones, or you'll get missing prev_outs for sure...
Ah, now I could reproduce it - somewhat, because for me it fails in the transactions_context/prev_out check, but in the same block...
DEBUG storage: => main (305001)
DEBUG storage: validating block context 000000000000000050ad924af73fd35698f68841e1658536e4fce99ec9262423 (349200 bytes)
.....
DEBUG storage: validating tx context 66449be322135da722bcfc0e3de10971ca9a368ec2493dafdc0ec9c9631ee8a7 (191 bytes)
WARN storage: prev out f049ed1baf9a7a8fe91a1d534690e9478df340a4f568242db39c225232c9dcdf:0 missing
INFO storage: tx error: context check 0 - prev_out failed
WARN network: ValidationError storing block 000000000000000050ad924af73fd35698f68841e1658536e4fce99ec9262423: block error: context check 4 - transactions_context failed