Bitcoin Forum
May 11, 2024, 09:20:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do I import privkeys if my blockchain is pruned?  (Read 120 times)
ArthurY (OP)
Sr. Member
****
Offline Offline

Activity: 840
Merit: 254


I love BTC


View Profile
May 06, 2021, 05:22:56 PM
Merited by Jet Cash (2)
 #1

What should I do if I need import a new private keys in my new wallet but my blockchain is pruned?



Sophisticated Investor
1715419213
Hero Member
*
Offline Offline

Posts: 1715419213

View Profile Personal Message (Offline)

Ignore
1715419213
Reply with quote  #2

1715419213
Report to moderator
1715419213
Hero Member
*
Offline Offline

Posts: 1715419213

View Profile Personal Message (Offline)

Ignore
1715419213
Reply with quote  #2

1715419213
Report to moderator
1715419213
Hero Member
*
Offline Offline

Posts: 1715419213

View Profile Personal Message (Offline)

Ignore
1715419213
Reply with quote  #2

1715419213
Report to moderator
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715419213
Hero Member
*
Offline Offline

Posts: 1715419213

View Profile Personal Message (Offline)

Ignore
1715419213
Reply with quote  #2

1715419213
Report to moderator
1715419213
Hero Member
*
Offline Offline

Posts: 1715419213

View Profile Personal Message (Offline)

Ignore
1715419213
Reply with quote  #2

1715419213
Report to moderator
1715419213
Hero Member
*
Offline Offline

Posts: 1715419213

View Profile Personal Message (Offline)

Ignore
1715419213
Reply with quote  #2

1715419213
Report to moderator
BitMaxz
Legendary
*
Offline Offline

Activity: 3248
Merit: 2971


Block halving is coming.


View Profile WWW
May 06, 2021, 05:34:46 PM
 #2

You can't able to import privkey if it was pruned mode you need to disable pruned mode before you can import it then after you import you can enable pruned mode again.

The only problem it won't show the latest data like transaction history or the current balance of that wallet.

If your purpose is to make a transaction right away Electrum is the best choice without downloading or -rescan the whole blockchain.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ArthurY (OP)
Sr. Member
****
Offline Offline

Activity: 840
Merit: 254


I love BTC


View Profile
May 06, 2021, 05:42:53 PM
 #3

You can't able to import privkey if it was pruned mode you need to disable pruned mode before you can import it then after you import you can enable pruned mode again.

The only problem it won't show the latest data like transaction history or the current balance of that wallet.

If your purpose is to make a transaction right away Electrum is the best choice without downloading or -rescan the whole blockchain.

If I will turn off prune mode then I import privkeys and then I would to load blockchain and rescan that. Would I see history and able to see balance of the wallet after whole that steps?


Sophisticated Investor
BitMaxz
Legendary
*
Offline Offline

Activity: 3248
Merit: 2971


Block halving is coming.


View Profile WWW
May 06, 2021, 06:08:47 PM
 #4


If I will turn off prune mode then I import privkeys and then I would to load blockchain and rescan that. Would I see history and able to see balance of the wallet after whole that steps?

Yes, it should show your balance after fully synced.

Are you sure that the wallet has a balance? Use some block explorer like this http://blockchain.com/ to check if that wallet has a balance before you proceed running a full node with Bitcoin core and import the private key.

If you don't know the BTC address of that wallet you can use this tool https://coinb.in/#verify download the page then turn off the internet and paste the private key.

It will show you the address of your private key. Now after that go to blockchain.com or here https://blockchair.com/ and then paste the address to check if it has a balance.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
LoyceV
Legendary
*
Online Online

Activity: 3304
Merit: 16635


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 06, 2021, 06:36:04 PM
 #5

What should I do if I need import a new private keys in my new wallet but my blockchain is pruned?
The trick is to import the address (watch-only) before it's funded. That way, your pruned Bitcoin Core keeps track of the balance already, and you can import the private key later. Use the option "false" for the rescan-flag when importing.

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 06, 2021, 10:39:05 PM
 #6

What should I do if I need import a new private keys in my new wallet but my blockchain is pruned?
You either don't import new private keys... or you don't run in pruned mode. Attempting to do both is going to cause issues.

If you import to a pruned wallet, you will need to either rescan (which will require redownloading and reprocessing the entire blockchain) or accept that your wallet may not show an accurate transaction history/balance for that particular address or addresses.

If you think you're going to be importing private keys often (multiple times), get more storage and don't run pruned... or use a different wallet like Electrum that will allow you to import keys without storage/rescan penalty.

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


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

Activity: 2408
Merit: 5595


Self-proclaimed Genius


View Profile
May 07, 2021, 03:52:31 AM
Merited by LoyceV (4), ABCbits (2)
 #7

There's a command that specifically designed for nodes with pruned blockchain to work with importprivkey with false rescan flag.
But the required arguments defeat the purpose since you'll need the blockchain to get them :P
That is:
Code:
importprunedfunds "rawtransaction" "txoutproof"
Quote
importprunedfunds "rawtransaction" "txoutproof"

Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.

Arguments:
1. rawtransaction    (string, required) A raw transaction in hex funding an already-existing address in wallet
2. txoutproof        (string, required) The hex output from gettxoutproof that contains the transaction
To get the rawtransaction, use this online tool: https://chainquery.com/bitcoin-cli/getrawtransaction
To get the txoutproof, you need to ask someone with "-txindex" to use the command:
Code:
gettxoutproof "[\"TXID\"]"
TXID of the transaction that you want to import through importpunedfunds, you can include many as long as they all belong to the same block.

Use that complicated method to import the imported addresses' transactions to your wallet or disable pruning to use rescan.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!