0

Clique in VerifyHeader checks so that the block is not block 0,

// The genesis block is the always valid dead-end
number := header.Number.Uint64()
if number == 0 {
    return nil
}

whereas Ethash does not seem to do any such check, and also does things that would fail at block 0,

parent := chain.GetHeader(header.ParentHash, number-1)
if parent == nil {
    return consensus.ErrUnknownAncestor
}

it seems to me that VerifyHeader is most likely not being called on the genesis block and that Clique has added an unnecessary check. Could anyone give a conclusive answer to if VerifyHeader is used for genesis block or not?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.