Pages:
Author

Topic: How do timelocked transactions work? - page 2. (Read 1265 times)

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 28, 2023, 01:53:17 PM
#27
How safe are timelocks? I mean, what if there is a radical change in bitcoin network that requires hard fork and what if everyone moves their nodes/miners to support the fork? I lack technical knowledge in this field so can anyone form a hypothesis what will happen if there is a hard fork that everyone follows? What will happen if there is a hard fork in 2026 but my coins are locked till 2028?
With hard forks, all bets are off. If you picked a certain block in the future and we get 1 block per minute instead of every 10 minutes, it's going to be mined a lot faster.
hero member
Activity: 882
Merit: 792
Watch Bitcoin Documentary - https://t.ly/v0Nim
September 28, 2023, 01:06:18 PM
#26
How safe are timelocks? I mean, what if there is a radical change in bitcoin network that requires hard fork and what if everyone moves their nodes/miners to support the fork? I lack technical knowledge in this field so can anyone form a hypothesis what will happen if there is a hard fork that everyone follows? What will happen if there is a hard fork in 2026 but my coins are locked till 2028?
legendary
Activity: 2268
Merit: 18711
September 28, 2023, 10:44:28 AM
#25
Even if coinb.in disappears and you don't have a copy, the addresses it creates follow a simple script in order to be timelocked. I explain the script in this post:

Let's take the following public key as an example, which is generated from the private key 0000....0001:
Code:
0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798

Let's also say we don't want any coins on this address to be spendable until block 800,000.

So we head to https://coinb.in/#newTimeLocked and paste in our public key, select "blockheight", enter 800000, and hit "Submit". We then get shown a P2SH address which has the following redeem script:
Code:
0300350cb175210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac

Let's break that down:

03 - push 3 bytes to the stack
00350c - little endian encoding of the number 800,000
b1 - OP_CHECKLOCKTIMEVERIFY
75 - OP_DROP
21 - push 33 bytes to the stack

The next 33 bytes are the public key we pasted in as above, followed by 0xac, which is OP_CHECKSIG.

So this script essentially checks if we have reached the necessary block (or Unix time) specified. If we haven't, it terminates in an error. If we have reached the necessary height/time, then OP_CHECKLOCKTIMEVERIFY will verify, OP_DROP will clear the stack, and then all that is left will be the pubkey and OP_CHECKSIG as it would be in a old school P2PK output.

Given that, all you actually need to provide is a signature for the original private key and you will be able to sign transactions from this address, just as you would from an old school P2PK address. The rest of the script executes automatically.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 28, 2023, 09:40:07 AM
#24
I'm not a tech person, but what will happen if I lock my bitcoins for 10 years? and Coinbin website goes offline before that time, how will I be able to access my bitcoins at that time.
Keep a backup copy of coinb.in Smiley Just like you should have a backup copy of Bitaddress.org and iancoleman.io.
You should use those sites offline and air-gapped anyway.
sr. member
Activity: 1820
Merit: 418
Telegram: @worldofcoinss
September 28, 2023, 09:33:43 AM
#23
I'm not a tech person, but what will happen if I lock my bitcoins for 10 years? and Coinbin website goes offline before that time, how will I be able to access my bitcoins at that time.

Didn't wanted to create a new topic so bumping up this one  Smiley
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
March 19, 2023, 10:40:52 AM
#22
The coins should be unlocked in the next couple of hours.
Did it work?

Yay. There we go.
As I said, I was able to do what I needed to lock the wallet. I don't think I have to explain how I did it because you all know and you guys guided me on what to do. I have successfully unlocked my locked Bitcoin and sent it to my other wallet. Here is the last screenshot;



The last thing about this matter is. @o_e_l_e_o as I mentioned in my last post, Some members do not suggest this method. They suggested asking the wallet provider to develop this system and use this feature on a wallet. Do you think any wallet has such features?

I generally dislike using web tools as well, but I am not aware of any reputable open source wallet which provides this feature, and for the vast majority of users manually crafting such a transaction is out of the question or incredibly risky, and so the web tool is the best option.

I would make sure to download and save a copy of Coinbin as well from their Github here (https://github.com/OutCast3k/coinbin/), just in case something happens to it before you need to spend your coins. Using your own copy offline will be easier than figuring out how to import your redeem script in to some other wallet software.
Edit: I noticed you already posted. What timing? Thanks for the answer.
Yeah, I downloaded the offline version as well.
I guess I can continue now.
legendary
Activity: 2268
Merit: 18711
March 19, 2023, 04:32:24 AM
#21
The coins should be unlocked in the next couple of hours.
Did it work?

They had issues with coinb.in doesn't accept segWit Address. But, for me. It's accepted my segWit address.
It took many years for some services to start supporting segwit addresses. There are unfortunately some services (mainly some awful centralized exchanges) which still don't accept segwit addresses 5 years on!

Another thing is Some legendaries discouraged using this method in this thread; https://bitcointalksearch.org/topic/m.53504875
I generally dislike using web tools as well, but I am not aware of any reputable open source wallet which provides this feature, and for the vast majority of users manually crafting such a transaction is out of the question or incredibly risky, and so the web tool is the best option.

I would make sure to download and save a copy of Coinbin as well from their Github here (https://github.com/OutCast3k/coinbin/), just in case something happens to it before you need to spend your coins. Using your own copy offline will be easier than figuring out how to import your redeem script in to some other wallet software.
member
Activity: 78
Merit: 11
March 19, 2023, 03:32:35 AM
#20
I would greatly benefit from such a system. If I save something. Then I promise. I will not spend this money again. But after a few days I spent that money for my little needs. If something like your idea comes to fruition, I can make a long-term plan. Then after some time I will collect a big amount. I can do any big project with that. I especially would benefit greatly from having such a system.
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
March 18, 2023, 09:32:42 AM
#19
The other thing I would suggest would be to test all this out before you set up your main timelocked address. Create a key pair and set up a timelocked address with a timelock in the near future, say a week or so. Send a small amount of coins to this address, check that you cannot spend from it, wait until the timelock has passed, and then check that you can recover the coins. You don't want to be in a situation in 5 years' time where you find you've spent years sending coins to an address you cannot redeem!

Hi Leo.
I think I got it. I created a Standard Electrum wallet and followed the tutorial. It seems like I have done everything I nedeed.
I also tried to redeem it, and I am getting an error for now (because it's locked). The coins should be unlocked in the next couple of hours.
I am excited about it. This is the screen I am getting now;



I tried searching on the forum to see if anyone had tried it. All I am getting is someone named Get-Paid.com tried this a couple of years ago and faced too many problems unlocking it. They had issues with coinb.in doesn't accept segWit Address. But, for me. It's accepted my segWit address. I will update you once I am done. Another thing is Some legendaries discouraged using this method in this thread; https://bitcointalksearch.org/topic/m.53504875

BTW, I got the term of your username. O is the middle point. Now I can read to both sides, and it will pronounce the same  Grin
legendary
Activity: 2268
Merit: 18711
March 18, 2023, 04:30:19 AM
#18
Thanks for the info and the help, guys.
I am running a Full Node. But, Not 24/7. I have to synchronize a little bit to be up to date.
Not sure which one will be better to try. Electrum or Bitcoin Core?
Doesn't make much difference. As I explained above, for this specific purpose all you are using your Electrum or Core software for is to generate a key pair to use in Coinbin's tool. You don't actually need the wallet functionality of Electrum or Core whatsoever. Both will create cryptographically secure keys, so the only real difference will be in how you back them up. If you create the key pair in Electrum, then you will have a seed phrase which you can write down on paper and store physically, and you could even delete the Electrum wallet file once you are done, knowing you can restore your private key from the seed phrase. If you create the key pair in Core, then you won't get a seed phrase and instead will have a wallet.dat file which you can encrypt and store electronically.

In both cases you will use your generated public key on Coinbin to create your timelocked address, and in both cases you will import your private key to an offline version of Coinbin to sign any outgoing transactions. So the wallet software you used will be irrelevant at this point.

The other thing I would suggest would be to test all this out before you set up your main timelocked address. Create a key pair and set up a timelocked address with a timelock in the near future, say a week or so. Send a small amount of coins to this address, check that you cannot spend from it, wait until the timelock has passed, and then check that you can recover the coins. You don't want to be in a situation in 5 years' time where you find you've spent years sending coins to an address you cannot redeem!
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
March 17, 2023, 12:10:17 PM
#17
Thanks for the info and the help, guys.
I am running a Full Node. But, Not 24/7. I have to synchronize a little bit to be up to date.
Not sure which one will be better to try. Electrum or Bitcoin Core?

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
March 17, 2023, 07:00:57 AM
#16
By Mistake? Yes, I was trying to create a two-factor authentication wallet willingly because I thought it would be more secure. The error says: Could Not Retrieve Terms of service: ErrorConnectingServer(TimeoutError())
There are some small security benefits to using a 2FA wallet, but it comes with an additional cost in fees (both larger transaction fees and fees to the third party TrustedCoin)

For reference, the cost is 0.005BTC (for 20 outgoing TX) and 0.00125BTC (for 100 outgoing TX)[1]. And for 5-8 years, you need to consider whether TrustedCoin still rnu their service in the future.

as well as a loss of privacy due to the reliance on said third party.

Additionally, their privacy policy state their company is U.S. based and use some third party[2].

[1] https://trustedcoin.com/#/faq
[2] https://trustedcoin.com/#/privacy
legendary
Activity: 2268
Merit: 18711
March 17, 2023, 03:49:37 AM
#15
By Mistake? Yes, I was trying to create a two-factor authentication wallet willingly because I thought it would be more secure. The error says: Could Not Retrieve Terms of service: ErrorConnectingServer(TimeoutError())
There are some small security benefits to using a 2FA wallet, but it comes with an additional cost in fees (both larger transaction fees and fees to the third party TrustedCoin), as well as a loss of privacy due to the reliance on said third party. Such a set up can be better achieved by making your own multi-sig wallet between (for example) your computer and your phone, or by using a hardware wallet.

However, none of that matters here. In this case you are simply exporting a single private key in order to make your timelocked address. Any 2FA system will be bypassed by doing this, so it achieves nothing.
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
March 17, 2023, 01:53:46 AM
#14
If you set it too far in the future, plan as to what happens / who has access if you are not around.
Yeah, I know not a happy thought but something you do have to consider.
-Dave

I plan to accumulate Bitcoin for five to eight years as I believe this is something I can consider a Gem. We are facing Inflation, and I survived because I had some foreign currency. I do a remote job and still, get a salary from abroad. Before the inflation, it was like 1:2. Now it's 1:3. So I am getting more fiat when I exchange them. This time I didn't get affected by inflation too much. But who knows? The other country could face higher inflation than us, and we can get f**ed up. Bitcoin will touch at least 500K in the next eight years.

So, Not for too long. I am in my 30's. Expecting to be around for at least a couple of years.
If I die before that, that's bad luck.
I downloaded an Electrum wallet from Electrum.org for windows. It's installed fine. When I tried to create a wallet, it stuck in the last step where I have to accept the TOS and I can't click on Accept button.
There is no ToS to accept when creating a standard Electrum wallet. Are you trying to create a two-factor authentication wallet by mistake?

By Mistake? Yes, I was trying to create a two-factor authentication wallet willingly because I thought it would be more secure. The error says: Could Not Retrieve Terms of service: ErrorConnectingServer(TimeoutError())
sr. member
Activity: 854
Merit: 424
I stand with Ukraine!
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
March 16, 2023, 02:45:35 PM
#12
It won't generate a segwit timelocked address, no.

You are correct, I thought it would and then did not read fully.

-Dave
legendary
Activity: 2268
Merit: 18711
March 16, 2023, 02:38:49 PM
#11
Leo? Oe Leo? A bit puzzled. Let me say buddy instead.
Leo. Tongue

I downloaded an Electrum wallet from Electrum.org for windows. It's installed fine. When I tried to create a wallet, it stuck in the last step where I have to accept the TOS and I can't click on Accept button.
There is no ToS to accept when creating a standard Electrum wallet. Are you trying to create a two-factor authentication wallet by mistake?

Do you know if coinb.in will be able to generate a segwit address or not? Segwit transactions are the cheapest I believe.
It won't generate a segwit timelocked address, no.

One more question, If I send my coins to a locked wallet. They will get a network confirmation. Right?
Correct. Transactions which send coins to your timelocked wallet will be like any other transaction and will confirm normally.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
March 16, 2023, 02:33:59 PM
#10
1) They can do segwit. https://coinb.in/#newSegWit BUT NOT FOR A TIME LOCKED.

2) The TX are sent but the address you are sending to cannot send till the time / block has passed.


If you set it too far in the future, plan as to what happens / who has access if you are not around.
Yeah, I know not a happy thought but something you do have to consider.


-Dave
hero member
Activity: 462
Merit: 767
Instant cryptocurrency exchange with own reserves!
March 16, 2023, 02:13:39 PM
#9
... Can I send $10 every week to the locked wallet? Or it's just a one-time transaction?
At least I need to figure out the answer to this question for now. I have several questions spinning in my mind. Let's not ask everything at once. I will get more confused.
...

Keep in mind that years in the future if you have been sending small amounts every weeks for years the fees could be a large amount.
50 +/-  inputs a year trying to go out in a few TX are going to cost you especially if you are selling because the price has gone up. A bit of a clogged mempool and...ouch.

You see that now and then now when people are moving a lot of small inputs that they accumulated over the years.

-Dave

Yeah. That's true. I have to control myself a little more.
Do you know if coinb.in will be able to generate a segwit address or not? Segwit transactions are the cheapest I believe.

One more question, If I send my coins to a locked wallet. They will get a network confirmation. Right? Or maybe those transactions won't get confirmed until my set date or block height?
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
March 16, 2023, 02:05:14 PM
#8
... Can I send $10 every week to the locked wallet? Or it's just a one-time transaction?
At least I need to figure out the answer to this question for now. I have several questions spinning in my mind. Let's not ask everything at once. I will get more confused.
...

Keep in mind that years in the future if you have been sending small amounts every weeks for years the fees could be a large amount.
50 +/-  inputs a year trying to go out in a few TX are going to cost you especially if you are selling because the price has gone up. A bit of a clogged mempool and...ouch.

You see that now and then now when people are moving a lot of small inputs that they accumulated over the years.

-Dave
Pages:
Jump to: