txwrapper icon indicating copy to clipboard operation
txwrapper copied to clipboard

Protect/Warn Against Validity Periods That Are Too Long

Open joepetrowski opened this issue 4 years ago • 2 comments

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 avatar May 10 '20 08:05 joepetrowski

@joepetrowski is this still relevant to anything txwrapper{-*}?

emostov avatar Nov 20 '20 06:11 emostov

Yes, every runtime will have this: https://github.com/paritytech/substrate/blob/e33f3c23cdf4d369bd0d2dbec7b78382ee17a117/bin/node/runtime/src/lib.rs#L149

joepetrowski avatar Nov 26 '20 09:11 joepetrowski