After this PR, BlockHashCount should be exposed in the metadata. This is the maximum validity period in blocks. There should be some check, like:
if BlockHashCount in metadata {
// ensure validityPeriod < BlockHashCount
} else {
// log "Warning: maximum validity period unknown for this chain..."
}