<p>I hope I understood your question correctly. No, we don't move anything.</p>
<p>I think that the naming is confusing. It shouldn't be called <code>deadline</code> because in my opinion <code>deadline</code> is when something ends. In our case, it's the other way around. We allow taking funds only AFTER the deadline.</p>
<p>Please take a look at the picture. We shouldn't allow Tx1, only Tx2.</p>
<p><a href="https://i.sstatic.net/PA07e.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/PA07e.png" alt="enter image description here" /></a></p>
<p>In our case [deadline, infinity] doesn't contain Tx1.validRange contains Tx2.validRange.</p>

CC BY-SA 4.0
2021-06-04T13:16:21.640Z
Thanks for the response! I think my confusion stems from the txInfoValidRange. Where does the valid range of a transaction start? And more importantly, what factors decide the valid range of a transaction?
Isaac Padberg
CC BY-SA 4.0
2021-06-04T17:56:04.917Z
From my understanding you should specify validRange yourself during transaction construction. It could be done with `mustValidateIn` function from `Ledger.Contrains` module. You can find an example here https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L325
Yanis Urbis
CC BY-SA 4.0
2021-06-04T20:35:14.610Z
Seems to me like this deadline thing is redundant then. If you can simply specify the range when a transaction should validate, you can just set the start of that somewhere in the future. Lars is trolling us!
Isaac Padberg
CC BY-SA 4.0
2021-06-05T19:20:04.800Z
@IsaacPadberg Hmm, I don't think that you can put totally random valid ranges. From my understanding current slot should be a member of validRange. Check out this function https://alpha.plutus.iohkdev.io/doc/haddock/plutus-ledger/html/src/Ledger.Index.html#checkSlotRange
Yanis Urbis
CC BY-SA 4.0
2021-06-07T14:14:49.610Z
I failed to keep in mind the structure of validation scripts and transactions. Simply by constructing a transaction after the deadline, the validRange of the transaction will be contained in the deadline->Infinity. So obvious! Thanks for the help Yanis :)
Isaac Padberg
CC BY-SA 4.0
2021-06-04T07:50:15.410Z
2021-06-04T07:50:15.410Z
Yanis Urbis
<p>Given that the function A <code>contains</code> B is true when all of B is contained in A, and false otherwise, wouldn't that mean that the <code>txInfoValidRange info</code> would have to move its &quot;start point&quot; in order to return true? Below is my thinking :)</p>
<p><code>checkDeadline = from (deadline p) `contains` txInfoValidRange info</code></p>
<p>In this code, <code>from (deadline p)</code> contains all of the slots from some deadline to pos infinity.</p>
<p>---Below is where I think I am wrong---</p>
<p><code>txInfoValidRange info</code> is just a SlotRange from the creation of the transaction to pos infinity.</p>
<p>So how then can the <code>deadline p</code> contain the <code>txInfoValidRange info</code> without the <code>txInfoValidRange info</code> adjusting its starting point?</p>
<p>Thanks!</p>

<plutus><context><intervals><txinfovalidrange>
Does txInfoValidRange adjust as time continues on?
# Does txInfoValidRange adjust as time continues on?

(Asked by: username_0 on 2021-06-03)

Given that the function A `contains` B is true when all of B is contained in A, and false otherwise, wouldn't that mean that the `txInfoValidRange info` would have to move its "start point" in order to return true? Below is my thinking :)

`checkDeadline = from (deadline p) `contains` txInfoValidRange info`

In this code, `from (deadline p)` contains all of the slots from some deadline to pos infinity.

---Below is where I think I am wrong---

`txInfoValidRange info` is just a SlotRange from the creation of the transaction to pos infinity.

So how then can the `deadline p` contain the `txInfoValidRange info` without the `txInfoValidRange info` adjusting its starting point?

Thanks!

**Tags:** plutus, context, intervals, txinfovalidrange

---

## 1 answers

### Answer by username_1 on 2021-06-04. Score: 4 | Accepted answer

I hope I understood your question correctly. No, we don't move anything.

I think that the naming is confusing. It shouldn't be called `deadline` because in my opinion `deadline` is when something ends. In our case, it's the other way around. We allow taking funds only AFTER the deadline.

Please take a look at the picture. We shouldn't allow Tx1, only Tx2.

[![enter image description here](https://i.sstatic.net/PA07e.png)](https://i.sstatic.net/PA07e.png)

In our case [deadline, infinity] doesn't contain Tx1.validRange contains Tx2.validRange.

> **Comments:**
> **username_0**: Thanks for the response! I think my confusion stems from the txInfoValidRange. Where does the valid range of a transaction start? And more importantly, what factors decide the valid range of a transaction?  
> **username_1**: From my understanding you should specify validRange yourself during transaction construction. It could be done with `mustValidateIn` function from `Ledger.Contrains` module. You can find an example here https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L325  
> **username_0**: Seems to me like this deadline thing is redundant then. If you can simply specify the range when a transaction should validate, you can just set the start of that somewhere in the future. Lars is trolling us!  
> **username_1**: @IsaacPadberg Hmm, I don't think that you can put totally random valid ranges. From my understanding current slot should be a member of validRange. Check out this function https://alpha.plutus.iohkdev.io/doc/haddock/plutus-ledger/html/src/Ledger.Index.html#checkSlotRange  
> **username_0**: I failed to keep in mind the structure of validation scripts and transactions. Simply by constructing a transaction after the deadline, the validRange of the transaction will be contained in the deadline->Infinity. So obvious! Thanks for the help Yanis :)  

---

