Calculate the remaining WindowPoSt submission window
A storage provider needs an epoch budget for its current proving deadline. The deadline index alone gives no indication of how much submission time remains.
Read the provider's current window
Send the request to a Lotus v1 RPC endpoint with your miner ID in place of f01234. An empty tipset key selects the node's current head. Record the open, close, challenge and current epochs together.
{"jsonrpc":"2.0","id":1,"method":"Filecoin.StateMinerProvingDeadline","params":["f01234",[]]}
Use the exclusive closing boundary
For a window already open at epoch 1100 with Close equal to 1120, a CurrentEpoch of 1113 leaves seven epoch intervals to the boundary. Leave time for message inclusion. The challenge epoch determines proof randomness and is a separate milestone from the close epoch. A submitted message still needs a successful onchain execution.