txwrapper
txwrapper copied to clipboard
Protect/Warn Against Validity Periods That Are Too Long
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..."
}
@joepetrowski is this still relevant to anything txwrapper{-*}
?
Yes, every runtime will have this: https://github.com/paritytech/substrate/blob/e33f3c23cdf4d369bd0d2dbec7b78382ee17a117/bin/node/runtime/src/lib.rs#L149