Bitcoin Forum
December 12, 2024, 09:52:13 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin core blockchain portability  (Read 169 times)
0vx (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 1


View Profile
May 11, 2020, 05:08:10 PM
Merited by o_e_l_e_o (1)
 #1

I have some questions about how useful having the blockchain stored with Bitcoin Core is (instead of pruning).

I have started downloading Bitcoin Core so I can open a wallet I made with it years ago.  I read that about ~280GB will need to be downloaded for Bitcoin core to sync up with the network.  I bought a new external hard drive for this, but as I am downloading (now at 25%), I notice the hard drive not filling up.  I looked through the options and realised it is due to pruning.

>If I did have the blockchain downloaded and I wanted to move my external hard drive (pruned/no blockchain) and plug it into another computer, could I still access the Bitcoin Core wallet? (Everything is on the external hdd including Bitcoin Core)
>If no, could I do that if I did have the blockchain downloaded onto the external hdd?
>And if I wanted to setup a new wallet on a new computer, could I just copy and paste the blockchain directory into the Bitcoin Core folder on the other computer?
>And then would I still need to download anything over say 50-100GB to sync that new wallet up?

I hope I won't have to start redownloading.  The option to prune should be on the screen that warns about the amount of data required when you run Bitcoin Core for the first time  Angry

Thanks for the help
20kevin20
Legendary
*
Offline Offline

Activity: 1134
Merit: 1599


View Profile
May 11, 2020, 07:25:24 PM
Last edit: May 11, 2020, 07:42:03 PM by 20kevin20
 #2

!! All information below is for Windows. If you're using another OS, let me know and I'll update the directories to the correct ones Smiley Please also backup your .dat files before making any changes in the blockchain data directories.

>If I did have the blockchain downloaded and I wanted to move my external hard drive (pruned/no blockchain) and plug it into another computer, could I still access the Bitcoin Core wallet? (Everything is on the external hdd including Bitcoin Core)
As long as you have the data directory files on the external disk and your Core wallet on the secondary computer is configured properly to use the data from it, yes - you could.

If you want to make use of the data from your external hard disk, all you have to do is plug in the external disk, launch the Core wallet on the secondary PC and set the external disk as your data directory.

As far as I know, you can set the data directory the following way:
  • If it's the first time you're starting Bitcoin Core, upon launch a window will pop up asking where you'd like to store the blockchain data. Set that manually to the external disk instead of the default folder
  • If it's not the first time you're starting the Core wallet, then you probably already have a ".config" file created. Go to the data directory folder of your Core wallet (the default is %appdata%\Roaming\<yourwalletname>), open the ".conf" file and edit the line "datadir=A:\Example\Path" to send the Core wallet to the correct path.



>If no, could I do that if I did have the blockchain downloaded onto the external hdd?
I think you just said above this question that you had the data already downloaded on the external HDD? Grin



>And if I wanted to setup a new wallet on a new computer, could I just copy and paste the blockchain directory into the Bitcoin Core folder on the other computer?
You can either:
  • Plug the external HDD with the existing blockchain data on it into another computer
  • Open a Bitcoin Core wallet executable file on the computer and upon the first-start window manually select the external HDD
or
  • Plug the external HDD with the existing blockchain data on it into the secondary computer
  • From your external HDD, copy all the data directory files except the ".conf" file (if you have one)
  • Paste the files into the directory you'd like to store them on the secondary computer (default directory is %appdata%\Roaming\<yourwalletname>)
  • Plug out the external HDD and set the copied directory as the data directory by following the answer of the first question



>And then would I still need to download anything over say 50-100GB to sync that new wallet up?
As long as the files you have in the data directory are up-to-date, no. But if you're missing 50GB of data, affirmative - it'll need to download that much as it obviously needs to keep up with the network or your transaction history and account balance would otherwise not be accurate, real-time. Smiley
hd49728
Legendary
*
Offline Offline

Activity: 2310
Merit: 1139



View Profile
May 12, 2020, 03:55:03 PM
 #3

I have a question, that sounds stupid.

I opened my bitcoin core, get a receiving address (Segwit, starts with bc1), then use it with the command in console "dumpprivkey theSegwitaddress", then I get the private key. Next, I used that private key to import with Electrum. What I received is a bitcoin address, starts with 1. How it can happened?

I believe the receiving address in Bitcoin Core or in Electrum should start with bc1.

▄▄███████████████████▄▄
▄███████████████████████▄
████████▀░░░░░░░▀████████
███████░░░░░░░░░░░███████
███████░░░░░░░░░░░███████
██████▀░░░░░░░░░░░▀██████
██████▄░░░░░▄███▄░▄██████
██████████▀▀█████████████
████▀▄██▀░░░░▀▀▀░▀██▄▀███
███░░▀░░░░░░░░░░░░░▀░░███
████▄▄░░░░▄███▄░░░░▄▄████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 CHIPS.GG 
▄▄███████▄▄
▄████▀▀▀▀▀▀▀████▄
███▀░▄░▀▀▀▀▀░▄░▀███
▄███
░▄▀░░░░░░░░░▀▄░███▄
▄███░▄░░░▄█████▄░░░▄░███▄
███░▄▀░░░███████░░░▀▄░███
███░█░░░▀▀▀▀▀░░░▀░░░█░███
███░▀▄░▄▀░▄██▄▄░▀▄░▄▀░██
▀███
░▀░▀▄██▀░▀██▄▀░▀░██▀
▀███
░▀▄░░░░░░░░░▄▀░██▀
▀███▄
░▀░▄▄▄▄▄░▀░▄███▀
▀█
███▄▄▄▄▄▄▄████▀
█████████████████████████
▄▄███████▄▄
███
████████████▄
▄█▀▀▀▄
█████████▄▀▀▀█▄
▄██████▀▄▄▄▄▄▀██████▄
▄█████████████▄████████▄
████████▄███████▄████████
█████▄█████████▄██████
██▄▄▀▀▀▀█████▀▀▀▀▄▄██
▀█████████▀▀███████████▀
▀███████████████████▀
██████████████████
▀████▄███▄▄
████▀
████████████████████████
3000+
UNIQUE
GAMES
|
12+
CURRENCIES
ACCEPTED
|
VIP
REWARD
PROGRAM
 
 
  Play Now  
hosseinimr93
Legendary
*
Offline Offline

Activity: 2618
Merit: 5736



View Profile
May 12, 2020, 05:20:29 PM
 #4

I have a question, that sounds stupid.

I opened my bitcoin core, get a receiving address (Segwit, starts with bc1), then use it with the command in console "dumpprivkey theSegwitaddress", then I get the private key. Next, I used that private key to import with Electrum. What I received is a bitcoin address, starts with 1. How it can happened?

I believe the receiving address in Bitcoin Core or in Electrum should start with bc1.

You must add p2wpkh: before your private key when importing it into electrum. Enter the private key as follows.

Code:
p2wpkh:[Your private key]

If you don't add p2wpkh: before your private key, a legacy address will be importd by default.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
hd49728
Legendary
*
Offline Offline

Activity: 2310
Merit: 1139



View Profile
May 12, 2020, 11:10:56 PM
 #5

Code:
p2wpkh:[Your private key]

If you don't add p2wpkh: before your private key, a legacy address will be importd by default.
Wow, it works. I did not know about the important part. p2wpkh before the privkey. Furthermore, from Bitcoin Core, I see I can only dumprivate key of one receiving address. It is different from Electrum wallet, when I can restore my wallet with seeds and all receiving addresses inside it will be restored. Or are there ways to import all addresses in my Bitcoin Core to Electrum wallet, please help.

▄▄███████████████████▄▄
▄███████████████████████▄
████████▀░░░░░░░▀████████
███████░░░░░░░░░░░███████
███████░░░░░░░░░░░███████
██████▀░░░░░░░░░░░▀██████
██████▄░░░░░▄███▄░▄██████
██████████▀▀█████████████
████▀▄██▀░░░░▀▀▀░▀██▄▀███
███░░▀░░░░░░░░░░░░░▀░░███
████▄▄░░░░▄███▄░░░░▄▄████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 CHIPS.GG 
▄▄███████▄▄
▄████▀▀▀▀▀▀▀████▄
███▀░▄░▀▀▀▀▀░▄░▀███
▄███
░▄▀░░░░░░░░░▀▄░███▄
▄███░▄░░░▄█████▄░░░▄░███▄
███░▄▀░░░███████░░░▀▄░███
███░█░░░▀▀▀▀▀░░░▀░░░█░███
███░▀▄░▄▀░▄██▄▄░▀▄░▄▀░██
▀███
░▀░▀▄██▀░▀██▄▀░▀░██▀
▀███
░▀▄░░░░░░░░░▄▀░██▀
▀███▄
░▀░▄▄▄▄▄░▀░▄███▀
▀█
███▄▄▄▄▄▄▄████▀
█████████████████████████
▄▄███████▄▄
███
████████████▄
▄█▀▀▀▄
█████████▄▀▀▀█▄
▄██████▀▄▄▄▄▄▀██████▄
▄█████████████▄████████▄
████████▄███████▄████████
█████▄█████████▄██████
██▄▄▀▀▀▀█████▀▀▀▀▄▄██
▀█████████▀▀███████████▀
▀███████████████████▀
██████████████████
▀████▄███▄▄
████▀
████████████████████████
3000+
UNIQUE
GAMES
|
12+
CURRENCIES
ACCEPTED
|
VIP
REWARD
PROGRAM
 
 
  Play Now  
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4363

<insert witty quote here>


View Profile
May 13, 2020, 01:07:14 AM
 #6

Bitcoin Core uses a "seed", but it does not use "seed mnemonics" like other wallets... However, if you use the dumpwallet command you should see all the private keys currently contained in your wallet.dat

You will need to do some manipulation on the text file, but you can then bulk import them into Electrum. NOTE: If you continue to use Bitcoin Core, and use more than the 1000 keys in the wallet file, any new keys generated by Bitcoin Core will NOT show up in Electrum!



The dumpfile also has an extended private masterkey, but unfortunately Electrum doesn't let you specify the derivation path for this, and Electrum doesn't seem to generate the correct addresses when you use this master key. Undecided

I believe this is because Bitcoin Core uses "hardened" addresses and Electrum does not.

For the record, the derivation path in Bitcoin Core is m/0'/0' (for receive) and m/0'/1' (for change) and the addresses are "hardened"... so the first addresses are m/0'/0'/0' and m/0'/1'/0' (for receive and change, respectively).

Whereas Electrum will use: m/0 (for receive) and m/1 (for change)... with the addresses being: m/0/0 and m/1/0

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
hd49728
Legendary
*
Offline Offline

Activity: 2310
Merit: 1139



View Profile
May 13, 2020, 02:59:20 AM
 #7

Bitcoin Core uses a "seed", but it does not use "seed mnemonics" like other wallets... However, if you use the dumpwallet command you should see all the private keys currently contained in your wallet.dat

You will need to do some manipulation on the text file, but you can then bulk import them into Electrum. NOTE: If you continue to use Bitcoin Core, and use more than the 1000 keys in the wallet file, any new keys generated by Bitcoin Core will NOT show up in Electrum!
Appreciated your time to make that post and help me. I see dumpwallet command in console of Bitcoin Core but not understand how it works and you help me. I have not yet used many keys in Bitcoin Core, so it will work with Electrum for my case.
Quote
The dumpfile also has an extended private masterkey, but unfortunately Electrum doesn't let you specify the derivation path for this, and Electrum doesn't seem to generate the correct addresses when you use this master key. Undecided

I believe this is because Bitcoin Core uses "hardened" addresses and Electrum does not.

For the record, the derivation path in Bitcoin Core is m/0'/0' (for receive) and m/0'/1' (for change) and the addresses are "hardened"... so the first addresses are m/0'/0'/0' and m/0'/1'/0' (for receive and change, respectively).

Whereas Electrum will use: m/0 (for receive) and m/1 (for change)... with the addresses being: m/0/0 and m/1/0
The rest part is too complicated but you explained in details but I have to make deep-learning after reading your posts. Thanks again.

▄▄███████████████████▄▄
▄███████████████████████▄
████████▀░░░░░░░▀████████
███████░░░░░░░░░░░███████
███████░░░░░░░░░░░███████
██████▀░░░░░░░░░░░▀██████
██████▄░░░░░▄███▄░▄██████
██████████▀▀█████████████
████▀▄██▀░░░░▀▀▀░▀██▄▀███
███░░▀░░░░░░░░░░░░░▀░░███
████▄▄░░░░▄███▄░░░░▄▄████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 CHIPS.GG 
▄▄███████▄▄
▄████▀▀▀▀▀▀▀████▄
███▀░▄░▀▀▀▀▀░▄░▀███
▄███
░▄▀░░░░░░░░░▀▄░███▄
▄███░▄░░░▄█████▄░░░▄░███▄
███░▄▀░░░███████░░░▀▄░███
███░█░░░▀▀▀▀▀░░░▀░░░█░███
███░▀▄░▄▀░▄██▄▄░▀▄░▄▀░██
▀███
░▀░▀▄██▀░▀██▄▀░▀░██▀
▀███
░▀▄░░░░░░░░░▄▀░██▀
▀███▄
░▀░▄▄▄▄▄░▀░▄███▀
▀█
███▄▄▄▄▄▄▄████▀
█████████████████████████
▄▄███████▄▄
███
████████████▄
▄█▀▀▀▄
█████████▄▀▀▀█▄
▄██████▀▄▄▄▄▄▀██████▄
▄█████████████▄████████▄
████████▄███████▄████████
█████▄█████████▄██████
██▄▄▀▀▀▀█████▀▀▀▀▄▄██
▀█████████▀▀███████████▀
▀███████████████████▀
██████████████████
▀████▄███▄▄
████▀
████████████████████████
3000+
UNIQUE
GAMES
|
12+
CURRENCIES
ACCEPTED
|
VIP
REWARD
PROGRAM
 
 
  Play Now  
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6510


Self-proclaimed Genius


View Profile
May 13, 2020, 05:58:54 AM
 #8

p2wpkh & p2sh also exist, but usually rarely used and i don't know if Electrum support it.
Typo: P2WPSH? Bec it's the same as the one you written above it.
It supports those types if you create a new wallet using the right wallet type, but not individually through 'import private key'.

The only supported types for "imported wallet" or sweep/import private key are the ones listed when you click "info":

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6510


Self-proclaimed Genius


View Profile
May 13, 2020, 06:45:58 AM
 #9

It's a bit confusing since Electrum says "A few example" rather than "Supported WIF/address type"
Yeah, sounds confusing to me too, it's like they're saying that there's more.
But AFAIK, Electrum currently doesn't support importing individual P2SH-multisig and P2WSH addresses through import private key(s)/Public key(s)/Redeem Script.

Here's a reference 'open' issue/feature request: 5535

█▀▀▀











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











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

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