user725: I want a transaction to only be valid for a certain period of time relative to some specified start time. I thought that maybe I could use Constraints.mustValidateIn (interval firstInterval $ firstInterval + 10000), but this has failed to validate. It seems that it does not matter what the upper bound is, because it always fails... unless its positive infinity. So this: Constraints.mustValidateIn (from $ firstInterval) always works.
In the docs, Constraints.mustValidateIn has a footnote specifying this: "@mustValidateIn r@ requires the transaction's time range to be contained in @r@."
So I guess what I am asking is what is a transactions time range? And can it be manipulated to fit this scenario?
Thanks!

user725: I discovered this cool function named hull. Here is the function definition from the docs.
-- The function hull gives the smallest interval containing both the given intervals.
hull :: Ord a => Interval a -> Interval a -> Interval a
hull (Interval l1 h1) (Interval l2 h2) = Interval (min l1 l2) (max h1 h2)

I did not expect this to work any better than my previous attempts at specifying some range with an upper limit. But it did.
Here is my constraint now:
Constraints.mustValidateIn (hull (from $ firstInterval)(to $ firstInterval + 8000))

725: <p>I want a transaction to only be valid for a certain period of time relative to some specified start time. I thought that maybe I could use <code>Constraints.mustValidateIn (interval firstInterval $ firstInterval + 10000)</code>, but this has failed to validate. It seems that it does not matter what the upper bound is, because it always fails... unless its positive infinity. So this: <code>Constraints.mustValidateIn (from $ firstInterval)</code> always works.</p>
<p>In the docs, <code>Constraints.mustValidateIn</code> has a footnote specifying this: &quot;@mustValidateIn r@ requires the transaction's time range to be contained in @r@.&quot;</p>
<p>So I guess what I am asking is what is a transactions time range? And can it be manipulated to fit this scenario?</p>
<p>Thanks!</p>
 725: <p>I discovered this cool function named <code>hull</code>. Here is the function definition from the docs.</p>
<pre><code>-- The function hull gives the smallest interval containing both the given intervals.
hull :: Ord a =&gt; Interval a -&gt; Interval a -&gt; Interval a
hull (Interval l1 h1) (Interval l2 h2) = Interval (min l1 l2) (max h1 h2)
</code></pre>
<p>I did not expect this to work any better than my previous attempts at specifying some range with an upper limit. But it did.</p>
<p>Here is my constraint now:</p>
<p><code>Constraints.mustValidateIn (hull (from $ firstInterval)(to $ firstInterval + 8000))</code></p>
