dash/contrib
fanquake 573d3a0e02
Merge #17336: scripts: search for first block file for linearize-data with some block files pruned
317fb96de9c6257972f1213b4ef2c3fe87dde99f Add search for first blk file with pruned node (Rjected)

Pull request description:

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->
  When bitcoind is running in pruned mode, producing a hashlist with `./linearize-hashes.py linearize.cfg > hashlist.txt` and then executing `linearize-data.py linearize.cfg` will produce:
  ```
  Read 313001 hashes
  Input file /home/dan/.bitcoin/blocks/blk00000.dat
  Premature end of block data
  ```
  This happens because `linearize-data` starts by attempting to process `blk00000.dat` regardless of whether or not `blk00000.dat` actually exists - this may not be the case if working with a pruned node.
  This PR adds a function which finds the first block file that does exist, and calls that function when the `BlockDataCopier` is initialized.

  This is a refactor of #16431.

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

ACKs for top commit:
  darosior:
    ACK 317fb96de9c6257972f1213b4ef2c3fe87dde99f
  laanwj:
    Code review ACK 317fb96de9c6257972f1213b4ef2c3fe87dde99f
  theStack:
    Code review ACK 317fb96de9

Tree-SHA512: fc8014282df6cfe7b267e64db8ce7d82b86b758c302fbfea4a3c39b62d93512f5c2e31a0de4e9c5ec18fc0268c917f011257d37b45afaef6033eec90e4aa585f
2021-07-14 18:43:56 -05:00
..
auto_gdb refactor: PrivateSend -> CoinJoin + Move the tab (#4038) 2021-03-17 18:36:11 -04:00
debian dashification 2021-07-13 13:14:09 -05:00
devtools Merge #17545: build: remove libanl.so.1 from ALLOWED_LIBRARIES 2021-07-14 18:43:47 -05:00
gitian-descriptors Merge #15549: gitian: Improve error handling 2021-07-10 12:10:51 -05:00
gitian-keys contrib: Added thephez.pgp (#3750) 2020-09-30 15:30:55 +03:00
init Merge #13366: Docs: Rename “OS X” to the newer “macOS” convention 2021-06-28 02:31:48 +03:00
linearize Merge #17336: scripts: search for first block file for linearize-data with some block files pruned 2021-07-14 18:43:56 -05:00
macdeploy Merge #15175: build: Drop macports support 2021-06-28 13:40:56 -05:00
qos Make shellcheck happy 2020-07-29 11:20:12 -05:00
seeds contrib|src: Update hard coded seeds (#4152) 2021-05-13 12:31:45 +03:00
testgen Merge #13935: contrib: Adjust output to current test format 2021-07-08 13:09:43 -04:00
verify-commits Merge #16162: scripts: add key for Michael Ford (fanquake) to trusted keys list 2021-07-12 17:11:12 -05:00
verifybinaries Merge #16330: docs: Use placeholder instead of key expiration date 2021-07-12 20:16:37 -05:00
windeploy update public part of windows code signing certificate (#3749) 2020-10-05 14:57:01 +03:00
zmq Merge #13699: contrib: correct version check 2020-07-26 19:39:13 -05:00
dash-cli.bash-completion Merge #8289: bash-completion: Adapt for 0.12 and 0.13 2017-12-28 11:44:59 +01:00
dash-qt.pro qt: Introduce appearance tab and setup dialog (#3568) 2020-07-26 14:19:11 +03:00
dash-tx.bash-completion Merge #8289: bash-completion: Adapt for 0.12 and 0.13 2017-12-28 11:44:59 +01:00
dashd.bash-completion Merge #10680: Fix inconsistencies and grammar in various files 2020-01-10 10:33:53 -06:00
filter-lcov.py Merge #13448: Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python 2020-07-07 11:50:56 -05:00
gitian-build.py Merge #15863: scripts and tools: Ensure repos are up-to-date in gitian-build.py 2021-07-12 17:11:08 -05:00
README.md Slightly adjust some README.md files (#3175) 2019-10-29 21:37:18 +03:00
valgrind.supp bitcoin -> Dash 2020-01-30 07:37:50 -06:00

Repository Tools

Developer tools

Specific tools for developers working on this repository. Contains the script github-merge.py for merging GitHub pull requests securely and signing them using GPG.

Verify-Commits

Tool to verify that every merge commit was signed by a developer using the above github-merge.py script.

Linearize

Construct a linear, no-fork, best version of the blockchain.

Qos

A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Dash network. This means one can have an always-on dashd instance running, and another local dashd/dash-qt instance which connects to this node and receives blocks from it.

Seeds

Utility to generate the pnSeed[] array that is compiled into the client.

Build Tools and Keys

Debian

Contains files used to package dashd/dash-qt for Debian-based Linux systems. If you compile dashd/dash-qt yourself, there are some useful files here.

Gitian-descriptors

Notes on getting Gitian builds up and running using KVM.

Gitian-keys

PGP keys used for signing Dash Core Gitian release results.

MacDeploy

Scripts and notes for Mac builds.

Gitian-build

Script for running full Gitian builds.

Test and Verify Tools

TestGen

Utilities to generate test vectors for the data-driven Dash tests.

Verify Binaries

This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.