Bitcoin Forum
May 07, 2024, 05:02:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Pruned mode does not work in bitcoind 0.18.1 testnet  (Read 114 times)
rvit34 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 1


View Profile
December 21, 2019, 08:11:44 AM
Last edit: December 21, 2019, 08:36:09 AM by rvit34
 #1

Hi. I am trying to run dockerized bitcoind in pruned mode but it seems to be does not work.
Here is my Dockerfile:
Code:
FROM ubuntu:18.04

RUN apt -y update && apt -y install curl
RUN curl -o bitcoin.tar.gz https://bitcoin.org/bin/bitcoin-core-0.18.1/bitcoin-0.18.1-x86_64-linux-gnu.tar.gz
RUN tar xvf bitcoin.tar.gz

RUN mkdir -p /root/.bitcoin && touch /root/.bitcoin/bitcoin.conf
RUN echo "testnet=1" >> /root/.bitcoin/bitcoin.conf \
    && echo "server=1" >> /root/.bitcoin/bitcoin.conf \
    && echo "prune=1024" >> /root/.bitcoin/bitcoin.conf \
    && echo "rpcuser=bitcoin" >> /root/.bitcoin/bitcoin.conf \
    && echo "rpcpassword=bitcoin" >> /root/.bitcoin/bitcoin.conf \
    && echo "rpcbind=0.0.0.0" >> /root/.bitcoin/bitcoin.conf \
    && echo "rpcallowip=0.0.0.0/0" >> /root/.bitcoin/bitcoin.conf


EXPOSE 18443

CMD ["/bitcoin-0.18.1/bin/bitcoind", "-printtoconsole"]

when I started it like:
Code:
docker build -t bitcoind:0.18.1 .
docker run -p 18443:18443 -v ./bitcoin-data:/root/.bitcoin bitcoind:0.18.1

And then check blockchain info from container:
Code:
./bitcoin-cli getblockchaininfo
I get:
Code:
{
  "chain": "main",
  "blocks": 153420,
  "headers": 609084,
  "bestblockhash": "00000000000004694754cfe23acdd5355ca622d59a3233ce2a5536be270a2fd3",
  "difficulty": 1192497.750089478,
  "mediantime": 1321367993,
  "verificationprogress": 0.00387008781724376,
  "initialblockdownload": true,
  "chainwork": "0000000000000000000000000000000000000000000000090d7d7ebf821a680c",
  "size_on_disk": 852143713,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "defined",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 0
    },
    "segwit": {
      "status": "defined",
      "startTime": 1479168000,
      "timeout": 1510704000,
      "since": 0
    }
  },
  "warnings": ""
}


where I see that pruned is set to false.
So what I am doing wrong or is it a bug?
1715058129
Hero Member
*
Offline Offline

Posts: 1715058129

View Profile Personal Message (Offline)

Ignore
1715058129
Reply with quote  #2

1715058129
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715058129
Hero Member
*
Offline Offline

Posts: 1715058129

View Profile Personal Message (Offline)

Ignore
1715058129
Reply with quote  #2

1715058129
Report to moderator
1715058129
Hero Member
*
Offline Offline

Posts: 1715058129

View Profile Personal Message (Offline)

Ignore
1715058129
Reply with quote  #2

1715058129
Report to moderator
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
December 21, 2019, 08:36:40 AM
 #2

And then check blockchain info from container:
Code:
./bitcoin-cli getblockchaininfo
I get:
Code:
{
...
  "blocks": 153420,
  "headers": 609084,
...
  "verificationprogress": 0.00387008781724376,
  "initialblockdownload": true,
  "chainwork": "0000000000000000000000000000000000000000000000090d7d7ebf821a680c",
  "size_on_disk": 852143713,
...
}

Your node appears to be in the middle of "Initial Block Download"... and is only ~0.4% synced at this point... you'll notice you've only got 153420 blocks out of the 609084 available.

Plus it has only downloaded about ~850 megabytes of data... which is less than the 1024megabytes that you specified as "pruning" size. Once it gets over the 1024 limit, it'll start pruning and you'll eventually see "pruned: true"


Also:
Quote
"chain": "main",

It seems your bitcoind is running on Mainnet... NOT testnet??!? Huh

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
rvit34 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 1


View Profile
December 21, 2019, 08:51:59 AM
Merited by HCP (1)
 #3

Prune actually works. By some reason such approach of creating file inside docker container does not work.
bitcoin.conf is not created inside container. So bitcoind uses default settings. So I mapped it via volume and bitcoind sees prune.
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!