Git Product home page Git Product logo

Comments (3)

maflcko avatar maflcko commented on September 25, 2024

Using the same blocksdir for two different nodes is not supported. Nodes may download blocks in a different order and save them to different locations in the blocksfiles. This will lead to an error at some point, latest when one of the nodes can't find a block where it believes to be one.

Currently, I don't think what you are trying to achieve is possible without copying blocks.

If bitcoin-core assumes pruning to be enabled by default, at least it should have asked for confirmation to delete blocks it did not download.

I don't think pruning is enabled by default. It would be a bug if it was.

EDIT: Looks like prune is enabled by default in the GUI

from bitcoin.

zefir-k avatar zefir-k commented on September 25, 2024

Using the same blocksdir for two different nodes is not supported. Nodes may download blocks in a different order and save them to different locations in the blocksfiles. This will lead to an error at some point, latest when one of the nodes can't find a block where it believes to be one.

Currently, I don't think what you are trying to achieve is possible without copying blocks.

Hm, my experience differs: using this regularly and never ran into issues. Since the external HDD contains fully downloaded and validated blockchain, there is not much to dissent between different nodes besides the very last potentially incomplete block. There is this tool (https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/fastcopy-chaindata.py) which works with hardlinks but can't be used over filesystem boundaries - but generally it is possible.

If bitcoin-core assumes pruning to be enabled by default, at least it should have asked for confirmation to delete blocks it did not download.

I don't think pruning is enabled by default. It would be a bug if it was.

Maybe problem is, I started bitcoin-core.qt first, which found my local SSD has insufficient space for the full blockchain and hence wrote a prune-enabled config, which I did not check when softlinking to my external blockchain. So I learned something for the price of a 2-day-IBD.

Proposal: don't prune if blocksdir is defined - or at least document that if pruning is enabled your externally kept blockchain will get deleted.

from bitcoin.

maflcko avatar maflcko commented on September 25, 2024

Using the same blocksdir for two different nodes is not supported. Nodes may download blocks in a different order and save them to different locations in the blocksfiles. This will lead to an error at some point, latest when one of the nodes can't find a block where it believes to be one.
Currently, I don't think what you are trying to achieve is possible without copying blocks.

Hm, my experience differs: using this regularly and never ran into issues. Since the external HDD contains fully downloaded and validated blockchain, there is not much to dissent between different nodes besides the very last potentially incomplete block. There is this tool (https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/fastcopy-chaindata.py) which works with hardlinks but can't be used over filesystem boundaries - but generally it is possible.

Sure, but the script also intends to correctly handle blocks/index, as well as the last block file. I don't see where your approach does it.

Proposal: don't prune if blocksdir is defined - or at least document that if pruning is enabled your externally kept blockchain will get deleted.

Again, what you described so far isn't a supported use case right now.

from bitcoin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.