The header_hash that the miner uses is the keccak256 hash of the RLP. Or in otherwords, its everything in the header except the mix_hash.
In the golang implementation of ethash its called the SealHash.
https://github.com/expanse-org/go-expanse/blob/master/consensus/ethash/consensus.go#L596
func (ethash *Ethash) SealHash(header *types.Header) (hash common.Hash) {
hasher := sha3.NewLegacyKeccak256()
rlp.Encode(hasher, []interface{}{
header.ParentHash,
header.UncleHash,
header.Coinbase,
header.Root,
header.TxHash,
header.ReceiptHash,
header.Bloom,
header.Difficulty,
header.Number,
header.GasLimit,
header.GasUsed,
header.Time,
header.Extra,
})
hasher.Sum(hash[:0])
return hash
}
The SealHash or header_hash then gets combined with the nonce and turned into the seed, then the seed is copied and turned into the mix_hash which is then hashed one last time with.
result = keccak256(seed, mix_hash)
This last hash is then compared to the mining target to see if its valid.
if(result <= target){
hashIsGood
}else{
hashIsBad
}