Stop at header #31162

issue carnhofdaki openend this issue on October 26, 2024
  1. carnhofdaki commented at 2:20 pm on October 26, 2024: contributor

    Please describe the feature you’d like to see added.

    While preparing the little ter.gz file for https://github.com/fjahr/test_chain_init/issues/1 I stumbled upon the fact that one is unable to download just a couple of blocks in the beginning without synchronizing the full header chain.

    I would be happy if the stopatheight option was respected also header-wise. This is a feature request.

    Using 28.0 x86_64 Linux release binaries from bitcoincore.org

    0$ bitcoind -help -help-debug | grep -A 2 stopatheight
    1  -stopatheight
    2       Stop running after reaching the given height in the main chain (default:
    3       0)
    

    Version tested:

     0 bitcoind -version
     1Bitcoin Core version v28.0.0
     2Copyright (C) 2009-2024 The Bitcoin Core developers
     3
     4Please contribute if you find Bitcoin Core useful. Visit
     5<https://bitcoincore.org/> for further information about the software.
     6The source code is available from <https://github.com/bitcoin/bitcoin>.
     7
     8This is experimental software.
     9Distributed under the MIT software license, see the accompanying file COPYING
    10or <https://opensource.org/licenses/MIT>
    

    Thank you!

    No response

    Describe the solution you’d like

    No response

    Describe any alternatives you’ve considered

    No response

    Please leave any additional context

    No response

  2. carnhofdaki added the label Feature on Oct 26, 2024
  3. mzumsande commented at 7:15 pm on October 27, 2024: contributor
    For what would you need to use this kind of feature? This probably wouldn’t be as simple to implement as current -stopatheight (one would need to keep downloading blocks after the last header was received but not accept any more headers), so I think that there should be a serious use case.
  4. maflcko commented at 7:33 am on October 28, 2024: member
    Does the hidden debug-only -minimumchainwork=0 not work for this use case?
  5. carnhofdaki commented at 11:36 am on October 28, 2024: contributor

    Thank you @maflcko ! The minimumchainwork=0 does exactly what I was looking for.

    Closing as solved.

  6. carnhofdaki closed this on Oct 28, 2024


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me