Bitcoin Forum
May 02, 2024, 11:22:24 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: Pruned mode does not work in bitcoind 0.18.1 testnet on: December 21, 2019, 08:51:59 AM
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.
2  Bitcoin / Bitcoin Technical Support / Pruned mode does not work in bitcoind 0.18.1 testnet on: December 21, 2019, 08:11:44 AM
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?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!