Bitcoin Forum
December 18, 2017, 03:22:57 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoin Core & pruning mode  (Read 5851 times)
OmegaStarScream
Staff
Legendary
*
Online Online

Activity: 1134



View Profile
August 28, 2016, 07:43:59 AM
 #1

I totally forgot about this pruning mode until I saw Knightdk post answering Amph in the thread where 0.13.0 release was announced...

and since there is some cool new features in Bitcoin core 0.13.0 and upcoming versions as well ,I want to use it but I want to know couple of things first .

1. How to activate this pruning mode ? I assume It's not automatic
2. Pruning mode will work with SegWit , and other features or downloading the whole blockchain is needed

1513610577
Hero Member
*
Offline Offline

Posts: 1513610577

View Profile Personal Message (Offline)

Ignore
1513610577
Reply with quote  #2

1513610577
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Lauda
Legendary
*
Offline Offline

Activity: 1694


GUNBOT Licenses -20% with ref. code 'GrumpyKitty'


View Profile WWW
August 28, 2016, 08:10:24 AM
 #2

1. How to activate this pruning mode ? I assume It's not automatic
No, it's not automatic. To enable pruning you have to:
Quote
To enable block pruning set prune=<N> on the command line or in bitcoin.conf, where N is the number of MiB to allot for raw block & undo data. A value of 0 disables pruning. The minimal value above 0 is 550.
You can read more about it in 0.11.0 and in 0.12.0 release notes.

2. Pruning mode will work with SegWit , and other features or downloading the whole blockchain is needed
I don't see a reason for which it shouldn't work with Segwit (i.e. why implement it in the first place if you're going to invalidate it +0.1.1 versions later).


          ▄▄█████▌▐█████▄▄
       ▄█████████▌    ▀▀▀███▄
     ▄███████████▌  ▄▄▄▄   ▀██▄
   ▄█████████████▌  ▀▄▄▀     ▀██▄
  ▐██████████████▌  ▄▄▄▄       ▀█▌
 ▐███████████████▌             ▀█▌
 ████████████████▌  ▀▀▀█         ██
▐████████████████▌  ▄▄▄▄         ██▌
▐████████████████▌  ▀  ▀         ██▌
 ████████████████▌  █▀▀█         ██
 ▐███████████████▌  ▀▀▀▀        ▄█▌
  ▐██████████████▌  ▀▀▀▀       ▄█▌
   ▀█████████████▌  ▀▀█▀     ▄██▀
     ▀███████████▌  ▀▀▀▀   ▄██▀
       ▀█████████▌    ▄▄▄███▀
          ▀▀█████▌▐█████▀▀
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
      ▄▄▄
 ▄▄█████████▄▄
  ▀▀▀▀▀▀▀▀▀▀▀
   █▌▐█ █▌▐█
   █▌▐█ █▌▐█
 ▄███████████▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄






▄█████████████▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
███████████████
██▀▀█▀▀████████
▀█████████████▀
OmegaStarScream
Staff
Legendary
*
Online Online

Activity: 1134



View Profile
August 28, 2016, 05:52:17 PM
 #3

I read both releases notes you gave me but I still don't fully get it. I mean I understand that to disable it I should set it to "0" but to enable , I should put any number between 0-550 and that will enable it ?  Huh 1 should do the job ?

Lauda
Legendary
*
Offline Offline

Activity: 1694


GUNBOT Licenses -20% with ref. code 'GrumpyKitty'


View Profile WWW
August 28, 2016, 06:09:31 PM
 #4

I read both releases notes you gave me but I still don't fully get it. I mean I understand that to disable it I should set it to "0" but to enable , I should put any number between 0-550 and that will enable it ?  Huh 1 should do the job ?
You need to set it to a minimum of 550 for it to work. Read:
Quote
The minimal value above 0 is 550.


          ▄▄█████▌▐█████▄▄
       ▄█████████▌    ▀▀▀███▄
     ▄███████████▌  ▄▄▄▄   ▀██▄
   ▄█████████████▌  ▀▄▄▀     ▀██▄
  ▐██████████████▌  ▄▄▄▄       ▀█▌
 ▐███████████████▌             ▀█▌
 ████████████████▌  ▀▀▀█         ██
▐████████████████▌  ▄▄▄▄         ██▌
▐████████████████▌  ▀  ▀         ██▌
 ████████████████▌  █▀▀█         ██
 ▐███████████████▌  ▀▀▀▀        ▄█▌
  ▐██████████████▌  ▀▀▀▀       ▄█▌
   ▀█████████████▌  ▀▀█▀     ▄██▀
     ▀███████████▌  ▀▀▀▀   ▄██▀
       ▀█████████▌    ▄▄▄███▀
          ▀▀█████▌▐█████▀▀
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
      ▄▄▄
 ▄▄█████████▄▄
  ▀▀▀▀▀▀▀▀▀▀▀
   █▌▐█ █▌▐█
   █▌▐█ █▌▐█
 ▄███████████▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄






▄█████████████▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
███████████████
██▀▀█▀▀████████
▀█████████████▀
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
August 28, 2016, 06:09:49 PM
 #5

I read both releases notes you gave me but I still don't fully get it. I mean I understand that to disable it I should set it to "0" but to enable , I should put any number between 0-550 and that will enable it ?  Huh 1 should do the job ?
Put any number 550 or above in order to enable pruning. 550 is the minimum.

Hazir
Legendary
*
Offline Offline

Activity: 1414


★Nitrogensports.eu★


View Profile
September 03, 2016, 07:33:49 AM
 #6

OK, I have a question. Say: I enabled prune mode and Bitcoin Core effectively started working in this mode.
But it is one way ticket if I ever want to go back to 'full' mode I need to download and verify whole blockchain once again there is no shortcuts?

Also minimal number from that command line to start prune mode: "550" - is it linked directly to disk space pruned blockchain will take?


           █████████████████     ████████
          █████████████████     ████████
         █████████████████     ████████
        █████████████████     ████████
       ████████              ████████
      ████████              ████████
     ████████     ███████  ████████     ████████
    ████████     █████████████████     ████████
   ████████     █████████████████     ████████
  ████████     █████████████████     ████████
 ████████     █████████████████     ████████
████████     ████████  ███████     ████████
            ████████              ████████
           ████████              ████████
          ████████     █████████████████
         ████████     █████████████████
        ████████     █████████████████
       ████████     █████████████████
▄▄
██
██
██
██
██
██
██
██
██
██     
██
██
▬▬ THE LARGEST & MOST TRUSTED ▬▬
      BITCOIN SPORTSBOOK     
   ▄▄
██
██
██
██
██
██
██
██
██
██     
██
██
             ▄▄▄▄▀▀▀▀▄
     ▄▄▄▄▀▀▀▀        ▀▄▄▄▄          
▄▀▀▀▀                 █   ▀▀▀▀▀▀▀▄▄
█                    ▀▄          █
 █   ▀▌     ██▄        █          █              
 ▀▄        ▐████▄       █        █
  █        ███████▄     ▀▄       █
   █      ▐████▄█████████████████████▄
   ▀▄     ███████▀                  ▀██
    █      ▀█████    ▄▄        ▄▄    ██
     █       ▀███   ████      ████   ██
     ▀▄        ██    ▀▀        ▀▀    ██
      █        ██        ▄██▄        ██
       █       ██        ▀██▀        ██
       ▀▄      ██    ▄▄        ▄▄    ██
        █      ██   ████      ████   ██
         █▄▄▄▄▀██    ▀▀        ▀▀    ██
               ██▄                  ▄██
                ▀████████████████████▀




  CASINO  ●  DICE  ●  POKER  
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
   24 hour Customer Support   

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
September 03, 2016, 02:06:52 PM
 #7

OK, I have a question. Say: I enabled prune mode and Bitcoin Core effectively started working in this mode.
But it is one way ticket if I ever want to go back to 'full' mode I need to download and verify whole blockchain once again there is no shortcuts?
Yes, you will have to redownload the entire blockchain, there are no shortcuts

Also minimal number from that command line to start prune mode: "550" - is it linked directly to disk space pruned blockchain will take?
That number is the number of Megabytes to allocate for block and undo files. Each block can have up to 1 Mb of block file and 1 Mb of undo file. 550 will thus store, at a minimum, ~2 days of blocks.

jlp
Sr. Member
****
Offline Offline

Activity: 266


View Profile
May 17, 2017, 06:12:28 PM
 #8

Also minimal number from that command line to start prune mode: "550" - is it linked directly to disk space pruned blockchain will take?
That number is the number of Megabytes to allocate for block and undo files. Each block can have up to 1 Mb of block file and 1 Mb of undo file. 550 will thus store, at a minimum, ~2 days of blocks.

What are benefits of setting prune to be anything greater than 550, such as 551, 2000, 3000?

I'm planning to run Bitcoin Core 0.14.1 on two machines:  one that is online and another that is offline (hence offline wallet).  I'll have to update the blockchain once in a while on my online machine.  The offline machine will be the same physical machine except booted from a Ubuntu USB stick.  To run Bitcoin Core on the offline machine, I was thinking of running Bitcoin Core from the same USB stick.  Is this do-able?

On the rare occasion that I use my offline machine, I was thinking that I would copy the block folder from the online machine onto a second USB stick, go offline, boot up Ubuntu from the first USB stick, copy the block folder from the second USB stick to the first USB stick.  This way, when I launch Bitcoin Core from the first USB stick, it would be synced and therefore I will be able to send out bitcoins.

Does this sound do-able?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
May 17, 2017, 06:22:56 PM
 #9

What are benefits of setting prune to be anything greater than 550, such as 551, 2000, 3000?
You will be storing more of the blockchain and thus be less likely to be affected by very large blockchain reorgs.

I'm planning to run Bitcoin Core 0.14.1 on two machines:  one that is online and another that is offline (hence offline wallet).  I'll have to update the blockchain once in a while on my online machine.  The offline machine will be the same physical machine except booted from a Ubuntu USB stick.  To run Bitcoin Core on the offline machine, I was thinking of running Bitcoin Core from the same USB stick.  Is this do-able?

On the rare occasion that I use my offline machine, I was thinking that I would copy the block folder from the online machine onto a second USB stick, go offline, boot up Ubuntu from the first USB stick, copy the block folder from the second USB stick to the first USB stick.  This way, when I launch Bitcoin Core from the first USB stick, it would be synced and therefore I will be able to send out bitcoins.

Does this sound do-able?
Yes.

jlp
Sr. Member
****
Offline Offline

Activity: 266


View Profile
May 17, 2017, 08:03:34 PM
 #10

What are benefits of setting prune to be anything greater than 550, such as 551, 2000, 3000?
You will be storing more of the blockchain and thus be less likely to be affected by very large blockchain reorgs.

What are blockchain reorgs?

I want to use Bitcoin Core, but I would prefer to store as little of the blockchain as possible.  Is there an optimal size for the pruned block folder?

achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
May 17, 2017, 08:20:12 PM
 #11

What are blockchain reorgs?
Reorgs are short for reorganizations. These happen when there are forks in the blockchain and your node switches from one fork to a different fork.

I want to use Bitcoin Core, but I would prefer to store as little of the blockchain as possible.  Is there an optimal size for the pruned block folder?
Just use the default prune size of 550. It is the smallest size but still provides sufficient protection against reorgs as it stores ~2 days worth of blocks.

jlp
Sr. Member
****
Offline Offline

Activity: 266


View Profile
May 17, 2017, 08:44:49 PM
 #12

Just use the default prune size of 550. It is the smallest size but still provides sufficient protection against reorgs as it stores ~2 days worth of blocks.

I've already synchronized the block with prune=2096 in bitcoin.conf.  Can I simply change this to prune=550 and relaunch Bitcoin Core?  Will it reduce the block folder down to 550MiB?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
May 17, 2017, 09:02:36 PM
 #13

I've already synchronized the block with prune=2096 in bitcoin.conf.  Can I simply change this to prune=550 and relaunch Bitcoin Core?  Will it reduce the block folder down to 550MiB?
Yes.

jlp
Sr. Member
****
Offline Offline

Activity: 266


View Profile
May 18, 2017, 10:15:17 PM
 #14

I've already synchronized the block with prune=2096 in bitcoin.conf.  Can I simply change this to prune=550 and relaunch Bitcoin Core?  Will it reduce the block folder down to 550MiB?
Yes.

Will Bitcoin Core need to re-sync or validate the blockchain all over again (which will take 4-5 days)?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
May 18, 2017, 11:05:11 PM
 #15

Will Bitcoin Core need to re-sync or validate the blockchain all over again (which will take 4-5 days)?
No. It will just delete the stuff it doesn't need.

Rabinovitch
Legendary
*
Offline Offline

Activity: 1190



View Profile
December 08, 2017, 07:30:30 AM
 #16

Well, I'm using Bitcoin Core 0.15.1.

I've inserted a line in my bitcoin.conf:

Code:
prune=5000000

But after the Bitcoin Core starts the blockchain doesn't became "pruned" to 5 Gb. It's still 150+ Gb.

Shoud I do some further actions to reduce the blockchain size?

 

From Siberia with love!
Never do any business with Kirill Stepanenko (Volgograd, Russia)
Hotmine X6 miner/upgrade kit review
Lauda
Legendary
*
Offline Offline

Activity: 1694


GUNBOT Licenses -20% with ref. code 'GrumpyKitty'


View Profile WWW
December 08, 2017, 09:37:41 AM
 #17

Code:
prune=5000000
You've set the prune to the last 5 million blocks, that's why. The parameter is the number of blocks.


          ▄▄█████▌▐█████▄▄
       ▄█████████▌    ▀▀▀███▄
     ▄███████████▌  ▄▄▄▄   ▀██▄
   ▄█████████████▌  ▀▄▄▀     ▀██▄
  ▐██████████████▌  ▄▄▄▄       ▀█▌
 ▐███████████████▌             ▀█▌
 ████████████████▌  ▀▀▀█         ██
▐████████████████▌  ▄▄▄▄         ██▌
▐████████████████▌  ▀  ▀         ██▌
 ████████████████▌  █▀▀█         ██
 ▐███████████████▌  ▀▀▀▀        ▄█▌
  ▐██████████████▌  ▀▀▀▀       ▄█▌
   ▀█████████████▌  ▀▀█▀     ▄██▀
     ▀███████████▌  ▀▀▀▀   ▄██▀
       ▀█████████▌    ▄▄▄███▀
          ▀▀█████▌▐█████▀▀
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
▬◉▬
      ▄▄▄
 ▄▄█████████▄▄
  ▀▀▀▀▀▀▀▀▀▀▀
   █▌▐█ █▌▐█
   █▌▐█ █▌▐█
 ▄███████████▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄






▄█████████████▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
███████████████
██▀▀█▀▀████████
▀█████████████▀
Rabinovitch
Legendary
*
Offline Offline

Activity: 1190



View Profile
December 08, 2017, 07:06:20 PM
 #18

Yep, I got it. ) It's 5000 now...

From Siberia with love!
Never do any business with Kirill Stepanenko (Volgograd, Russia)
Hotmine X6 miner/upgrade kit review
HCP
Sr. Member
****
Offline Offline

Activity: 448

<insert witty quote here>


View Profile
December 09, 2017, 01:51:50 AM
 #19

The parameter is the number of blocks.
are you sure?

Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >550 = automatically prune block files to stay under the specified target size in MiB)

Given that blocks used to be 1MiB... it would have been the same... since SegWit and the slightly larger than 1MiB blocks, it is likely that it won't be the same anymore Wink Either way, OP still got the number out by a factor of 1000 Tongue

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!