-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
validation: assumeutxo params for testnet and signet #28516
Commits on Sep 17, 2023
-
net_processing: Request assumeutxo background chain blocks
Add new PeerManagerImpl::TryDownloadingHistoricalBlocks method and use it to request background chain blocks in addition to blocks normally requested by FindNextBlocksToDownload. Co-authored-by: Ryan Ofsky <ryan@ofsky.org> Co-authored-by: James O'Beirne <james.obeirne@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a9ea542 - Browse repository at this point
Copy the full SHA a9ea542View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9aa43d - Browse repository at this point
Copy the full SHA e9aa43dView commit details -
assumeutxo: remove snapshot during -reindex{-chainstate}
Removing a snapshot chainstate from disk (and memory) is consistent with existing reindex operations.
Configuration menu - View commit details
-
Copy full SHA for 0012979 - Browse repository at this point
Copy the full SHA 0012979View commit details -
chainparams: add blockhash to AssumeutxoData
This allows us to reference assumeutxo configuration by blockhash as well as height; this is helpful in future changes when we want to reference assumeutxo configurations before the block index is loaded.
Configuration menu - View commit details
-
Copy full SHA for 4ac7dd2 - Browse repository at this point
Copy the full SHA 4ac7dd2View commit details -
validation: MaybeRebalanceCaches when chain leaves IBD
Check to see if we need to rebalance caches across chainstates when a chain leaves IBD.
Configuration menu - View commit details
-
Copy full SHA for 3661b4b - Browse repository at this point
Copy the full SHA 3661b4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d5aca2 - Browse repository at this point
Copy the full SHA 6d5aca2View commit details -
validation: only call UpdatedBlockTip for active chainstate
This notification isn't needed for background chainstates. `kernel::Notifications::blockTip` are also skipped.
Configuration menu - View commit details
-
Copy full SHA for 03a348c - Browse repository at this point
Copy the full SHA 03a348cView commit details -
validation: pass ChainstateRole for validationinterface calls
This allows consumers to decide how to handle events from background or assumedvalid chainstates.
Configuration menu - View commit details
-
Copy full SHA for ac53194 - Browse repository at this point
Copy the full SHA ac53194View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2117a1 - Browse repository at this point
Copy the full SHA b2117a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for e2c5c5d - Browse repository at this point
Copy the full SHA e2c5c5dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40d5ca3 - Browse repository at this point
Copy the full SHA 40d5ca3View commit details -
validation: indexing changes for assumeutxo
When using an assumedvalid chainstate, only process validationinterface callbacks from the background chainstate within indexes. This ensures that all indexes are built in-order. Later, we can possibly designate indexes which can be built out of order and continue their operation during snapshot use. Once the background sync has completed, restart the indexes so that they continue to index the now-validated snapshot chainstate.
Configuration menu - View commit details
-
Copy full SHA for e144e6b - Browse repository at this point
Copy the full SHA e144e6bView commit details -
validation: pruning for multiple chainstates
Introduces ChainstateManager::GetPruneRange(). The prune budget is split evenly between the number of chainstates, however the prune budget may be exceeded if the resulting shares are beneath `MIN_DISK_SPACE_FOR_BLOCK_FILES`.
Configuration menu - View commit details
-
Copy full SHA for 8cfd271 - Browse repository at this point
Copy the full SHA 8cfd271View commit details -
test: adjust chainstate tests to use recognized snapshot base
In future commits, loading the block index while making use of a snapshot is contingent on the snapshot being recognized by chainparams. Ensure all existing unittests that use snapshots use a recognized snapshot (at height 110). Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
Configuration menu - View commit details
-
Copy full SHA for 14fcb1b - Browse repository at this point
Copy the full SHA 14fcb1bView commit details -
validation: populate nChainTx value for assumedvalid chainstates
Use the expected AssumeutxoData in order to bootstrap nChainTx values for assumedvalid blockindex entries in the snapshot chainstate. This is necessary because nChainTx is normally built up from nTx values, which are populated using blockdata which the snapshot chainstate does not yet have.
Configuration menu - View commit details
-
Copy full SHA for a7a5deb - Browse repository at this point
Copy the full SHA a7a5debView commit details
Commits on Sep 20, 2023
-
blockstorage: segment normal/assumedvalid blockfiles
When using an assumedvalid (snapshot) chainstate along with a background chainstate, we are syncing two very different regions of the chain simultaneously. If we use the same blockfile space for both of these syncs, wildly different height blocks will be stored alongside one another, making pruning ineffective. This change implements a separate blockfile cursor for the assumedvalid chainstate when one is in use.
Configuration menu - View commit details
-
Copy full SHA for bd770ff - Browse repository at this point
Copy the full SHA bd770ffView commit details -
validation: assumeutxo: swap m_mempool on snapshot activation
Otherwise we will not receive transactions during background sync until restart.
Configuration menu - View commit details
-
Copy full SHA for 0f34fc7 - Browse repository at this point
Copy the full SHA 0f34fc7View commit details -
validation: do not activate snapshot if behind active chain
Most easily reviewed with git show --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
Configuration menu - View commit details
-
Copy full SHA for 126d717 - Browse repository at this point
Copy the full SHA 126d717View commit details -
Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4193ef8 - Browse repository at this point
Copy the full SHA 4193ef8View commit details -
refuse to activate a UTXO snapshot if mempool not empty
This ensures that we avoid any unexpected conditions inherent in transferring non-empty mempools across chainstates. Note that this should never happen in practice given that snapshot activation will not occur outside of IBD, based upon the height checks in `loadtxoutset`.
Configuration menu - View commit details
-
Copy full SHA for 89bbb22 - Browse repository at this point
Copy the full SHA 89bbb22View commit details -
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
Configuration menu - View commit details
-
Copy full SHA for fb87f83 - Browse repository at this point
Copy the full SHA fb87f83View commit details -
test: add feature_assumeutxo functional test
Most ideas for test improvements (TODOs) provided by Russ Yanofsky.
Configuration menu - View commit details
-
Copy full SHA for afc9093 - Browse repository at this point
Copy the full SHA afc9093View commit details -
contrib: add script to demo/test assumeutxo
Add the script to the shellcheck exception list since the quoted variables rule needs to be violated in order to get bitcoind to pick up on $CHAIN_HACK_FLAGS.
Configuration menu - View commit details
-
Copy full SHA for ef55d7b - Browse repository at this point
Copy the full SHA ef55d7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 32b797f - Browse repository at this point
Copy the full SHA 32b797fView commit details
Commits on Sep 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d55cc7f - Browse repository at this point
Copy the full SHA d55cc7fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d5f83a7 - Browse repository at this point
Copy the full SHA d5f83a7View commit details