mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
bf95976061doc: add note about snapshot chainstate init (James O'Beirne)e4d7995286test: add testcases for snapshot initialization (James O'Beirne)cced4e7336test: move-only-ish: factor out LoadVerifyActivateChainstate() (James O'Beirne)51fc9241c0test: allow on-disk coins and block tree dbs in tests (James O'Beirne)3c361391b8test: add reset_chainstate parameter for snapshot unittests (James O'Beirne)00b357c215validation: add ResetChainstates() (James O'Beirne)3a29dfbfb2move-only: test: make snapshot chainstate setup reusable (James O'Beirne)8153bd9247blockmanager: avoid undefined behavior during FlushBlockFile (James O'Beirne)ad67ff377cvalidation: remove snapshot datadirs upon validation failure (James O'Beirne)34d1590331add utilities for deleting on-disk leveldb data (James O'Beirne)252abd1e8binit: add utxo snapshot detection (James O'Beirne)f9f1735f13validation: rename snapshot chainstate dir (James O'Beirne)d14bebf100db: add StoragePath to CDBWrapper/CCoinsViewDB (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11) (parent PR: https://github.com/bitcoin/bitcoin/pull/15606) --- Half of the replacement for #24232. The original PR grew larger than expected throughout the review process. This change adds the ability to initialize a snapshot-based chainstate during init if one is detected on disk. This is of course unused as of now (aside from in unittests) given that we haven't yet enabled actually loading snapshots. Don't be scared! There are some big move-only commits in here. Accompanying changes include: - moving the snapshot coinsdb directory from being called `chainstate_[base blockhash]` to `chainstate_snapshot`, since we only support one snapshot in use at a time. This simplifies some logic, but it necessitates writing that base blockhash out to a file within the coinsdb dir. See [discussion here](https://github.com/bitcoin/bitcoin/pull/24232#discussion_r832762880). - adding a simple fix in `FlushBlockFile()` that avoids a crash when attemping to flush to disk before `LoadBlockIndexDB()` is called, which happens when calling `MaybeRebalanceCaches()` during multiple chainstate init. - improving the unittest to allow testing with on-disk chainstates - necessary to test a simulated restart and re-initialization. ACKs for top commit: naumenkogs: utACKbf95976061ariard: Code Review ACKbf9597606ryanofsky: Code review ACKbf95976061. Changes since last review: rebasing, switching from CAutoFile to AutoFile, adding comments, switching from BOOST_CHECK to Assert in test util, using chainman.GetMutex() in tests, destroying one ChainstateManager before creating a new one in tests fjahr: utACKbf95976061aureleoules: ACKbf95976061Tree-SHA512: 15ae75caf19f8d12a12d2647c52897904d27b265a7af6b4ae7b858592eeadb8f9da6c2394b6baebec90adc28742c053e3eb506119577dae7c1e722ebb3b7bcc0
This folder contains lint scripts.
check-doc.py
Check for missing documentation of command line options.
commit-script-check.sh
Verification of scripted diffs. Scripted diffs are only assumed to run on the latest LTS release of Ubuntu. Running them on other operating systems might require installing GNU tools, such as GNU sed.
git-subtree-check.sh
Run this script from the root of the repository to verify that a subtree matches the contents of the commit it claims to have been updated to.
Usage: test/lint/git-subtree-check.sh [-r] DIR [COMMIT]
test/lint/git-subtree-check.sh -?
DIRis the prefix within the repository to check.COMMITis the commit to check, if it is not provided, HEAD will be used.-rchecks that subtree commit is present in repository.
To do a full check with -r, make sure that you have fetched the upstream repository branch in which the subtree is
maintained:
- for
src/secp256k1: https://github.com/bitcoin-core/secp256k1.git (branch master) - for
src/leveldb: https://github.com/bitcoin-core/leveldb-subtree.git (branch bitcoin-fork) - for
src/crypto/ctaes: https://github.com/bitcoin-core/ctaes.git (branch master) - for
src/crc32c: https://github.com/bitcoin-core/crc32c-subtree.git (branch bitcoin-fork) - for
src/minisketch: https://github.com/sipa/minisketch.git (branch master)
To do so, add the upstream repository as remote:
git remote add --fetch secp256k1 https://github.com/bitcoin-core/secp256k1.git
all-lint.py
Calls other scripts with the lint- prefix.