Title: How far can I push lock_time? Post by: ltcltcltc on December 13, 2023, 10:12:34 PM Is there a limit to how late a lock_time can be set to?
If not, suppose I send out a transaction that's time-locked to 1 day/month/year/decade into the future. To what degree of certainty will my transaction be eventually be included in a block? In particular, do later-time-locked transactions need higher transaction fees in order to keep the same probability of being included in a block at t ≥ lock_time? Thanks! Title: Re: How far can I push lock_time? Post by: Charles-Tim on December 13, 2023, 10:15:55 PM If the transaction is broadcasted and the transaction fee is high and the transaction is not getting any confirmation, all that can be done at that time is to use child-pay-for-parent to increase the chance of the transaction to get confirmed. I will advise anyone that wants to use time lock to use a high fee rate.
Title: Re: How far can I push lock_time? Post by: hosseinimr93 on December 13, 2023, 11:16:46 PM Is there a limit to how late a lock_time can be set to? The maximum value you can set for the nlocktime is 4,294,967,295 (0xFFFFFFFF in hexadecimal system) That's equivalent to February 7, 2106 6:28:15 AM. If not, suppose I send out a transaction that's time-locked to 1 day/month/year/decade into the future. it may worth mentioning that nodes reject any transaction with a locktime into the future. If you have a transaction with a locktime into the future, you have to wait until its locktime and after that you will be able to broadcast it. In particular, do later-time-locked transactions need higher transaction fees in order to keep the same probability of being included in a block at t ≥ lock_time? We don't know how much fee rates will be required for getting confirmation in the future.If the fee is low, as mentioned above by Charles-Tim, you will need to do CPFP after broadcasting the transaction in the future. Title: Re: How far can I push lock_time? Post by: achow101 on December 14, 2023, 03:51:41 AM If not, suppose I send out a transaction that's time-locked to 1 day/month/year/decade into the future. To what degree of certainty will my transaction be eventually be included in a block? Your transaction is basically guaranteed to never be included in a block if all you did was broadcast it before the locktime was reached.Nodes do not accept or relay transactions which cannot be included in the next block. If you broadcast a transaction with a future locktime, basically all nodes would drop it. Besides that, nodes will also evict transactions that have been unconfirmed for too long (typically 2 weeks as that is the default in Bitcoin Core). If you had a transaction with a timelock greater than 2 weeks in the future, and it was somehow accepted into some node's mempool, it would be dropped before the timelock was reached. |