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:


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

Why isn't 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.

  • 1
    The Lock_time facility has potential for a 'Pension' type function. IE Buy 1 Bitcoin today and prevent access to it for 10 years. Sent to a Brain wallet address so no matter what client you use and no matter where in the world you are you can pick up your Bitcoin, Pension, Investment. Could it be modified so that it releases this investment at say, 1% amounts every X UTC Months, so you get 1% every month released to the Brainwallet address. That way, there there are at least 10 years worth of BTC Pension payments. Youd expect an ever dwindling return, but as Bitcoin is deflationary, perhaps no
    – user8792
    Nov 15, 2013 at 13:49

2 Answers 2


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.


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






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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.