Author

Topic: How do timelocked transactions work? (Read 1190 times)

legendary
Activity: 2268
Merit: 18509
October 20, 2023, 01:27:10 AM
#47
Edit: I did that on my local time. Does it mean Coinbin uses the local timezone?
It uses unix time, which is what the bitcoin network uses as well to avoid issues with timezones, otherwise many nodes would incorrectly reject blocks from elsewhere in the world since their timestamps could differ by many hours.

Unix time is based on UTC time. Most block explorers will also show times based in UTC for this reason. Unix time is the number of seconds since 00:00 on 1st January 1970, UTC.

legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
October 19, 2023, 11:23:45 PM
#46
Edit: I did that on my local time. Does it mean Coinbin uses the local timezone?
According to their source's javascript: "bootstrap-datetimepicker.min.js", the time picker uses "defaults={timeZone:"Etc/UTC",", AKA "UTC time zone".
Link to source: js/bootstrap-datetimepicker.min.js

Their service status page also uses the same timezone, link: https://status.coinb.in/
sr. member
Activity: 1820
Merit: 418
Need a campaign manager? | Telegram:@worldofcoinss
October 19, 2023, 04:38:47 PM
#45
It's not possible. I already tested this earlier in this thread here: https://bitcointalksearch.org/topic/m.62920786. Your transaction's timelock must have reached the exact block height or the exact network adjusted time to be accepted by a node.

You're correct. I tried broadcasting the transaction 1 hour before and it didn't work.

Edit: I did that on my local time. Does it mean Coinbin uses the local timezone?
legendary
Activity: 2268
Merit: 18509
October 19, 2023, 08:28:25 AM
#44
I tried to broadcast transactions before a valid date and got this error "the transaction was rejected by network rules. non-final"
This is the standard error for transactions with a timelock which has not yet expired.

I have set parameters today for hour 23:00, I'll try to broadcast the transaction around 21:10 and see if it's possible.
It's not possible. I already tested this earlier in this thread here: https://bitcointalksearch.org/topic/m.62920786. Your transaction's timelock must have reached the exact block height or the exact network adjusted time to be accepted by a node.
sr. member
Activity: 1820
Merit: 418
Need a campaign manager? | Telegram:@worldofcoinss
October 18, 2023, 07:43:19 PM
#43
It will be rejected by mempool,

I tried to broadcast transactions before a valid date and got this error "the transaction was rejected by network rules. non-final"
This error above was the same in both cases of Block height and Date and Time.

I read that you can broadcast it 2 hours before it becomes valid (but never tested this).

I have set parameters today for hour 23:00, I'll try to broadcast the transaction around 21:10 and see if it's possible.
legendary
Activity: 2380
Merit: 5213
September 29, 2023, 03:26:53 PM
#42
The other thing you mention is exactly what I wanted. I ll check it out.
If you want to use OP_CHECKLOCKTIMEVERIFY to lock output(s) of a transaction until a specified time/block height, you must create a timelocked address and that's what already discussed in this thread.
Take note that you can't send bitcoin to a regular address (a legacy or a bech32 address) and make the outputs locked until a specified time/block height.
sr. member
Activity: 406
Merit: 896
September 29, 2023, 03:01:41 PM
#41

Both of you refer to locktime. I was referring to OP_CHECKLOCKTIMEVERIFY. They are completely different.


Brilliant thanks! That's exactly what I was asking for. I now how lock time works. I've actually tested it and used it in real life for educational purposes. The other thing you mention is exactly what I wanted. I ll check it out.

legendary
Activity: 1512
Merit: 7340
Farewell, Leo
September 29, 2023, 02:56:46 PM
#40
As far as the BIP that you mentioned is concerned, isn't it the definition of timelocked transactions?
Define me "timelocked". There's the "You cannot mine this until block x" timelocked (AKA, locktime). There's the "You cannot spend this until block x" timelocked. There's the "You cannot spend this after block x" timelocked*. All do lock to the future, though, yes.

I mean are you sure that the only move I need to do is to broadcast it now and it will be mined in 2 years?
No, it will be mined in 10 minutes, but the new UTXO cannot be spent until 2025.

In the case you broadcast a transaction before its locktime, nodes will reject it and they won't keep your transaction in their mempool at all.
If the locktime of your transaction has been set to 2 years later, you have to wait for 2 years and then broadcast your transaction.
That's what I also know. But according to BlackHatCoiner and the BIP he mentioned, it may be possible to broadcast now, have it mined and locked until 2 years later
Both of you refer to the locktime field. I was referring to OP_CHECKLOCKTIMEVERIFY. They are completely different. The former is checked when you attempt to include its transaction to a block. The latter is checked when you attempt to spend an output.



*This one doesn't really exist, but it exists in concept. It was called OP_BLOCKNUMBER, but the founder warned for security implications: https://bitcointalksearch.org/topic/m.22119
sr. member
Activity: 406
Merit: 896
September 29, 2023, 02:54:32 PM
#39
I mean are you sure that the only move I need to do is to broadcast it now and it will be mined in 2 years? Or do I need to do something else after those 2 years?
In the case you broadcast a transaction before its locktime, nodes will reject it and they won't keep your transaction in their mempool at all.
If the locktime of your transaction has been set to 2 years later, you have to wait for 2 years and then broadcast your transaction.

That's what I also know. But according to BlackHatCoiner and the BIP he mentioned, it may be possible to broadcast now, have it mined and locked until 2 years later
legendary
Activity: 2380
Merit: 5213
September 29, 2023, 02:51:54 PM
#38
I mean are you sure that the only move I need to do is to broadcast it now and it will be mined in 2 years? Or do I need to do something else after those 2 years?
In the case you broadcast a transaction before its locktime, nodes will reject it and they won't keep your transaction in their mempool at all.
If the locktime of your transaction has been set to 2 years later, you have to wait for 2 years and then broadcast your transaction.
sr. member
Activity: 406
Merit: 896
September 29, 2023, 02:43:29 PM
#37
Do you know if there is any way to create a timelocked transaction but broadcast it now and make it wait until the timelock?
What you're really asking is if you can broadcast a transaction, have it mined, but lock its outputs until a specified time. This is "saving it temporarily", but "broadcasting it later". And there exists. It's called OP_CHECKLOCKTIMEVERIFY. Spending such locktime outputs before the specified nLockTime will cause the script to fail.

Wouldn't it be nice if there was such a feature? Do you think it would be bad for bitcoin to allow it?
The particular feature you mentioned would be bad, because it lacks the spam protection from OP_CHECKLOCKTIMEVERIFY. TX A is unconfirmed, you bloat the network with "not-yet-mineable" transactions. Before TX A becomes confirmed, you double-spend it with B and now all the other transactions are invalid.

You could also not depend on that feature. What if most nodes' mempools are clogged, and they only keep transactions paying an x sat/vb, which is lower than yours? The transaction will not be broadcasted at the time you'd have scheduled it.

I get your point. Very good explanation. Thanks.

As far as the BIP that you mentioned is concerned, isn't it the definition of timelocked transactions? I mean are you sure that the only move I need to do is to broadcast it now and it will be mined in 2 years? Or do I need to do something else after those 2 years?
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
September 29, 2023, 02:27:52 PM
#36
Do you know if there is any way to create a timelocked transaction but broadcast it now and make it wait until the timelock?
What you're really asking is if you can broadcast a transaction, have it mined, but lock its outputs until a specified time. This is "saving it temporarily", but "broadcasting it later". And there exists. It's called OP_CHECKLOCKTIMEVERIFY. Spending such locktime outputs before the specified nLockTime will cause the script to fail.

Wouldn't it be nice if there was such a feature? Do you think it would be bad for bitcoin to allow it?
The particular feature you mentioned would be bad, because it lacks the spam protection from OP_CHECKLOCKTIMEVERIFY. TX A is unconfirmed, you bloat the network with "not-yet-mineable" transactions. Before TX A becomes confirmed, you double-spend it with B and now all the other transactions are invalid.

You could also not depend on that feature. What if most nodes' mempools are clogged, and they only keep transactions paying an x sat/vb, which is higher than yours? The transaction will not be broadcasted at the time you'd have scheduled it.
legendary
Activity: 2268
Merit: 18509
September 29, 2023, 01:10:27 PM
#35
It will be rejected by mempool, I read that you can broadcast it 2 hours before it becomes valid (but never tested this).
I've not heard this before - I'm pretty sure it has to have reached the set time or the set block height, with no adjustments. Indeed, I just tried to broadcast a timelocked transaction on testnet, timelocked both 1 minute in front of my adjusted network time and also 1 block in front of the current block height, and both were rejected.
sr. member
Activity: 406
Merit: 896
September 29, 2023, 10:23:07 AM
#34
Absolutely, I can also do that with my node, but automatic broadcast would mean that I wouldn't need to actually save the transaction anywhere. I guess I will have to implement it myself then.
If you're running a node anyway, you don't even need the locktime: you can just schedule the transaction. The locktime is a nice fail safe against mistakes though, and you can sign offline.

I guess you mean writing a custom script, correct?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 29, 2023, 10:12:27 AM
#33
Absolutely, I can also do that with my node, but automatic broadcast would mean that I wouldn't need to actually save the transaction anywhere. I guess I will have to implement it myself then.
If you're running a node anyway, you don't even need the locktime: you can just schedule the transaction. The locktime is a nice fail safe against mistakes though, and you can sign offline.
sr. member
Activity: 406
Merit: 896
September 29, 2023, 09:56:58 AM
#32
Anyone with access to the transaction can broadcast it. There's no need to change the protocol for things that can be done already. See bitcoin-cli help sendrawtransaction. I'm running Bitcoin Core on a server, I could just try to broadcast your transaction every hour, or setup a scheduler that waits until it's time.
For more practical purposes, and I'm thinking of inheritance, you could just as well give the raw transaction to someone to broadcast when needed.

Absolutely, I can also do that with my node, but automatic broadcast would mean that I wouldn't need to actually save the transaction anywhere. I guess I will have to implement it myself then.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 29, 2023, 09:47:17 AM
#31
Do you know if there is any way to create a timelocked transaction but broadcast it now and make it wait until the timelock?
It will be rejected by mempool, I read that you can broadcast it 2 hours before it becomes valid (but never tested this).

Quote
I am talking about an "automatic" addition to the mempool (somehow?) when the desired block has passed. I suppose it can't be done, because of the simple fact that there is nowhere that the nodes / miners could "save" this kind of transactions.
Anyone with access to the transaction can broadcast it. There's no need to change the protocol for things that can be done already. See bitcoin-cli help sendrawtransaction. I'm running Bitcoin Core on a server, I could just try to broadcast your transaction every hour, or setup a scheduler that waits until it's time.
For more practical purposes, and I'm thinking of inheritance, you could just as well give the raw transaction to someone to broadcast when needed.
sr. member
Activity: 406
Merit: 896
September 29, 2023, 09:26:08 AM
#30
Hey guys. I have asked this question again, but I can't find for some reason. I think it didn't have any answers anyway, so  I ask again.

Do you know if there is any way to create a timelocked transaction but broadcast it now and make it wait until the timelock? I am talking about an "automatic" addition to the mempool (somehow?) when the desired block has passed. I suppose it can't be done, because of the simple fact that there is nowhere that the nodes / miners could "save" this kind of transactions.

Wouldn't it be nice if there was such a feature? Do you think it would be bad for bitcoin to allow it? Or perhaps would it need radical changes to the way bitcoin works and therefore it can't be supported?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 29, 2023, 06:53:47 AM
#29
On related note, aren't there anyone who archive Bitcoin-related software and source?
I've thought about it, but didn't want to be the one telling people "my copy is safe". Who's going to download Electrum from loyce.club? I still have a copy of a well-known paper wallet site that turned into a scam later, and I'm pretty sure my copy is still okay. But I can't know for sure, and people shouldn't trust me on it.

If it ever comes to it, I'm pretty sure many people have their own backups of coinb.in and other software, and as long as you keep it air-gapped and wipe the system afterwards, there's not much that can go wrong if you use someone else's old download.
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
September 29, 2023, 02:47:08 AM
#28
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.
You'll just lose access to coinb.in's server that retrieves inputs for you through that "Load" button as well as its native broadcast, otherwise the offline version will still be functional.
While offline, it wont be able to preload the necessary data in the inputs and set the correct parameters of a valid OP_CLTV input.

Since you're not a tech person,
I'll just provide simple but detailed instructions on what data to add and change in coinb.in for your transaction to be valid while offline.

In "New->Transaction", "Inputs" tab:
  • It's should point to the unspent transaction output that you want to spend.
    Both "Transaction ID:" and "N:" have a tooltip that briefly explains what it is by hovering over them.
    First is the "Transaction ID:" which is the TXID of the transaction that funded your timelocked address.
    Next, the "N" (output index) that starts with '0', if your address is the first output, it should be '0'; if it's second, it should be '1' and so on.
  • The "Script" is the "Redeem Script" provided to you in "New->Time Locked Address" when you created the address.
  • The "Amount" is the amount that you've received.

In "Outputs" tab:
  • Just the recipient and amount.
    However, be careful on setting the amount since you wont be able to set the fee manually.
    The fee will be computed based from the input's amount and the output's amount, the fee rate will be computed manually from the final raw transaction's size so leave a reasonable amount for the fee.

Most importantly, expand the "Advanced Option":
  • Under "locktime", the value should be edited from '0' to the value of the locktime that you've set or higher.
    If you've used the date and time format, you can decode your redeem script in Bitcoin Core via decodescript command to see its locktime; or use epoch converter.
    If left with default "0", the transaction will be rejected by nodes during broadcast by not following one of these conditions: BIP-0065.

Then proceed to 'Sign' and Broadcast the signed raw transaction to other push transaction services/clients.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
September 28, 2023, 02: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: 854
Merit: 772
Watch Bitcoin Documentary - https://t.ly/v0Nim
September 28, 2023, 02: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: 18509
September 28, 2023, 11: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, 10: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
Need a campaign manager? | Telegram:@worldofcoinss
September 28, 2023, 10: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
#SWGT CERTIK Audited
March 19, 2023, 11: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: 18509
March 19, 2023, 05: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, 04: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
#SWGT CERTIK Audited
March 18, 2023, 10: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: 18509
March 18, 2023, 05: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
#SWGT CERTIK Audited
March 17, 2023, 01: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: 2856
Merit: 7410
Crypto Swap Exchange
March 17, 2023, 08: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: 18509
March 17, 2023, 04: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
#SWGT CERTIK Audited
March 17, 2023, 02: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: 658
Merit: 354
I stand with Ukraine!
legendary
Activity: 3458
Merit: 6231
Crypto Swap Exchange
March 16, 2023, 03: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: 18509
March 16, 2023, 03: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: 3458
Merit: 6231
Crypto Swap Exchange
March 16, 2023, 03: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
#SWGT CERTIK Audited
March 16, 2023, 03: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: 3458
Merit: 6231
Crypto Swap Exchange
March 16, 2023, 03: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
hero member
Activity: 462
Merit: 767
#SWGT CERTIK Audited
March 16, 2023, 03:03:16 PM
#7
I am still wondering if it meets my needs. Can I send $10 every week to the locked wallet? Or it's just a one-time transaction?
Yes, absolutely. I've skimmed through the guide you linked and I can't see any major issues. It will create an address which you can send as many transaction as you like to, and none of the coins sent to that address can be redeemed until after the date or block height that you have chosen. The most important parts are to ensure you are downloading the legitimate versions of Electrum and Coinbin (i.e. download them from Github and verify their signatures), do the whole process on an offline (ideally permanently airgapped) device to protect your private keys, and to save the redeem script that you generate.

All you are using Electrum for here is generating a keypair to use in the Coinbin script. You could use any good piece of software, such as Bitcoin Core, to generate a keypair if you prefer.

I would also suggest that something like $50 a month is probably better than $10 a week, otherwise you will end up spending a large amount on transaction fees when you need to consolidate all your small inputs.

Oh, Thank you  Huh Huh
Leo? Oe Leo? A bit puzzled. Let me say buddy instead.
Sending multiple times in a locked wallet is my main priority as I will try to accumulate and hold. Yeah, it will be good if I spend less on fees. Once again, I can spend those coins on gambling casinos during the month I accumulate. That's why I need a locked wallet. You may understand how stupid I am.

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 are two other buttons at the top right corner. One is the close button and another is the Question mark. When I click on the Question mark, it load for a few sec pops up an error saying (ah, I forgot the message. I will edit once I will be on my desktop).

Note that the Terms and Condition page is blank.
legendary
Activity: 2268
Merit: 18509
March 16, 2023, 02:44:48 PM
#6
I am still wondering if it meets my needs. Can I send $10 every week to the locked wallet? Or it's just a one-time transaction?
Yes, absolutely. I've skimmed through the guide you linked and I can't see any major issues. It will create an address which you can send as many transaction as you like to, and none of the coins sent to that address can be redeemed until after the date or block height that you have chosen. The most important parts are to ensure you are downloading the legitimate versions of Electrum and Coinbin (i.e. download them from Github and verify their signatures), do the whole process on an offline (ideally permanently airgapped) device to protect your private keys, and to save the redeem script that you generate.

All you are using Electrum for here is generating a keypair to use in the Coinbin script. You could use any good piece of software, such as Bitcoin Core, to generate a keypair if you prefer.

I would also suggest that something like $50 a month is probably better than $10 a week, otherwise you will end up spending a large amount on transaction fees when you need to consolidate all your small inputs.

Edit: Seems not many people visit this section. I will write in a more crowded section.
For a technical question such as this, you are exponentially more likely to get useful replies rather than generic spam by posting in this board than by posting in a board such as Bitcoin Discussion.
hero member
Activity: 462
Merit: 767
#SWGT CERTIK Audited
March 16, 2023, 01:24:27 PM
#5
Sorry for replying in an old thread. I was looking for something like this (Not the same, but similar). I used to use Trust wallet and some centralized exchanges as a wallet. I always tried to hold Bitcoin. But, I ended up spending them on gambling websites or selling them to buy goods. So, I thought I would send a small amount of Bitcoin weekly (say $10/week). I won't spend them in the next five or eight years. The problem is, Whenever I need money, I sell my Bitcoins and regret it later. So, to get rid of it. I was thinking, Is it possible to create such a wallet where I won't have access to spend the money until a specific date? I searched for it, and I found How To Create Time-locked Transactions with Bitcoin. The author claims it's explained version of TryNinja's time-lock explanation on Bitcointalk, and he referred to this thread.

I had never used Electrum before. I downloaded Electrum and installed it. But, Even after reading the explained version. I am confused as hell. I am still wondering if it meets my needs. 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.

Edit: Seems not many people visit this section. I will write in a more crowded section.
legendary
Activity: 1792
Merit: 1283
November 17, 2017, 07:04:04 AM
#4
Thanks to both of you, using Coinbin it's fairly easy and I had apparently missed it on the Bitcoin wiki page about timestamps, so I'm glad I asked here.
I've downloaded the page on Coinbin and successfully created a short-term timelocked transaction to test things out.

I've read that it isn't too wise to lock transactions into the far future, is it really not advisable use OP_CHECKLOCKTIMEVERIFY for, say, 5 years?

Source: https://en.bitcoin.it/wiki/Timelock#Far-future_locks
legendary
Activity: 2758
Merit: 6830
November 16, 2017, 09:37:46 PM
#3
You can use Coinbin to do that. I had one a few months ago and it's quite easy to create/spend your coins after the chosen period.

To create the Time Locked Address:
1. Go to Coinb.in;
2. New -> Time Locked Address.
3. Enter your address public key (the one you require to sign the transaction and be able to spend the coins);
4. Enter the date-time or blockheight you want to release the coins.
5. Submit and save the Redeem Script (don't lose that or you won't be able to spend your coins in the future);
6. Send the coins you want to keep locked to the Address generated.

After the chosen period, you will be able to spend your coins.
1. Go to Coinb.in;
2. New -> Transaction;
3. Paste your Redeem Script and click Load (it's going to show every input available to be spent);
4. Paste the address you want to send the coins to at the "Address" field and the amount in the "Amount" field. The remaining funds will be used as fee. E.g: If your address has 0.015BTC, you can put 0.014BTC in the "Amount" field and the fee will be 0.001BTC (0.015 - 0.014);
5. Submit and copy the raw transaction;
6. Go to the "Sign" tab (at Coinb.in);
7. Paste the private key from the address you choose when creating the Time Locked Address.
8. Paste the raw transaction you just created.
9. Submit, copy the signed transaction and push it to the network (you can do it in the Broadcast tab).
10. Transaction sent!
staff
Activity: 3374
Merit: 6530
Just writing some code
November 16, 2017, 09:34:48 PM
#2
A transaction with a timelock means that the transaction itself cannot confirm before the timelock (either a block height or a timestamp). However a conflicting transaction (one that spends the same inputs) could be created and that transaction can still confirm.

In order to make coins that are unspendable until after a certain time or block height, you will need to create an address that uses OP_CHECKLOCKTIMEVERIFY. Only coins sent to such an address are guaranteed to be only spendable after a certain time.
legendary
Activity: 1792
Merit: 1283
November 16, 2017, 08:48:15 PM
#1
I've been looking for an easy way to create a transaction with a time lock, so it can't be spent before a certain date/block.
Is there currently a wallet that allows me to create such a transaction through a GUI?

Once the transaction is timelocked, it can't be spent in any other way right?

I've already read through a couple of tutorials and wikis but couldn't find a really straightforward way of creating such a transaction without having to resort to command line...
Jump to: