Calculate the signing window of a mortal Substrate extrinsic
An offline signer can return a valid signature after its chosen era has expired. Determine the original checkpoint and end height before sending a delayed transaction.
Reproduce the era from the signing context
The Rust example uses the SDK’s Era type with a 64-block period and signing block 1000. Keep the actual checkpoint hash, block number and encoded era in the signing record. The same period and phase can recur later with a different checkpoint hash.
use sp_runtime::generic::Era;
let era = Era::mortal(64, 1000);
assert_eq!(era.birth(1000), 1000);
assert_eq!(era.death(1000), 1064);
Interpret the exclusive end height
In the example the original window ends before block 1064. A delayed broadcast at height 1065 cannot renew the old signature by choosing the recurring phase. Changing the checkpoint changes the signed material and requires a new signature. Check the original transaction’s inclusion before resubmitting its business action.
Use the actual encoded era for diagnostics. The SDK normalizes requested periods and can quantize long-period phases; simply adding a UI’s requested period to the current height can yield a misleading expiry.