Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: nullama on March 14, 2022, 11:07:30 PM



Title: Is there a mechanism to broadcast a future transaction in the present?
Post by: nullama on March 14, 2022, 11:07:30 PM
Let's say I want to move a certain amount of coins from address A to address B in a week. Is there any way that I can set it up today somehow, and forget about it, and then the coins are received on address B after a week?

I've looked into the concept of Timelock (https://en.bitcoin.it/wiki/Timelock), but it seems to me that you need to broadcast the transaction in the future to actually make it happen. My understanding is that using timelock basically makes the signed transaction invalid until the relevant date passes. Any intent of broadcasting it beforehand is simply rejected. That means that you would have to wait, and then actively broadcast the transaction to make it work.

Of course you could create some custom code or cron job that executes this, but I'm wondering if there's anything in the Bitcoin network itself that would allow this use case these days.


Title: Re: Is there a mechanism to broadcast a future transaction in the present?
Post by: jackg on March 15, 2022, 02:06:59 AM
No, this isn't achievable at the moment.

You'd have to set a locktime on the transaction and notify yourself later or generate a time locked input that can't be spent until a certain point.


Title: Re: Is there a mechanism to broadcast a future transaction in the present?
Post by: pooya87 on March 15, 2022, 06:18:47 AM
The mechanism is to use nlocktime field and broadcast the signed transaction when the time is close.
The rest is one of those "preferences" of full nodes, like standard rules, minrelaytxfee, their mempool size, etc. The nodes prefer not to hold on to a transaction that can not be mined in the near future so they reject it. That means you have to broadcast that transaction close to the time when it could actually be mined.


Title: Re: Is there a mechanism to broadcast a future transaction in the present?
Post by: OcTradism on March 15, 2022, 11:49:01 AM
I have never used it but you can check this one

Using Locktime for inheritance planning, backups or gifts (https://bitcointalk.org/index.php?topic=5180850.0). Please make sure you test it with a small Bitcoin before you actually set it up with a big amount of Bitcoin you have and want to give it to another person.