forked from Bitcoin-ABC/bitcoin-abc
-
Notifications
You must be signed in to change notification settings - Fork 0
assumeutxo draft #1
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
PiRK
wants to merge
7
commits into
master
Choose a base branch
from
pr27596
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
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
ee00f48
to
e544699
Compare
c2337a6
to
9817426
Compare
Summary: This is another small backport that can only be tested after we have the loadtxoutset RPC command, but that I think should be included before we allow loadng UTXO snapshot because it may guard against amount malleation in snapshot files (see bitcoin/bitcoin#28685 (comment) "certain negative values seem to result in the same hash as their positive counter part") This is a partial backport of core#28685 bitcoin/bitcoin@f621392 Test Plan: `ninja all check-all` tested on my dev branch in feature_assumeutxo.py Reviewers: #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D17930
Co-authored-by: Sebastian Falbesoner <[email protected]> bitcoin/bitcoin@ce585a9 core#28652 rpc: Do not wait for headers inside loadtxoutset core#29345
Co-authored-by: Ryan Ofsky <[email protected]> bitcoin/bitcoin@0f64bac bitcoin/bitcoin@a9ef702 (partial, TODO functional test)
bitcoin/bitcoin@42cae39 core#28589 (race fixes) core#28590 (getchainstates return a list of chainstates) core#28625 ( check that loading snapshot not matching AssumeUTXO parameters fails) bitcoin/bitcoin@fafde92 core#28647 (Add assumeutxo test for wrong hash) core#28652 (fail early if snapshot block hash doesn't match AssumeUTXO parameters) core#28562 (`self.no_op`, `self.wait_until`) core#28666 (assumeutxo file with unknown block hash) core#28669 (check au file with changed outpoint index) core#28685 (add tests for coin maleation) Bitcoin ABC doesn't have the same malleation issue as Bitcoin Core, it was implemented correctly in D512: - Core : `it->second.nHeight * 2 + it->second.fCoinBase ? 1u : 0u` (problem of operator priority, missing parentheses) - ABC : `it->second.GetHeight() * 2 + it->second.IsCoinBase()` Grab the tests anyway core#29215 (spend coin from snapshot chainstate after loading) bitcoin/bitcoin@b7ba60f (add coverage for -reindex and assumeutxo) core#29354 (Assumeutxo with more than just coinbase transactions) core#29394 (Add test to ensure failure when mempool not empty) bitcoin/bitcoin@2bc1ecf (Remove unnecessary sync_blocks in assumeutxo tests) core#29478 (Add test for loadtxoutset when headers are not synced) ----- assumeutxo test: Add RPC test for unset nTx and nChainTx values bitcoin/bitcoin@f252e68 bitcoin/bitcoin@ef29c8b (functional test only) ----------- test: assumeutxo snapshot block CheckBlockIndex crash test Add a test for a CheckBlockIndex crash that would happen before previous "assumeutxo: Get rid of faked nTx and nChainTx values" commit. The crash was an assert failure in the (pindex->nChainTx == pindex->nTx + prev_chain_tx) check that would previously happen if the snapshot block was submitted after loading the snapshot and downloading a few blocks after the snapshot. In that case ReceivedBlockTransactions() previously would overwrite the nChainTx value of the submitted snapshot block with a fake value based on the previous block, so the (pindex->nChainTx == pindex->nTx + prev_chain_tx) check would later fail on the first block after the snapshot. This test was originally posted by Martin Zumsande <[email protected]> in bitcoin/bitcoin#29370 (comment) Co-authored-by: Martin Zumsande <[email protected]>i fixme: commit or pr number ------------ core#29617 (test for coin_height > base_height & amount > money_supply) bitcoin/bitcoin@f621392 (Check deserialized coins for out of range values) core#30053 (coverage for "Couldn't open file..." error) core#29973 (ensure failure when importing a snapshot twice)
Co-Authored-By: MarcoFalke <*~=`'#}+{/-|&$^[email protected]> core#28838 bitcoin/bitcoin@fa5cd66 bitcoin/bitcoin@2bc1ecf bitcoin/bitcoin@7e3dbe4 (functional test only) bitcoin/bitcoin@f20fe33 ------ test: add functional test for balance after snapshot completion Use a third node for this, which doesn't get restarted like the second node. This test would fail without the previous commit. fixme: find commit hash ----- test, assumeutxo: import descriptors during background sync bitcoin/bitcoin@595edee
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.