Bitcoin Forum
November 18, 2024, 03:13:12 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: How to lock bitcoin for certain days  (Read 376 times)
Cricktor
Legendary
*
Offline Offline

Activity: 952
Merit: 1531


Crypto Swap Exchange


View Profile
July 04, 2023, 04:20:25 PM
Last edit: July 04, 2023, 04:45:20 PM by Cricktor
 #21

<snip>

No, they are not the same. What you have linked as explanation on learnmeabitcoin.com is a transaction with a locktime in the future. If it is already signed you can only broadcast it when the locktime has elapsed. If you try to broadcast it before the locktime is elapsed, every receiving node will reject and drop your transaction. It can't and won't be mined into a block because that would make the block invalid if it contains a transaction with a locktime still in the future.
If you're the only holder of such a signed transaction, you could delete the transaction and create a new one. The Bitcoin network obviously doesn't know about your locktime-transaction as you can't broadcast it upfront.

What is described in this thread is a P2SH transaction that has a redeem script that can only be fulfilled when the locktime in the redeem script has elapsed. Before that, any attempt to transfer funds locked by such a redeem script will fail. All funds locked by such an address are truely locked until the script's locktime has elapsed. You can't do anything about it, unless you change the code of every participating node in the Bitcoin network (not gonna happen).

Public addresses are nothing more than recipes how to redeem funds which "have been sent to" such addresses. The expression "sent to a public address" is technically incorrect. What you express by that is to specify a certain type of redeem script and how to fulfill it to be able to move the locked coins by that redeem script. The Bitcoin blockchain itself doesn't know anything about public addresses, nor does it contain them.

A time-locked redeem script gives a P2SH address of the form 3..., the hash of the redeem script is the public address.

There was recently a thread where someone sent a substantial amount of Bitcoin to a P2SH address where the redeem script can only be fulfilled in 125 years (likely due to a 0 digit too much when the redeem script was constructed). Well, shit happens...

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
GR Sasa
Member
**
Offline Offline

Activity: 199
Merit: 14


View Profile
July 05, 2023, 02:15:17 PM
 #22

I am afraid now, what if i sent a locked Bitcoins in the future by accident? Can anyone tell me what to be careful from so i can prevent it by happening? I mainly use Bitcoin Core for sending and receiving Bitcoins.

Thanks,

GR
ranochigo
Legendary
*
Offline Offline

Activity: 3038
Merit: 4420


Crypto Swap Exchange


View Profile
July 05, 2023, 02:51:18 PM
 #23

I am afraid now, what if i sent a locked Bitcoins in the future by accident? Can anyone tell me what to be careful from so i can prevent it by happening? I mainly use Bitcoin Core for sending and receiving Bitcoins.

Bitcoin Core allows the user to specify an nLockTime for their transaction which is basically a guarantee that the transaction cannot be included in a block before the block has elapsed. This doesn't lock your coins in any form, and most of it has to do with how your wallet perceives the "spendable" coins. Deleting that transaction or otherwise spending the coins would still be possible.

If you're talking about an nLockTime address (aka. OP_HODL), it has to be created and scripted manually. So long as it is a P2SH address, it won't contain any nLockTime locks and it has to be pretty deliberate.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!