Author

Topic: Pruned mode does not work in bitcoind 0.18.1 testnet (Read 128 times)

newbie
Activity: 2
Merit: 1
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.
HCP
legendary
Activity: 2086
Merit: 4318
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
newbie
Activity: 2
Merit: 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?
Jump to: