takuma sato (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 03, 2024, 02:28:54 AM |
|
Im looking for a tutorial that explains step by step how to do a setup with 2 Bitcoin Core. One in an airgapped laptop that always remains offline and has the wallet.dat with the private keys, another laptop that is online and has a watch-only wallet. The wallet is from Bitcoin v0.8.0 era, so it may require that the wallet file is also updated? Please provide details.
The tutorial has to explain how to set it up and how to do transactions safely using Coin Control. OS is Debian. Finally, some extra privacy, explain how to run it through a VPN or Tor. This should cover it all.
If anyone has a video or at least written format please let me know.
|
|
|
|
Churchillvv
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 03, 2024, 03:10:44 AM |
|
Sincerely I don't think there is any tutorial that exist with such description you've made, except you have to write them yourself after succeeding with this one. I did a quick search to see if there exist a YouTube tutorial but I couldn't find one but here I found a post on Reddit[1] that has to be related but the truth is it has not enough details has you desired but I believe it could be a ground for your research. I also think nc50lc could have a knowledge about this maybe if I mention him and he has solution then he would provide them manually because I believe there is no tutorial or written down format for it. [1] https://www.reddit.com/r/Bitcoin/comments/oirfm8/offline_node_online_node_how_to_receive_and_send/?sort=new
|
| | | | | | FIRST NO WAGERING BONUS CASINO & SPORTSBOOK SLOTS │ LIVE CASINO │ LIVE GAMES │ SPORTS | | | ► | WELCOME BONUS ─── UP TO ─── [ $500 ] | | ► | MULTI BET BONUS ─── UP TO ─── [ 200% ] | █████████████▄██▄ ████████████▐█████ ███▄██▄█████▐██████▄ ████████▄▄██████████▄ ███▐██▀██▀███████████ ██████████████████████▄ ███▐▄█████▄████████████▄ ▄▀▀███████████▄███████░█▌ ▀███████████████████████ ░███████████████████████ ░░▀▀▀▄██▄███████████████▄ ░░████▀█▀█████████████████▄▄ ██████▀███████████████████████▄ | [ | PLAY NOW | ] |
|
|
|
tbct_mt2
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 03, 2024, 03:27:35 AM |
|
Im looking for a tutorial that explains step by step how to do a setup with 2 Bitcoin Core. One in an airgapped laptop that always remains offline and has the wallet.dat with the private keys, another laptop that is online and has a watch-only wallet.
You can get a public key, and import it to create a watch only wallet. If you only have a private key, import it first, then extract the public address and use that address to import a Watch only wallet. With a Watch-only wallet, you can not spend your bitcoins. Use commands importaddress importpubkey
The wallet is from Bitcoin v0.8.0 era, so it may require that the wallet file is also updated? Please provide details.
It is an very old version of Bitcoin Core and not recommended to use it nowadays. Satoshi Nakamoto was responsible for releases of Bitcoin Core v 0.1 till v 0.3.18 (links from Satoshi topics[/url]). v 0.3.18v 0.3.17v 0.3.15v 0.3.14v 0.3.13v 0.3.12v 0.3.11v 0.3.10v 0.3.9 rc1v 0.3.8.1v 0.3.8v 0.3.6v 0.3.3v 0.3.2.5v 0.3.2v 0.3.1v 0.3v 0.2From Bitcoin Core v 0.11.0, it's available there https://bitcoincore.org/en/releases/Bitcoin Core 26.0 Bitcoin Core 25.1 Bitcoin Core 25.0 Bitcoin Core 24.2 Bitcoin Core 24.1 Bitcoin Core 24.0.1 Bitcoin Core 23.2 Bitcoin Core 23.1 Bitcoin Core 23.0 Bitcoin Core 22.1 Bitcoin Core 22.0 Bitcoin Core 0.21.2 Bitcoin Core 0.21.1 Bitcoin Core 0.21.0 Bitcoin Core 0.20.2 Bitcoin Core 0.20.1 Bitcoin Core 0.20.0 Bitcoin Core 0.19.1 Bitcoin Core 0.19.0.1 Bitcoin Core 0.18.1 Bitcoin Core 0.18.0 Bitcoin Core 0.17.1 Bitcoin Core 0.17.0.1 Bitcoin Core 0.17.0 Bitcoin Core 0.16.3 Bitcoin Core 0.16.2 Bitcoin Core 0.16.1 Bitcoin Core 0.16.0 Bitcoin Core 0.15.2 Bitcoin Core 0.15.1 Bitcoin Core 0.15.0.1 Bitcoin Core 0.15.0 Bitcoin Core 0.14.3 Bitcoin Core 0.14.2 Bitcoin Core 0.14.1 Bitcoin Core 0.14.0 Bitcoin Core 0.13.2 Bitcoin Core 0.13.1 Bitcoin Core 0.13.0 Bitcoin Core 0.12.1 Bitcoin Core 0.12.0 Bitcoin Core 0.11.2 Bitcoin Core 0.11.1 Bitcoin Core 0.11.0
|
|
|
|
takuma sato (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 03, 2024, 04:26:04 AM |
|
Im looking for a tutorial that explains step by step how to do a setup with 2 Bitcoin Core. One in an airgapped laptop that always remains offline and has the wallet.dat with the private keys, another laptop that is online and has a watch-only wallet.
You can get a public key, and import it to create a watch only wallet. If you only have a private key, import it first, then extract the public address and use that address to import a Watch only wallet. With a Watch-only wallet, you can not spend your bitcoins. Use commands importaddress importpubkey
The wallet is from Bitcoin v0.8.0 era, so it may require that the wallet file is also updated? Please provide details.
It is an very old version of Bitcoin Core and not recommended to use it nowadays. Satoshi Nakamoto was responsible for releases of Bitcoin Core v 0.1 till v 0.3.18 (links from Satoshi topics[/url]). v 0.3.18v 0.3.17v 0.3.15v 0.3.14v 0.3.13v 0.3.12v 0.3.11v 0.3.10v 0.3.9 rc1v 0.3.8.1v 0.3.8v 0.3.6v 0.3.3v 0.3.2.5v 0.3.2v 0.3.1v 0.3v 0.2From Bitcoin Core v 0.11.0, it's available there https://bitcoincore.org/en/releases/Bitcoin Core 26.0 Bitcoin Core 25.1 Bitcoin Core 25.0 Bitcoin Core 24.2 Bitcoin Core 24.1 Bitcoin Core 24.0.1 Bitcoin Core 23.2 Bitcoin Core 23.1 Bitcoin Core 23.0 Bitcoin Core 22.1 Bitcoin Core 22.0 Bitcoin Core 0.21.2 Bitcoin Core 0.21.1 Bitcoin Core 0.21.0 Bitcoin Core 0.20.2 Bitcoin Core 0.20.1 Bitcoin Core 0.20.0 Bitcoin Core 0.19.1 Bitcoin Core 0.19.0.1 Bitcoin Core 0.18.1 Bitcoin Core 0.18.0 Bitcoin Core 0.17.1 Bitcoin Core 0.17.0.1 Bitcoin Core 0.17.0 Bitcoin Core 0.16.3 Bitcoin Core 0.16.2 Bitcoin Core 0.16.1 Bitcoin Core 0.16.0 Bitcoin Core 0.15.2 Bitcoin Core 0.15.1 Bitcoin Core 0.15.0.1 Bitcoin Core 0.15.0 Bitcoin Core 0.14.3 Bitcoin Core 0.14.2 Bitcoin Core 0.14.1 Bitcoin Core 0.14.0 Bitcoin Core 0.13.2 Bitcoin Core 0.13.1 Bitcoin Core 0.13.0 Bitcoin Core 0.12.1 Bitcoin Core 0.12.0 Bitcoin Core 0.11.2 Bitcoin Core 0.11.1 Bitcoin Core 0.11.0
The wallet contains several addresses, like 100, with annotations that describe the transaction. As far as I know there is a system in place now (PSBT) that works to make this process of offline signing and watch only stuff faster and safer than screwing around with importing keys. But I would really need a step by step tutorial to not get anything wrong. Also the wallet was from around 0.8.0 era, however newer versions were used, around 0.15. So now it would be going from there to the latest version. I reckon the wallet needs to be converted to a new format or something. I would first make a backup. I would really like to get the whole thing explained within the same post to not have different bits of information all over the place so I can follow it properly. I need to learn to: 1) Get the old wallet from around version 0.15 opened properly running within the new version on the offline laptop 2) Get this a watch only version of this wallet safely running on the online laptop and making sure it does not contain any private keys 3) Sign a transaction selecting the desired utxos on Coin Control on the offline laptop which as far as I know it is now done with the psbt file 4) Send this file into the online watch only wallet and broadcast the contents of the psbt file so the transaction can be sent 5) Do this whole thing with reasonable privacy (using Tor or VPN) 6) Anything else useful I should need If anyone has the time please provide these instructions. I will be testing with testnet coins first. Any help is appreciated.
|
|
|
|
ABCbits
Legendary
Offline
Activity: 2996
Merit: 7857
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 03, 2024, 08:42:48 AM |
|
I agree with @Churchillvv that such specific tutorial probably isn't exist. Im looking for a tutorial that explains step by step how to do a setup with 2 Bitcoin Core. One in an airgapped laptop that always remains offline and has the wallet.dat with the private keys, another laptop that is online and has a watch-only wallet. The wallet is from Bitcoin v0.8.0 era, so it may require that the wallet file is also updated? Please provide details.
Since Bitcoin-qt 0.8.0, it creates wallet file using BDB (Berkeley DB) environment[1] which will supported until Bitcoin Core 28.0[2]. I'm not 100% sure, but i expect you can open that wallet file on latest version of Bitcoin Core without any problem. If you want to perform conversion to new format, Bitcoin Core already provide that feature under migratewallet RPC call. [1] https://bitcoindev.network/understanding-the-data/[2] https://github.com/bitcoin/bitcoin/issues/20160
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2534
Merit: 6070
Self-proclaimed Genius
|
The wallet contains several addresses, like 100, with annotations that describe the transaction. As far as I know there is a system in place now (PSBT) that works to make this process of offline signing and watch only stuff faster and safer than screwing around with importing keys. But I would really need a step by step tutorial to not get anything wrong. Also the wallet was from around 0.8.0 era, however newer versions were used, around 0.15. So now it would be going from there to the latest version.
I reckon the wallet needs to be converted to a new format or something. I would first make a backup. I would really like to get the whole thing explained within the same post to not have different bits of information all over the place so I can follow it properly. The thing is, if you haven't set an HD seed to your wallet in versions >0.13, the wallet remains non-HD even after using v0.15. This isn't recommended to use since newer keys beyond the keypool that it will create cannot be re-created in the online machine ( vice versa) since those aren't generated from an HD seed. Migrating it into a " descriptor wallet" will work but there'll be hundreds of single key descriptors since those aren't linked with each other, there'll also be newly generated HD ranged descriptors of each script type for receiving and change. Creating a watching-only wallet based from those ranged descriptors should be easy but including the single key descriptors would be troublesome ( but doable). If you want to proceed ( you'll have to, if you want to use future Bitcoin Core versions): The first step is to migrate it into a descriptor wallet using the command migratewallet: - Close Bitcoin Core and update it to the latest version, make a backup of your wallet file.
- Start Bitcoin Core and go to "Window->Console", select your wallet in console's drop-down menu if you have more than one wallet.
- Enter the command migratewallet and wait for [executing] to finish, it'll be replaced with "wallet name and backup path" once it's done.
This process will take a few minutes since there'll be hundreds of descriptors to create. - After that, the wallet is now an HD descriptor wallet and you can proceed to create the watching-only wallet in the online machine.
For the Setup of watching-only wallet and PSBT workflow, follow this guide by TracaChang: https://bitcointalk.org/index.php?topic=5392824.0 ( already in step-by-step format) Notes: Start from " listdescriptor" step in the offline wallet since you already have a wallet, and you'd have to import all ( now) 8 parent descriptors if you want to be able to use all 4 available address types. You should also import the single key descriptor(s) of the funded address(es) to be able to update your balance: - If you already have a funded address list, get each address' descriptor from the offline wallet with: getaddressinfo <address>
- The "desc:" should look like this: pkh([01234567]041dd9c5ae0921....e79ed5039c56f94a641aa9)#1111zzzz
- Import all of those to the online watching-only wallet using importdescriptors command in this format:
importdescriptors "[{\"desc\": \"descriptor_1\", \"timestamp\": \"0\"},{\"desc\": \"descriptor_2\", \"timestamp\": \"0\"},{\"desc\": \"descriptor_3\", \"timestamp\": \"0\"}]" Each descriptor is separated by a comma. example (importing two descriptors):
importdescriptors "[{\"desc\": \"pkh([01234567]031dd9c5ae0921....e79ed5039c56f94a641aa9)#1111zzzz\", \"timestamp\": \"0\"},{\"desc\": \"pkh([01234567]031dd9c6....6f94a642)#2222yyyy\", \"timestamp\": \"0\"}]" Now the fun part, if you have/want to import all those 100 single address descriptors, you'll have to import them using the instructions above. So instead of just the funded ones, get all the descriptors from the offline wallet's listdescriptors command and import them to the watching-only wallet. The ranged descriptors still require the range, active, internal, etc. to be specified ( refer to the instructions in the link). But honestly, it would be simpler if you just create a new air-gap setup using the instructions in the link instead and send all your bitcoins there. Finally, some extra privacy, explain how to run it through a VPN or Tor. This should cover it all.
I'll leave this to others.
|
|
|
|
Cricktor
Legendary
Offline
Activity: 882
Merit: 1281
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 03, 2024, 10:21:44 AM |
|
You should also import the single key descriptor(s) of the funded address(es) to be able to update your balance: - If you already have a funded address list, get each address' descriptor from the offline wallet with: getaddressinfo <address>
- The "desc:" should look like this: pkh([01234567]041dd9c5ae0921....e79ed5039c56f94a641aa9)#1111zzzz
- Import all of those to the online watching-only wallet using importdescriptors command in this format:
importdescriptors "[{\"desc\": \"descriptor_1\", \"timestamp\": \"0\"},{\"desc\": \"descriptor_2\", \"timestamp\": \"0\"},{\"desc\": \"descriptor_3\", \"timestamp\": \"0\"}]" Each descriptor is separated by a comma. example (importing two descriptors):
importdescriptors "[{\"desc\": \"pkh([01234567]031dd9c5ae0921....e79ed5039c56f94a641aa9)#1111zzzz\", \"timestamp\": \"0\"},{\"desc\": \"pkh([01234567]031dd9c6....6f94a642)#2222yyyy\", \"timestamp\": \"0\"}]" I haven't done this yet manually with a legacy wallet. For the watch-only wallet it's of course important to import only the pubkey descriptors! Do not move your private key descriptors from your offline wallet and machine! A pubkey descriptor is Hex encoded public keys (either 66 characters starting with 02 or 03 for a compressed pubkey, or 130 characters starting with 04 for an uncompressed pubkey)
Wouldn't it be more versatile for the watch-only wallet to import combo(pubkey) descriptors? combo() descriptors match any address type (except taproot). getaddressinfo <address> gives you also the pubkey. To use it as a combo() descriptor like combo(04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f)#gvgcz9wt you would need to feed combo(...) into getdescriptorinfo to get the descriptor's checksum ( #gvgcz9wt in above example).
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2534
Merit: 6070
Self-proclaimed Genius
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 04, 2024, 08:31:02 AM |
|
I haven't done this yet manually with a legacy wallet. For the watch-only wallet it's of course important to import only the pubkey descriptors! Do not move your private key descriptors from your offline wallet and machine! It's a step to be followed after he " migrate" his wallet into a descriptor wallet but it will work in offline legacy wallet paired with watching-only descriptor wallet. For the private key concern, getaddressinfo or listdescriptor ( descriptor wallet only) wont output the descriptor with private key, the latter requires additional positional argument for it. But given that it will be depreciated soon, I can't recommend him to keep using the old wallet format. Wouldn't it be more versatile for the watch-only wallet to import combo(pubkey) descriptors? combo() descriptors match any address type (except taproot). It's not a bad idea when pairing it with an offline legacy wallet since it defaults different script types, the watching-only descriptor wallet wont derive bech32m that the legacy wallet doesn't support. For descriptor wallets, it depends on what will appear in listdescriptors command ( in the next paragraph if he want to re-use those). But point in importing those non-ranged descriptors to the online watching-only wallet is to be able to use the remaining coins, So only the necessary script type so that the transactions will update, new addresses will be derived from the newly added ranged descriptors.
|
|
|
|
tiffy
Jr. Member
Offline
Activity: 42
Merit: 48
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 04, 2024, 06:17:13 PM Last edit: March 04, 2024, 08:10:38 PM by tiffy |
|
Now the fun part, if you have/want to import all those 100 single address descriptors, you'll have to import them using the instructions above. So instead of just the funded ones, get all the descriptors from the offline wallet's listdescriptors command and import them to the watching-only wallet. The ranged descriptors still require the range, active, internal, etc. to be specified (refer to the instructions in the link).
What about wallets that have very few addresses with balances? If you create an empty watch wallet in which there is only a single address/descriptor and you create a transaction that does not fully spend the bitcoins on the address, where does the exchange go? Finally, some extra privacy, explain how to run it through a VPN or Tor. This should cover it all.
I'll leave this to others. I had posted something here: https://bitcointalk.org/index.php?topic=5485846.msg63753896#msg63753896However, I use a total of three devices. A server with Tor at a hoster. A laptop at home that connects to the server directly via SSH. And my offline device (not the subject of my little guide). Also I use Bitcoind.
|
|
|
|
Cricktor
Legendary
Offline
Activity: 882
Merit: 1281
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 04, 2024, 09:23:36 PM |
|
If you create an empty watch wallet in which there is only a single address/descriptor and you create a transaction that does not fully spend the bitcoins on the address, where does the exchange go?
A smart wallet will send the excess change coins back to the single available address in the wallet, which results in address re-use but that's better than losing the change coins as transaction fee. I have tested this once with Electrum because I was curious what would happen. Thanks to Testnet coins, there was no real risk involved. Can't tell how other wallets behave as I've only made a test with Electrum so far. I would also only use a wallet that clearly shows me all details of a transaction before signing and broadcasting it.
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2534
Merit: 6070
Self-proclaimed Genius
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2024, 07:11:47 AM |
|
Now the fun part, if you have/want to import all those 100 single address descriptors, you'll have to import them using the instructions above. So instead of just the funded ones, get all the descriptors from the offline wallet's listdescriptors command and import them to the watching-only wallet. The ranged descriptors still require the range, active, internal, etc. to be specified (refer to the instructions in the link).
What about wallets that have very few addresses with balances? If you create an empty watch wallet in which there is only a single address/descriptor and you create a transaction that does not fully spend the bitcoins on the address, where does the exchange go? To your change address of the default/preferred script type. After migrating to descriptor wallet, it will automatically be HD, aside from the single address, it now contains descriptors of each script types for both change and receiving addresses. In case the first step to migrate to descriptor wallet isn't followed, and only a single address is available: Bitcoin Core won't let you proceed to create the ( unsigned) transaction for having no available change, If you want to proceed, you'll have to manually set it by enabling " Coin control features" in the GUI's settings to display " Use custom change address" in the send tab. Once ticked, you can paste any address that you own to receive the change. In the command line, the transaction has to be manually created.
|
|
|
|
tiffy
Jr. Member
Offline
Activity: 42
Merit: 48
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2024, 07:59:52 PM |
|
In case the first step to migrate to descriptor wallet isn't followed, and only a single address is available: Bitcoin Core won't let you proceed to create the (unsigned) transaction for having no available change,
Does this mean that you can also create unsigned transactions with the GUI client? If you want to proceed, you'll have to manually set it by enabling "Coin control features" in the GUI's settings to display "Use custom change address" in the send tab. Once ticked, you can paste any address that you own to receive the change. In the command line, the transaction has to be manually created.
To be on the safe side, I could perhaps import a handful of the empty addresses in addition to the one or two addresses with a balance and then transfer the balances to new bc1 addresses ? Maybe making a separate transaction for each utxo to a new bc1 address in the new wallet to have relatively easy-to-read transactions. If you set the transfer amount slightly below the balance of the utxo, then that is automatically the fee right?
|
|
|
|
BlackHatCoiner
Legendary
Offline
Activity: 1638
Merit: 8101
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 05, 2024, 09:16:41 PM |
|
Does this mean that you can also create unsigned transactions with the GUI client? You certainly can, but you'll probably have to use the console, unless there exists a GUI setting I'm unaware of. However, if the wallet is watch-only, you can copy the PSBT to clipboard according to this SE post: https://bitcoin.stackexchange.com/a/99112/134811. Maybe making a separate transaction for each utxo to a new bc1 address in the new wallet to have relatively easy-to-read transactions. What's the problem with doing what nc50lc says? You're risking losing more money in fees. If you set the transfer amount slightly below the balance of the utxo, then that is automatically the fee right? Right.
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2534
Merit: 6070
Self-proclaimed Genius
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 06, 2024, 06:48:28 AM |
|
Bitcoin Core won't let you proceed to create the (unsigned) transaction for having no available change,
Does this mean that you can also create unsigned transactions with the GUI client? Yes, If your wallet is a watching-only descriptor wallet, the " Send" button in the send tab will be replaced with " Create Unsigned". The wallet is considered " watching-only" if it's created with " disable_private_keys" arg or checkbox. Then you can only import descriptors with extended pubKey/pubKey into it.
|
|
|
|
tiffy
Jr. Member
Offline
Activity: 42
Merit: 48
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 06, 2024, 09:14:52 PM |
|
[Yes, If your wallet is a watching-only descriptor wallet, the "Send" button in the send tab will be replaced with "Create Unsigned".
The wallet is considered "watching-only" if it's created with "disable_private_keys" arg or checkbox. Then you can only import descriptors with extended pubKey/pubKey into it.
A very valuable tip. I will definitely look into the GUI client next. I assume I can use the same data directory as for the Bitcoind? Can the GUI client hide behind a full node like the Bitcoind? Could the GUI Client be configured like this? connect=FULL_NODE_ADDRESS discover=0 dns=0 dnsseed=0 listen=0
See: https://bitcointalk.org/index.php?topic=5485846.msg63753896#msg63753896
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2534
Merit: 6070
Self-proclaimed Genius
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 07, 2024, 06:45:57 AM |
|
Can the GUI client hide behind a full node like the Bitcoind?
Everything bitcoind can do, the GUI can, since it is basically a daemon and GUI client in one package. You can even use your current " bitcoin.conf" for bitcoind in the GUI as long as it's pointed to the correct path. For example: If you're using bitcoind without an arg to change the datadir but rely of the config file to set a custom datadir, then by setting the default datadir in bitcoin-qt will make it use the same config file in the default data directory and use the settings in it. In the same manner, if you've been using bitcoind with an arg to set the datadir instead of the bitcoin.conf file, set that datadir in the GUI. If you already set a custom datadir in Bitcoin-qt, you can use: bitcoin-qt --choosedatadir to set it. I assume I can use the same data directory as for the Bitcoind? Yes, as long as there's no conflicting settings. If you want use bitcoind and bitcoin-qt seamlessly with one datadir, wallets, etc. ( but only one running instance at a time), just minimize the config to one source. Preferably, your bitcoin.conf file.
|
|
|
|
tiffy
Jr. Member
Offline
Activity: 42
Merit: 48
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 07, 2024, 08:33:14 PM |
|
For example: If you're using bitcoind without an arg to change the datadir but rely of the config file to set a custom datadir, then by setting the default datadir in bitcoin-qt will make it use the same config file in the default data directory and use the settings in it. In the same manner, if you've been using bitcoind with an arg to set the datadir instead of the bitcoin.conf file, set that datadir in the GUI.
If you already set a custom datadir in Bitcoin-qt, you can use: bitcoin-qt --choosedatadir to set it.
Under Linux, I use the standard ".bitcoin" directory in the user's home directory. I have not changed the location of the directory at all. I start the bitcoind with the command: bitcoind -conf=<MY_PATH>/bitcoin.conf
Similarly, I would start the qt client using: bitcoin-qt -conf=<MY_PATH>/bitcoin.conf
If I have understood you correctly, the bitcoind is a headless "qt" client. If I accidentally start both at the same time, can this lead to data corruption?
|
|
|
|
takuma sato (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 08, 2024, 03:50:09 AM |
|
The wallet contains several addresses, like 100, with annotations that describe the transaction. As far as I know there is a system in place now (PSBT) that works to make this process of offline signing and watch only stuff faster and safer than screwing around with importing keys. But I would really need a step by step tutorial to not get anything wrong. Also the wallet was from around 0.8.0 era, however newer versions were used, around 0.15. So now it would be going from there to the latest version.
I reckon the wallet needs to be converted to a new format or something. I would first make a backup. I would really like to get the whole thing explained within the same post to not have different bits of information all over the place so I can follow it properly. The thing is, if you haven't set an HD seed to your wallet in versions >0.13, the wallet remains non-HD even after using v0.15. This isn't recommended to use since newer keys beyond the keypool that it will create cannot be re-created in the online machine ( vice versa) since those aren't generated from an HD seed. Migrating it into a " descriptor wallet" will work but there'll be hundreds of single key descriptors since those aren't linked with each other, there'll also be newly generated HD ranged descriptors of each script type for receiving and change. Creating a watching-only wallet based from those ranged descriptors should be easy but including the single key descriptors would be troublesome ( but doable). If you want to proceed ( you'll have to, if you want to use future Bitcoin Core versions): The first step is to migrate it into a descriptor wallet using the command migratewallet: - Close Bitcoin Core and update it to the latest version, make a backup of your wallet file.
- Start Bitcoin Core and go to "Window->Console", select your wallet in console's drop-down menu if you have more than one wallet.
- Enter the command migratewallet and wait for [executing] to finish, it'll be replaced with "wallet name and backup path" once it's done.
This process will take a few minutes since there'll be hundreds of descriptors to create. - After that, the wallet is now an HD descriptor wallet and you can proceed to create the watching-only wallet in the online machine.
For the Setup of watching-only wallet and PSBT workflow, follow this guide by TracaChang: https://bitcointalk.org/index.php?topic=5392824.0 ( already in step-by-step format) Notes: Start from " listdescriptor" step in the offline wallet since you already have a wallet, and you'd have to import all ( now) 8 parent descriptors if you want to be able to use all 4 available address types. You should also import the single key descriptor(s) of the funded address(es) to be able to update your balance: - If you already have a funded address list, get each address' descriptor from the offline wallet with: getaddressinfo <address>
- The "desc:" should look like this: pkh([01234567]041dd9c5ae0921....e79ed5039c56f94a641aa9)#1111zzzz
- Import all of those to the online watching-only wallet using importdescriptors command in this format:
importdescriptors "[{\"desc\": \"descriptor_1\", \"timestamp\": \"0\"},{\"desc\": \"descriptor_2\", \"timestamp\": \"0\"},{\"desc\": \"descriptor_3\", \"timestamp\": \"0\"}]" Each descriptor is separated by a comma. example (importing two descriptors):
importdescriptors "[{\"desc\": \"pkh([01234567]031dd9c5ae0921....e79ed5039c56f94a641aa9)#1111zzzz\", \"timestamp\": \"0\"},{\"desc\": \"pkh([01234567]031dd9c6....6f94a642)#2222yyyy\", \"timestamp\": \"0\"}]" Now the fun part, if you have/want to import all those 100 single address descriptors, you'll have to import them using the instructions above. So instead of just the funded ones, get all the descriptors from the offline wallet's listdescriptors command and import them to the watching-only wallet. The ranged descriptors still require the range, active, internal, etc. to be specified ( refer to the instructions in the link). But honestly, it would be simpler if you just create a new air-gap setup using the instructions in the link instead and send all your bitcoins there. Finally, some extra privacy, explain how to run it through a VPN or Tor. This should cover it all.
I'll leave this to others. Thanks for input. I will definitely need to study this and do testing with testnet wallet. I guess to do the whole thing properly, I will need to create a wallet from pre-HD era (what was the latest version before HD was introduced? 0.12 perhaps) and get some testnet coins there, so I can replicate the entire process safely without screwing up with actual keys. I don't even know what descriptors are. I remember reading on PSBT files. The idea was that you do the transaction, then it creates this PSBT file that is loaded on the watch-only wallet, and you simple open this file there and you can broadcast the transaction without screwing up with the console by manually inputing raw transactions isn't it? I get this, but I need to read up on descriptors etc. Addresses are also mostly legacy addresses, is this relevant? Someone mentioned making a new wallet and sending the coins there, I will not do that, so I need to do this with existing addresses. So im going to need 1) The last version with non-HD wallet to create the wallet and get testnet coins there (unless there is a way to generate an old school wallet in the latest version) 2) Get the testnet coins in different addresses 3) Do the whole migration of the wallet into the new format and descriptions thing which right now is a mess that I have to study to see what's really going on during the process 4) Make some PSBT file and broadcast this in the other laptop on testnet This is going to take some days since I have to sync the blockchain again for the watch-only laptop will report with results once I get the stuff setup.
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2534
Merit: 6070
Self-proclaimed Genius
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 08, 2024, 06:55:00 AM |
|
Under Linux, I use the standard ".bitcoin" directory in the user's home directory. I have not changed the location of the directory at all. I start the bitcoind with the command: That should do. If I accidentally start both at the same time, can this lead to data corruption?
The one started last wont be able to use the data directory and will not proceed to start. I will definitely need to study this and do testing with testnet wallet. I guess to do the whole thing properly, I will need to create a wallet from pre-HD era (what was the latest version before HD was introduced? 0.12 perhaps) and get some testnet coins there, so I can replicate the entire process safely without screwing up with actual keys.
You can create a copy of your current wallet.dat, load it as another wallet then do the instructions with it. Using migratewallet also automatically creates a backup of the original wallet.dat. But yeah, it wouldn't hurt to test it in TestNet, you can even go for " RegTest" so you wont have to sync if you do not have a TestNet setup. You're right, you can use v0.12.1 to create non-HD wallet.
|
|
|
|
takuma sato (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 24, 2024, 09:57:50 PM |
|
Under Linux, I use the standard ".bitcoin" directory in the user's home directory. I have not changed the location of the directory at all. I start the bitcoind with the command: That should do. If I accidentally start both at the same time, can this lead to data corruption?
The one started last wont be able to use the data directory and will not proceed to start. I will definitely need to study this and do testing with testnet wallet. I guess to do the whole thing properly, I will need to create a wallet from pre-HD era (what was the latest version before HD was introduced? 0.12 perhaps) and get some testnet coins there, so I can replicate the entire process safely without screwing up with actual keys.
You can create a copy of your current wallet.dat, load it as another wallet then do the instructions with it. Using migratewallet also automatically creates a backup of the original wallet.dat. But yeah, it wouldn't hurt to test it in TestNet, you can even go for " RegTest" so you wont have to sync if you do not have a TestNet setup. You're right, you can use v0.12.1 to create non-HD wallet. Hi, im downloading debian and im going to be installing the OS first, then compile Bitcoin Core from the source. Just to be clear, there is no way to create a 0.12 era (non HD) wallet on the latest version? because then I will have to start building 0.12. Once I build 0.12 and its installed and I get the wallet, do I compile the latest version and install on top of this existing folder isn't it? so I would need to be sure to get the wallet to test properly. Im gonna get some coins from testnet and test the migration with testnet wallet, im assuming it just works the same when you do it with the real wallet.
|
|
|
|
|