<p>The range is determined by the party that builds the transaction. So anybody can specify it.</p>
<p>A range [t1, t2] —where t1 and t2 are integers, or infinite, standing for the slot number— can include any t2 that satisfies t2 &gt;= t1. The only additional restriction is that transactions will be dropped if t1 lies too much in the future - I think the maximum is 2 days in the future. More explanations can be found in chapter 3.3.1 here: <a href="https://plutus-pioneer-program.readthedocs.io/en/latest/pioneer/week3.html" rel="nofollow noreferrer">https://plutus-pioneer-program.readthedocs.io/en/latest/pioneer/week3.html</a></p>
<p>For the smart contract validator this means that the current slot is always in the range [t1, t2] (the blockchain will make sure that the transaction will not be processed outside this range) and that this range is potentially unbounded. If your smart contract needs a smaller range, this is however no problem, it just needs to be known and followed by the one building the transaction. Your off-chain code for instance would implement this and choose a proper range needed by your validator.</p>

CC BY-SA 4.0
2022-05-09T10:13:02.543Z
What about t2? Can it be any value?
Mateus
CC BY-SA 4.0
2022-05-09T11:26:49.433Z
I edited the response. Yes, t2 can basically be any slot after t1 including the infinite value.
Jey
CC BY-SA 4.0
2022-05-07T19:31:25.350Z
2022-05-09T11:31:36.597Z
2022-05-09T11:31:36.597Z
Jey
<p>It is a known fact that you can calculate time inside a plutus validator script by looking at the <strong>txInfoValidRang</strong>e attribute. Now, since this value is a range and not an exact time, it makes me wonder <strong>how large can this range be and who determines it?</strong></p>
<p>This is important for me, because I might want to add a deadline of 5 days, or a deadline of 5 hours and I don't know how reliable this attribute can be.</p>

<plutus><smart-contract><time>
How precise is the time inside a plutus script?
# How precise is the time inside a plutus script?

(Asked by: username_0 on 2022-05-07)

It is a known fact that you can calculate time inside a plutus validator script by looking at the **txInfoValidRang**e attribute. Now, since this value is a range and not an exact time, it makes me wonder **how large can this range be and who determines it?**

This is important for me, because I might want to add a deadline of 5 days, or a deadline of 5 hours and I don't know how reliable this attribute can be.

**Tags:** plutus, smart-contract, time

---

## 1 answers

### Answer by username_1 on 2022-05-07. Score: 3 | Accepted answer

The range is determined by the party that builds the transaction. So anybody can specify it.

A range [t1, t2] —where t1 and t2 are integers, or infinite, standing for the slot number— can include any t2 that satisfies t2 >= t1. The only additional restriction is that transactions will be dropped if t1 lies too much in the future - I think the maximum is 2 days in the future. More explanations can be found in chapter 3.3.1 here: <https://plutus-pioneer-program.readthedocs.io/en/latest/pioneer/week3.html>

For the smart contract validator this means that the current slot is always in the range [t1, t2] (the blockchain will make sure that the transaction will not be processed outside this range) and that this range is potentially unbounded. If your smart contract needs a smaller range, this is however no problem, it just needs to be known and followed by the one building the transaction. Your off-chain code for instance would implement this and choose a proper range needed by your validator.

> **Comments:**
> **username_0**: What about t2? Can it be any value?  
> **username_1**: I edited the response. Yes, t2 can basically be any slot after t1 including the infinite value.  

---

