Author

Topic: Bitcoin core blockchain portability (Read 169 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
May 13, 2020, 01:14:42 AM
#10
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's typo, i meant P2WSH which basically P2SH with SegWit support. Example address from https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#examples

  • Mainnet P2WPKH: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
  • Mainnet P2WSH: bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3

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


It's a bit confusing since Electrum says "A few example" rather than "Supported WIF/address type"
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
May 13, 2020, 01: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
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
May 13, 2020, 12: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":
legendary
Activity: 2044
Merit: 1018
Not your keys, not your coins!
May 12, 2020, 09:59:20 PM
#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.
HCP
legendary
Activity: 2086
Merit: 4361
May 12, 2020, 08:07:14 PM
#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
legendary
Activity: 2044
Merit: 1018
Not your keys, not your coins!
May 12, 2020, 06: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.
legendary
Activity: 2380
Merit: 5213
May 12, 2020, 12: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.
legendary
Activity: 2044
Merit: 1018
Not your keys, not your coins!
May 12, 2020, 10:55:03 AM
#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.
legendary
Activity: 1134
Merit: 1598
May 11, 2020, 02:25:24 PM
#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\), 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\)
  • 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
0vx
newbie
Activity: 1
Merit: 1
May 11, 2020, 12:08:10 PM
#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
Jump to: