user5844: In PPP Larz explains that there's a limit to how long a contract can remain on chain, what is that limit and how do I go about extending it?

user4627: Just a guess, but you might be referring to the POSIX time <-> slot conversion, where Lars noted in week 3 (see notes here), that - if you require a definite upper bound for a slot interval - you should not place that upper bound too far into the future, because slot lengths could potentially change in the future, and cause your script to behave unexpectedly.
If so, I'm not sure if this is still important in the context of using txInfoValidRange in smart contracts though, since it seems to have changed from SlotRange to POSIXTimeRange (https://github.com/input-output-hk/plutus/blob/65fa7ce05a810947f565ac59b4d4e35b3cd5d1b3/plutus-ledger-api/src/PlutusLedgerApi/V1/Contexts.hs#L109 since this commit) - and so you probably don't need to care about this any longer.
In any case this is not related to how long your contract stays on chain, but only how one needs to consider working with time & slot length in certain scenarios.

5844: <p>In PPP Larz explains that there's a limit to how long a contract can remain on chain, what is that limit and how do I go about extending it?</p>
 4627: <p>Just a guess, but you might be referring to the <em>POSIX time &lt;-&gt; slot</em> conversion, where Lars noted in week 3 <em>(see notes <a href="https://plutus-pioneer-program.readthedocs.io/en/latest/pioneer/week3.html#scriptcontext" rel="nofollow noreferrer">here</a>)</em>, that - if you require a definite upper bound for a slot interval - you should not place that upper bound too far into the future, because slot lengths could potentially change in the future, and cause your script to behave unexpectedly.</p>
<p>If so, I'm not sure if this is still important in the context of using <em>txInfoValidRange</em> in smart contracts though, since it seems to have changed from SlotRange to POSIXTimeRange (<a href="https://github.com/input-output-hk/plutus/blob/65fa7ce05a810947f565ac59b4d4e35b3cd5d1b3/plutus-ledger-api/src/PlutusLedgerApi/V1/Contexts.hs#L109" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus/blob/65fa7ce05a810947f565ac59b4d4e35b3cd5d1b3/plutus-ledger-api/src/PlutusLedgerApi/V1/Contexts.hs#L109</a> since this <a href="https://github.com/input-output-hk/plutus/commit/7efc96474d3d28fc1d35c1d8a4a3ebe03d651190#diff-7fb2bda211144200604187079d6c51f5be6dcac75e8a2bc2d9b818758c349c3aR108" rel="nofollow noreferrer">commit</a>) - and so you probably don't need to care about this any longer.</p>
<p>In any case this is not related to how long your contract stays on chain, but only how one needs to consider working with time &amp; slot length in certain scenarios.</p>
