Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: get block header on height pending failed #395

Open
Serpent6877 opened this issue May 15, 2020 · 3 comments
Open

BUG: get block header on height pending failed #395

Serpent6877 opened this issue May 15, 2020 · 3 comments

Comments

@Serpent6877
Copy link

Serpent6877 commented May 15, 2020

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.

@betachen
Copy link
Member

betachen commented Aug 4, 2020

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

thx

@canguruhh
Copy link
Member

I think this problem has been resolved in the latest release

@Serpent6877
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants