metaverse icon indicating copy to clipboard operation
metaverse copied to clipboard

BUG: get block header on height pending failed

Open Serpent6877 opened this issue 4 years ago • 3 comments

Versions 0.9.1/ 0.9.1b: OS: Linux

I run a pool with custom Open Ethereum Pool code. Every couple of days or so my unlocker receives this error from the MVSD:

Unlocking suspended due to last critical error: get block header on height pending failed.

Error returned from explorer/extensions/commands/fetchheaderext.cpp.

auto ret = miner.get_block_header(block_header, argument_.number);

consensus/miner.cpp:

bool miner::get_block_header(chain::header& block_header, const std::string& para)
{
    if (para == "pending") {
        block_ptr block = get_block();
        if (block) {
            block_header = block->header;
            return true;
        }
    }
    else if (!para.empty()) {
        blockchain::block_chain_impl& block_chain = node_.chain_impl();
        uint64_t height{0};
        if (para == "latest") {
            if (!block_chain.get_last_height(height)) {
                return false;
            }
        }
        else if (para == "earliest") {
            height = 0;
        }
        else if (para[0] >= '0' && para[0] <= '9') {
            height = std::stoull(para);
        }
        else {
            return false;
        }

        if (block_chain.get_header(block_header, height)) {
            block_header.transaction_count = block_chain.get_transaction_count(height);
            return true;
        }
    }

    return false;
}
block_ptr block = get_block();

This part must be failing somewhere. I thought the recent 0.9.1b "BUGFIX: getblock error from height: 3584831 3585067 3585179 because of parsing json format error caused by NaN raw data to resume user scaning MVS blocks." might have been related. But appears not. Any help appreciated.

Serpent6877 avatar May 15 '20 23:05 Serpent6877

Hi, Can you send snapshot of screen when get block header on height pending failed., We need more details.

thx

betachen avatar Aug 04 '20 09:08 betachen

I think this problem has been resolved in the latest release

canguruhh avatar Aug 11 '20 22:08 canguruhh

Still an issue with this:

get block header on height pending failed

It can run days, then just gives this error from the daemon. It's so random I have not been able to find a way to replicate it.

Serpent6877 avatar Feb 12 '21 17:02 Serpent6877