<p>OK. This got interesting quickly. I have built a small block explorer and have found 5 transactions with high nLockTime values in blocks:</p>

<p><a href="http://blockexplorer.com/rawblock/000000000000036a546044e094db778e1c146f051cd5d0e52fb0e6c43e63ea8c" rel="nofollow">http://blockexplorer.com/rawblock/000000000000036a546044e094db778e1c146f051cd5d0e52fb0e6c43e63ea8c</a></p>

<p><a href="http://blockexplorer.com/rawblock/000000000000049bd7c8aebf91efc907c880a35c05b7861b4eab3fc09655bb05" rel="nofollow">http://blockexplorer.com/rawblock/000000000000049bd7c8aebf91efc907c880a35c05b7861b4eab3fc09655bb05</a></p>

<p><a href="http://blockexplorer.com/rawblock/00000000000005f229df518de50c53616f4f2f895deca078dce1d74d5b79e39c" rel="nofollow">http://blockexplorer.com/rawblock/00000000000005f229df518de50c53616f4f2f895deca078dce1d74d5b79e39c</a></p>

<p><a href="http://blockexplorer.com/rawblock/000000000000026e8536f6ffe741feeb30d7123e6435b3ad7db141833969b5bf" rel="nofollow">http://blockexplorer.com/rawblock/000000000000026e8536f6ffe741feeb30d7123e6435b3ad7db141833969b5bf</a></p>

<p><a href="http://blockexplorer.com/rawblock/00000000000001d985839442aac0179713fc7f6e5b109d524a272d3d55600d7a" rel="nofollow">http://blockexplorer.com/rawblock/00000000000001d985839442aac0179713fc7f6e5b109d524a272d3d55600d7a</a></p>

<p>There is one in each block with lock time values 198370, 199000, 199000, 207150 and 207167. None of them are expired yet.  </p>

<p>I will answer my own question and start a post in bitcointalk to see this in more depth (how the transactions got there, what happens to them if the clients change, etc).</p>

CC BY-SA 3.0
2012-12-18T12:27:54.003Z
2012-12-18T12:27:54.003Z
halftimepad
<p>Solved. You can prepare transactions with a wait time and the standard client will accept them. </p>

<p>You can check some details in:
<a href="https://bitcointalk.org/index.php?topic=131443.0">https://bitcointalk.org/index.php?topic=131443.0</a></p>

<p>Essentially, I have been able to create a raw transaction <a href="https://en.bitcoin.it/wiki/Raw_Transactions">https://en.bitcoin.it/wiki/Raw_Transactions</a> using bitcoind. Then, before signing, I could manually replace the bytes for the sequence number and the locktime. I had some hard time with locktime. First you set the UNIX timestamp you want, then convert to hex, reverse the bytes (little endian) and replace the the last bytes of the hex transaction. <a href="https://en.bitcoin.it/wiki/Protocol_specification#tx">https://en.bitcoin.it/wiki/Protocol_specification#tx</a> tells you which are the relevant bytes. You can later sign the new transaction and send it.  </p>

<p>I've been using the guide in:
<a href="https://people.xiph.org/~greg/signdemo.txt">https://people.xiph.org/~greg/signdemo.txt</a></p>

<p>I did all in the testnet. In my first attempts I wasn't careful with my change and ended up spending all my wallet in fees. You should be careful if you try this with real bitcoins.</p>

CC BY-SA 3.0
2013-01-06T23:47:26.050Z
2013-01-06T23:47:26.050Z
halftimepad
<p>I'd like to know if there are transactions that can only take place at some predefined moment. In principle, it should be possible to use the parameter nLockTime to wait for a particular block number:</p>

<p><a href="https://en.bitcoin.it/wiki/Protocol_specification#tx" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Protocol_specification#tx</a></p>

<p>This could be useful in certain contracts, but replacement is not as yet supported:</p>

<p><a href="https://bitcoin.stackexchange.com/questions/861/why-isnt-transaction-replacement-supported">Why isn&#39;t transaction replacement supported?</a></p>

<p>In any case, it seems you still can, in principle, create a simple, unreplaceable transaction with a wait time. </p>

<p>Is there any example of such a transaction in the blockchain? If not, would it be accepted by the standard client or would it be necessary to convince one miner to include it in one of his/her blocks.</p>

<p><strong>UPDATE:</strong> Opened a discussion in <a href="https://bitcointalk.org/index.php?topic=131443.0" rel="nofollow noreferrer">https://bitcointalk.org/index.php?topic=131443.0</a> to delve further.</p>

<transactions><blockchain><protocol><timestamp>
Transactions with a wait time (using nLockTime)
halftimepad
# Transactions with a wait time (using nLockTime)

(Asked by: username_0 on 2012-12-14)

I'd like to know if there are transactions that can only take place at some predefined moment. In principle, it should be possible to use the parameter nLockTime to wait for a particular block number:

<https://en.bitcoin.it/wiki/Protocol_specification#tx>

This could be useful in certain contracts, but replacement is not as yet supported:

[Why isn't transaction replacement supported?](https://bitcoin.stackexchange.com/questions/861/why-isnt-transaction-replacement-supported)

In any case, it seems you still can, in principle, create a simple, unreplaceable transaction with a wait time.

Is there any example of such a transaction in the blockchain? If not, would it be accepted by the standard client or would it be necessary to convince one miner to include it in one of his/her blocks.

**UPDATE:** Opened a discussion in <https://bitcointalk.org/index.php?topic=131443.0> to delve further.

**Tags:** transactions, blockchain, protocol, timestamp


---

## 2 answers

### Answer by username_0 on 2013-01-06. Score: 8 | Accepted answer

Solved. You can prepare transactions with a wait time and the standard client will accept them.

You can check some details in:
<https://bitcointalk.org/index.php?topic=131443.0>

Essentially, I have been able to create a raw transaction <https://en.bitcoin.it/wiki/Raw_Transactions> using bitcoind. Then, before signing, I could manually replace the bytes for the sequence number and the locktime. I had some hard time with locktime. First you set the UNIX timestamp you want, then convert to hex, reverse the bytes (little endian) and replace the the last bytes of the hex transaction. <https://en.bitcoin.it/wiki/Protocol_specification#tx> tells you which are the relevant bytes. You can later sign the new transaction and send it.

I've been using the guide in:
<https://people.xiph.org/~greg/signdemo.txt>

I did all in the testnet. In my first attempts I wasn't careful with my change and ended up spending all my wallet in fees. You should be careful if you try this with real bitcoins.


---

### Answer by username_0 on 2012-12-18. Score: 4

OK. This got interesting quickly. I have built a small block explorer and have found 5 transactions with high nLockTime values in blocks:

<http://blockexplorer.com/rawblock/000000000000036a546044e094db778e1c146f051cd5d0e52fb0e6c43e63ea8c>

<http://blockexplorer.com/rawblock/000000000000049bd7c8aebf91efc907c880a35c05b7861b4eab3fc09655bb05>

<http://blockexplorer.com/rawblock/00000000000005f229df518de50c53616f4f2f895deca078dce1d74d5b79e39c>

<http://blockexplorer.com/rawblock/000000000000026e8536f6ffe741feeb30d7123e6435b3ad7db141833969b5bf>

<http://blockexplorer.com/rawblock/00000000000001d985839442aac0179713fc7f6e5b109d524a272d3d55600d7a>

There is one in each block with lock time values 198370, 199000, 199000, 207150 and 207167. None of them are expired yet.

I will answer my own question and start a post in bitcointalk to see this in more depth (how the transactions got there, what happens to them if the clients change, etc).


---

