Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: pereira4 on October 15, 2015, 04:29:03 PM



Title: Running a full node vs running with "prune mode" enabled
Post by: pereira4 on October 15, 2015, 04:29:03 PM
I've heard some people talking about this. Apparently the next big update (0.12) will enable pruning of the blockchain, which means you will be able to run a node that only takes about 1GB to download and to keep locally. My questions are, if this is safe to do or you are in some way compromising your security. I guess the network also loses security if you use the pruned blockchain and not the full one.
I would like to get this properly explained .


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: Lauda on October 15, 2015, 04:38:38 PM
Why would you lose security? The main and possibly only downside of this feature is that we are going to see a drop in the number of full nodes. In other words, there won't be that many copies of the whole blockchain. As far as security goes for a single node, it should not decerease security.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: PolarPoint on October 15, 2015, 05:42:07 PM
I think those who will run this pruned mode would not have run a full node anyway. This new feature might actually pull more people running SPV wallets or web wallets into running pruned nodes. Security of the network will not be impacted much.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: Mikestang on October 15, 2015, 05:58:06 PM
Block pruning was introduced with 0.11.0, you can run a pruned node right now if you wanted to.  There is no security compromise here, but you lose some functionality in not having the entire block chain stored at your node.  If you have HD space to spare and a decent internet connection there's really no reason to run in pruned mode.

You still have to d/l the entire 40GB+ blockchain the first time you install before it can be pruned, so starting a pruned node will still take some time, but once it's pruned you don't need to keep all the data.

Here's some good reading for you: https://news.bitcoin.com/pros-and-cons-on-bitcoin-block-pruning/


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: shorena on October 15, 2015, 07:30:12 PM
Block pruning was introduced with 0.11.0, you can run a pruned node right now if you wanted to.  There is no security compromise here, but you lose some functionality in not having the entire block chain stored at your node.  If you have HD space to spare and a decent internet connection there's really no reason to run in pruned mode.

You still have to d/l the entire 40GB+ blockchain the first time you install before it can be pruned, so starting a pruned node will still take some time, but once it's pruned you don't need to keep all the data.

Here's some good reading for you: https://news.bitcoin.com/pros-and-cons-on-bitcoin-block-pruning/

Keep in mind that a pruned mode can currently not offer a wallet and it does not relay blocks. It is thus no help to SPV clients or at least thats my understanding of SPV. A pruned node will just relay transactions.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: achow101_alt on October 15, 2015, 08:56:38 PM
Block pruning was introduced with 0.11.0, you can run a pruned node right now if you wanted to.  There is no security compromise here, but you lose some functionality in not having the entire block chain stored at your node.  If you have HD space to spare and a decent internet connection there's really no reason to run in pruned mode.

You still have to d/l the entire 40GB+ blockchain the first time you install before it can be pruned, so starting a pruned node will still take some time, but once it's pruned you don't need to keep all the data.

Here's some good reading for you: https://news.bitcoin.com/pros-and-cons-on-bitcoin-block-pruning/

Keep in mind that a pruned mode can currently not offer a wallet and it does not relay blocks. It is thus no help to SPV clients or at least thats my understanding of SPV. A pruned node will just relay transactions.
The next release (0.12) will enable the wallet.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: rupy on January 23, 2016, 05:00:36 PM
Just watched this video: https://www.youtube.com/watch?v=RWeIEFBrItE

1) The pruning must be smart enough to keep blocks for old addresses when you start pruning?
2) If so, it's very important to have the right wallet in place before you begin the pruning?
3) How many blocks upstream does the pruning keep for security for each transaction for addresses in the wallet?
4) How is pruning started, just by rebooting the bitcoind with a flag?
5) Is the bitcoind then busy or can it take RPC requests during that time?
6) How long time does the pruning take?

Is there a plan to add some way for the pruned bitcoind to ask the network for old blocks for a particular address if you import it?


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: achow101 on January 23, 2016, 05:24:23 PM
Just watched this video: https://www.youtube.com/watch?v=RWeIEFBrItE

1) The pruning must be smart enough to keep blocks for old addresses when you start pruning?
No. Unspent outputs are kept inside the wallet so old blocks are not necessary

2) If so it's very important to have the right wallet in place before you begin the pruning?
Yes. You cannot do anything involving rescanning the blockchain. This includes importing addresses and private keys

3) How many blocks upstream does the pruning keep for security for each transaction for addresses in the wallet?
AFAIK it doesn't need to. However it does keep at least the last 288 blocks for other reasons.

4) How is pruning started, just by rebooting the bitcoind with a flag?
Yes.

5) Is the bitcoind then busy or can it take RPC requests during that time?
6) How long time does the pruning take?
These I am not sure. You can run 0.12.0rc2 to try it out.

Is there a plan to add some way for the pruned bitcoind to ask the network for old blocks for a particular address if you import it?
Maybe. I don't think this is really possible because you cannot know what blocks the transactions are in and cannot verify them without redownloading the whole blockchain.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: rupy on January 23, 2016, 06:19:03 PM
Ok thx, did not realize the wallet kept the infomation it needs to guarantee the funds are actually there!


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: pedrog on January 23, 2016, 07:47:10 PM
Block pruning was introduced with 0.11.0, you can run a pruned node right now if you wanted to.  There is no security compromise here, but you lose some functionality in not having the entire block chain stored at your node.  If you have HD space to spare and a decent internet connection there's really no reason to run in pruned mode.

You still have to d/l the entire 40GB+ blockchain the first time you install before it can be pruned, so starting a pruned node will still take some time, but once it's pruned you don't need to keep all the data.

Here's some good reading for you: https://news.bitcoin.com/pros-and-cons-on-bitcoin-block-pruning/

Keep in mind that a pruned mode can currently not offer a wallet and it does not relay blocks. It is thus no help to SPV clients or at least thats my understanding of SPV. A pruned node will just relay transactions.
The next release (0.12) will enable the wallet.

This is great news, gonna try it right now.

These I am not sure. You can run 0.12.0rc2 to try it out.


Is there a bin of this somewhere?


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: shorena on January 23, 2016, 08:00:53 PM
Block pruning was introduced with 0.11.0, you can run a pruned node right now if you wanted to.  There is no security compromise here, but you lose some functionality in not having the entire block chain stored at your node.  If you have HD space to spare and a decent internet connection there's really no reason to run in pruned mode.

You still have to d/l the entire 40GB+ blockchain the first time you install before it can be pruned, so starting a pruned node will still take some time, but once it's pruned you don't need to keep all the data.

Here's some good reading for you: https://news.bitcoin.com/pros-and-cons-on-bitcoin-block-pruning/

Keep in mind that a pruned mode can currently not offer a wallet and it does not relay blocks. It is thus no help to SPV clients or at least thats my understanding of SPV. A pruned node will just relay transactions.
The next release (0.12) will enable the wallet.

This is great news, gonna try it right now.

These I am not sure. You can run 0.12.0rc2 to try it out.


Is there a bin of this somewhere?

Only for 0.12.0rc1 here -> https://bitcoin.org/bin/bitcoin-core-0.12.0/test/


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: achow101 on January 23, 2016, 08:17:39 PM
Is there a bin of this somewhere?

Only for 0.12.0rc1 here -> https://bitcoin.org/bin/bitcoin-core-0.12.0/test/

Although it hasn't been officially released, 0.12.0rc2 has been tagged and gitian built by people, including me. I uploaded my builds here: https://github.com/achow101/bitcoin/releases/tag/v0.12.0rc2 except for Mac OS X. You can check the hashes of these in https://github.com/bitcoin/gitian.sigs. The hashes should be the same for all of the people who have uploaded hashes there and you can also verify the signatures.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: pedrog on January 23, 2016, 09:07:38 PM
Block pruning was introduced with 0.11.0, you can run a pruned node right now if you wanted to.  There is no security compromise here, but you lose some functionality in not having the entire block chain stored at your node.  If you have HD space to spare and a decent internet connection there's really no reason to run in pruned mode.

You still have to d/l the entire 40GB+ blockchain the first time you install before it can be pruned, so starting a pruned node will still take some time, but once it's pruned you don't need to keep all the data.

Here's some good reading for you: https://news.bitcoin.com/pros-and-cons-on-bitcoin-block-pruning/

Keep in mind that a pruned mode can currently not offer a wallet and it does not relay blocks. It is thus no help to SPV clients or at least thats my understanding of SPV. A pruned node will just relay transactions.
The next release (0.12) will enable the wallet.

This is great news, gonna try it right now.

These I am not sure. You can run 0.12.0rc2 to try it out.


Is there a bin of this somewhere?

Only for 0.12.0rc1 here -> https://bitcoin.org/bin/bitcoin-core-0.12.0/test/


Thank you very much, synchronizing as we speak.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: arbitrage on January 28, 2016, 02:43:54 PM
Synchronization is really frustrating sometimes!
And if you need fast acting with your BTCs it is better to stick with multibit or similar wallets..
https://multibit.org/


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: pedrog on January 28, 2016, 03:03:01 PM
Synchronized pretty quick comparing with previous versions, I'm now running a full node with a 5GB blockchain with wallet. :)


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: bill gator on January 28, 2016, 03:06:48 PM
So from my understanding, the implications of "prune mode" would be to allow transactions to be relayed as in a full-node, but without the (heavy)-storage dedication. I'm assuming these "prune mode" machines still confirm transactions, and so this would result in a more efficient, lighter protocol.

Is that right?


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: pedrog on January 28, 2016, 03:09:17 PM
So from my understanding, the implications of "prune mode" would be to allow transactions to be relayed as in a full-node, but without the (heavy)-storage dedication. I'm assuming these "prune mode" machines still confirm transactions, and so this would result in a more efficient, lighter protocol.

Is that right?

Nope, just a smaller blockchain, in my particular configuration the last 5 GB of the blockchain.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: bill gator on January 28, 2016, 03:19:28 PM
So from my understanding, the implications of "prune mode" would be to allow transactions to be relayed as in a full-node, but without the (heavy)-storage dedication. I'm assuming these "prune mode" machines still confirm transactions, and so this would result in a more efficient, lighter protocol.

Is that right?

Nope, just a smaller blockchain, in my particular configuration the last 5 GB of the blockchain.

Then I'm missing the point entirely. If it's not to make blockchain lighter and more situional-ly efficient to encourage more nodes and cut-down resources where appropriate.. How does a smaller blockchain benefit anybody?


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: achow101 on January 28, 2016, 03:23:47 PM
So from my understanding, the implications of "prune mode" would be to allow transactions to be relayed as in a full-node, but without the (heavy)-storage dedication. I'm assuming these "prune mode" machines still confirm transactions, and so this would result in a more efficient, lighter protocol.

Is that right?

Nope, just a smaller blockchain, in my particular configuration the last 5 GB of the blockchain.

Then I'm missing the point entirely. If it's not to make blockchain lighter and more situional-ly efficient to encourage more nodes and cut-down resources where appropriate.. How does a smaller blockchain benefit anybody?
It is lighter on the disk. Traditionally full nodes downloaded and saved every single block it receives onto the disk. With pruning it will still download the entire blockchain it just won't save the entire thing to the disk. It benefits those running the bodes by reducing the storage requirement. Otherwise it has no affect on the network or protocol.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: bill gator on January 28, 2016, 03:27:11 PM
Another question, why was this method of "pruning" chosen? Why does it just keep track of the last X amount of blocks?

This seems like an awkward implementation because it doesn't actually help anything directly, and just leaves a huge gap in the blockchain.

Wouldn't it be more effective to prune by following the coins from the blocks they were mined from?

I.E. Keeping a record of where the coin was mined and where it is currently.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: achow101 on January 28, 2016, 05:31:35 PM
Another question, why was this method of "pruning" chosen? Why does it just keep track of the last X amount of blocks?

This seems like an awkward implementation because it doesn't actually help anything directly, and just leaves a huge gap in the blockchain.
It would work without keeping any of the blockchain. After it verifies the blocks there really is no need for the blockchain. It keeps those blocks in case of blockchain reorgs.

Wouldn't it be more effective to prune by following the coins from the blocks they were mined from?

I.E. Keeping a record of where the coin was mined and where it is currently.
This is pruning at the node level, not shrinking the blockchain which is what you are suggesting. And at the protocol level, there is no such thing as a "coin", it is all inputs and outputs so such an idea does not work.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: calkob on January 29, 2016, 10:01:34 AM
I think those who will run this pruned mode would not have run a full node anyway. This new feature might actually pull more people running SPV wallets or web wallets into running pruned nodes. Security of the network will not be impacted much.

I think your right, i run a full node because i enjoy knowing i am contributing to the network,  i think anyone who runs a pruned node wouldn't have bothered with a full node anyway. 


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: Jet Cash on January 29, 2016, 10:07:57 AM
Some of us will run more than one computer with up-to-date cores on them. It will depend on the circumstances of the moment. ie. are you at home, or in McDonalds. Maybe you are in a nature park filming wildlife, and doing some domain name trading while you wait for some event.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: bill gator on January 29, 2016, 04:03:45 PM
Another question, why was this method of "pruning" chosen? Why does it just keep track of the last X amount of blocks?

This seems like an awkward implementation because it doesn't actually help anything directly, and just leaves a huge gap in the blockchain.
It would work without keeping any of the blockchain. After it verifies the blocks there really is no need for the blockchain. It keeps those blocks in case of blockchain reorgs.

Wouldn't it be more effective to prune by following the coins from the blocks they were mined from?

I.E. Keeping a record of where the coin was mined and where it is currently.
This is pruning at the node level, not shrinking the blockchain which is what you are suggesting. And at the protocol level, there is no such thing as a "coin", it is all inputs and outputs so such an idea does not work.

Ok, thanks for the further explanation. Things are a little clearer now.. I've been doing my best to learn more about the "technical" side of bitcoin, and so far the community has been wonderful for it.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: btc_enigma on February 05, 2016, 04:18:00 AM
Block pruning was introduced with 0.11.0, you can run a pruned node right now if you wanted to.  There is no security compromise here, but you lose some functionality in not having the entire block chain stored at your node.  If you have HD space to spare and a decent internet connection there's really no reason to run in pruned mode.

You still have to d/l the entire 40GB+ blockchain the first time you install before it can be pruned, so starting a pruned node will still take some time, but once it's pruned you don't need to keep all the data.

Here's some good reading for you: https://news.bitcoin.com/pros-and-cons-on-bitcoin-block-pruning/

Keep in mind that a pruned mode can currently not offer a wallet and it does not relay blocks. It is thus no help to SPV clients or at least thats my understanding of SPV. A pruned node will just relay transactions.

Why does it not relay blocks ? It can relay blocks that it has. Only the pruned blocks it cannot relay.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: rupy on March 31, 2016, 08:53:17 AM
But how does importprivkey work with pruning?!


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: CIYAM on March 31, 2016, 09:11:54 AM
But how does importprivkey work with pruning?!

I'm not sure if that command is even allowed when running in prune mode but if it is allowed then it would only be permitted for adding a new (never used before) address (same would apply to importaddress also).


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: longbob72 on March 31, 2016, 09:35:26 AM
importing private keys without rescanning the blockchain is possible by entering importprivkey [key] [label] false . but you probably shouldn't import a used address.


Title: Re: Running a full node vs running with "prune mode" enabled
Post by: rupy on March 31, 2016, 08:43:51 PM
Cool, exactly my use case, adding new addresses!