You could accomplish your rough goal by having: tx A: desired expiry at H tx B: nlocktime H, use same inputs as A, create outputs equivalent to inputs (have to be sure no relative timelocks) Thus after a timeout the participants in A can cancel the action using TX B. The difference is the coins have to move, without knowing your use case this may or may not help you. On Fri, Apr 9, 2021, 4:40 AM Russell O'Connor via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > From https://bitcointalk.org/index.php?topic=1786.msg22119#msg22119: > > We can't safely do OP_BLOCKNUMBER. In the event of a block chain reorg >> after a segmentation, transactions need to be able to get into the chain in >> a later block. The OP_BLOCKNUMBER transaction and all its dependants would >> become invalid. This wouldn't be fair to later owners of the coins who >> weren't involved in the time limited transaction. >> >> nTimeLock does the reverse. It's an open transaction that can be >> replaced with new versions until the deadline. It can't be recorded until >> it locks. The highest version when the deadline hits gets recorded. It >> could be used, for example, to write an escrow transaction that will >> automatically permanently lock and go through unless it is revoked before >> the deadline. The feature isn't enabled or used yet, but the support is >> there so it could be implemented later. >> > > Unfortunately, limiting the maximum block height for a specific > transaction would have exactly the same problem as cited above for > OP_BLOCKNUMBER. > > On Fri, Apr 9, 2021 at 7:21 AM Erik Aronesty via bitcoin-dev < > bitcoin-dev@lists.linuxfoundation.org> wrote: > >> is there any way to specify a maximum block height on a transaction? >> >> ie: this tx is only valid if included in a block with a certain height or >> less >> >> i feel like this would be useful >> _______________________________________________ >> bitcoin-dev mailing list >> bitcoin-dev@lists.linuxfoundation.org >> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >> > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >