Extending valid round window

Valid round seems cannot go beyond range 0 - 999. But what If I need to extend the validity window in a preriodic contract?

@ddev I think that you’ll need to send a new transaction for that.
Keep in mind that when sending a transaction you have to wait until it’s being included into a block or re-send the transaction anyway. ( that’s true for any type of transaction. sending transaction doesn’t guarantee it would get included in a block ).
I would advise against sending a transactions with long expiration round. instead, send a transaction that would expire within 10 rounds. if the transaction never made it within these 10 rounds, you can safely re-send a new transaction. If you want to have “overlapping” transactions periods where only a single transaction would get included, consider using leases.

1 Like

Oh cool. Thank you. Noted.

As @tsachi noted above, using a lease may be your best option. Here is a recent article on the topic:

( yes, tooting my own horn :slight_smile: )

1 Like

I’m having a bit trouble understanding the relationship between valid rounds and time conversion. Thank you.

The time conversion is a function of the average block interval. The transaction may be created with both FirstValid and LastValid (with a maximum range of 1000 rounds). Currently, MainNet confirms blocks on average every 4.5 seconds [1]. Therefore, at most, a transaction may be confirmed within a window lasting approximately 4500 seconds (1 hour 15 minutes).

[1] AlogExplorer (external link)

1 Like

Oh beautiful. Does that mean a thousand round equals 1000 milliseconds?

Not exactly. In @ryanRfox example above, 1000 rounds, each taking 4.5 seconds would take 4500 seconds.

ok now I get it. :+1: