Hey everyone,
I’m kinda new to bitcoin and I’m looking to set up my own pruned node so I can have that trust-but-verify vibe going on.
Since my computer’s storage is limited, I figured running a pruned node is the way to go. From what I gather, it’s going to download blocks starting from the genesis block up to the latest one, verifying every transaction along the way before moving to the next block.
But I set the prune=550 option in my config, so it won’t store every block’s info forever.
I’m using docker with the kylemanna/bitcoind image. So my question is, if I want to quickly spin up a new pruned node on a different machine, can I just back up the data folder from the container and reuse it? I’ve personally verified the blockchain from the start, and honestly, this whole syncing thing takes ages.
Also, once my node is synced with the network, can I use it to broadcast transactions? And will I still be able to see how many btc are in my wallet without having the whole blockchain history? I’m thinking my node could reach out to a random full node to verify some blocks, but I’m not entirely sure if that’s how it works.
Thanks in advance for any help, and sorry for my English mistakes, I’m not a native speaker.
Pruned node and Docker question
7 replies 50 views
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#2Jul 24, 2017, 06:10 PM
Yes. You can use a pruned Bitcoin Core node to make and broadcast transactions from your wallet.
It depends:
if you create a new wallet from your pruned Bitcoin Core, it works just fine.if you load an old wallet.dat, you may not be able to see all it's history.if you load an old wallet.dat before Bitcoin Core starts syncing, it will find all it's transactions during syncing and work just fine.
It doesn't work this way.
Oh crap I didn't know that, I would have connect my btc wallet to the node before syncing if I would know, thank you for your answers.
And what do you think about my idea with the docker and the folder backup/export ?
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#4Jul 24, 2017, 11:38 PM
I can't really comment on that: I don't use docker.
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#5Jul 25, 2017, 03:21 AM
No, yes, your node will scan its already verified blocks for transactions related to your currently loaded wallets before those get pruned.
So, even if it'll delete them once the prune size reached its limit, your wallet already know which transactions are yours.
This is also why it wont be able to rescan any old wallet backups that was synced past your node's 'prune height' or descriptors with older transactions than it.
Check $ bitcoin-cli getblockchaininfo for the "pruneheight" to see your rescanblockchain command "start_height" limit.
I don't use docker but if the entire .bitcoin datadir is included and restored to the correct directory, it should should work.
But the new machine's bitcoin.conf file must also contain "prune=<size>" or as a command line arg, the size can be different than what you originally set.
If you want reliability, you can easily test it to your other machine since its size is just a few Gigabytes after pruning. (it's mostly the UTXO set)
But make sure to do it only once Bitcoin Core is fully shutdown or it will cause issues.
I talked with chatgpt about how bitcoin is working ^^.
I think he says wrong things, but what he says is that because all the utxo are aroung 10 gb even if my bitcoin core node is pruned and don't keep every block on his disk, he will actually keep every utxo list, and he says that once my bitcoin node would have finish syncing with the network (even in prune mode) I would be able to see the balance of any wallet (even one create before I started my bitcoin core setup, 2 days ago in my situation).
What I don't understand here is why the bitcoin blockchain size is about 900 gb but every uxto are around 10 gb, what all those block contains if it's not just utxo, here we are talking about bitcoin and not ethereum or an other blockchain where we can execute function things like that (maybe I am totally wrong and I don't understand anything about crypto currencies and we can't do things like that on ethereum).
This is right.
Even if you run a pruned node, you have to keep the UTXO set.
This is wrong.
If you load a new wallet.dat, you will have to redownload the blockchain, so that the transactions are displayed.
The bitcoin blockchain includes all the transactions that have been made so far.
The UTXO set is much smaller in size, because it's just a list including some information about unspent outputs.
Each bitcoin transaction contains ID(s) of the parents along with the index of the output(s) that are spent, unlocking script(s), locking script(s), amount of output(s) and some other information that I may have forgotten to mention. All these data are recorded in the blockchain.
In UTXO set, we only have some information about unspent outputs like the ID of the transaction that has created the UTXO along with its index in the transaction, their amount and locking script.
Also note that UTXO stands for Unspent Transaction Output. Once a UTXO is spent, it's removed from the UTXO set.
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#8Jul 25, 2017, 08:55 AM
ChatGPT must have misunderstood the documentations stating that you can see the balance of any wallet as long as the node hasn't pruned the required blocks yet.
Here's the catch, remember the getblockchaininfo output that I've mentioned "pruneheight", it indicates the lowest (oldest) block height that your node can rescan.
The higher your prune size setting is, the lower it is from the tip of the blockchain since your node can store more blocks.
If the wallet that it needs to rescan requires the blocks older than it, your node has to redo IBD to do so.
But it'll load just fine if your node still has the blocks that it needs to rescan.
Related topics
- Got a free laptop, need help setting up Linux for a node 19
- Affordable quiet mini PC for running a Bitcoin node and blockchain explorer 19
- need some help with this question 9
- bitcoin-qt sync issues and slow speeds 6
- Recovering a Bitcoin wallet and address 8
- Creating a list of non-zero wallets and their balances using Python 4