forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 2
presized ReallocateCache #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
l0rinc
wants to merge
44
commits into
bitcoin-dev-tools:master
Choose a base branch
from
l0rinc:detached94
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,283
−288
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
introduce two commandline options for assumeutxo, specifically for
benchmarking. these commands are:
- pausebackgroundsync - an option lets the user pause the verification
of historical blocks in the background
-loadutxosnapshot=<path> - load an assumeutxo snapshot on startup,
instead of needing to go through the rpc
command. the node will shutdown immediately
after the snapshot has been loaded
this path is not meant for general use and is instead just for making it
more ergonomic to use assumeutxo for benchmarking IBD changes. the
benefits of using assumeutxo here are we can start from an arbitrary
height and sync to chaintip to collect relevant data quickly. using
assumeutxo means we can make whatever changes we need to the
chainstatedb, since it will be created fresh from the snapshot.
note, to use the loadutxosnapshot option, you must first run:
./build/src/bitcoind -stopatheight=1
this makes the node do a header sync and then shut down. this is because
assumeutxo will not load a snapshot unless the base block is in the
header chain. we could remove this requirement, but this patch is meant
to be as minimal as possible, and this also allows us to perform heaeder
sync as a preparation commit for a benchmark, which helps keep IBD
benchmarks more focused on strictly measuring IBD.
next, run:
./build/src/bitcoind -loadutxosnapshot=<path>
the node will shutdown after the snapshot is loaded. finally, run:
./build/src/bitcoind -pausebackgroundsync=1
for the actual benchmarking step. this ensures only the sync to chaintip
is benchmarked and the load snapshot step is not included in the
measurement.
Co-authored-by: Sjors Provoost <[email protected]>
Co-authored-by: David Gumberg <[email protected]>
# Conflicts: # .github/workflows/ci.yml # bench-ci/run-assumeutxo-bench.sh # justfile
# Conflicts: # bench-ci/run-assumeutxo-bench.sh
7862a78 to
ea7ce99
Compare
e0dab54 to
93b7a3c
Compare
3b99594 to
4098c1c
Compare
4912c0c to
91b2e42
Compare
d216dc5 to
7f7e173
Compare
5a6cd85 to
d9d7b46
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.