0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-13 11:25:02 -05:00
bitcoin-bitcoin-core/src
Ava Chow 394651ff10
Merge bitcoin/bitcoin#29996: Assumeutxo: bugfix on loadtxoutset with a divergent chain + test
5b7f70ba26 test: loadtxoutset in divergent chain with less work (Alfonso Roman Zubeldia)
d35efe1efc p2p: Start downloading historical blocks from common ancestor (Martin Zumsande)

Pull request description:

  This PR adds a test to cover the scenario of loading an assumeutxo snapshot when the current chain tip is not an ancestor of the snapshot block but has less work.

  During the review process, a bug was discovered where blocks between the last common ancestor and the background tip were not being requested if the background tip was not an ancestor of the snapshot block. mzumsande suggested a fix (65343ec49a6b73c4197dfc38e1c2f433b0a3838a) to start downloading historical blocks from the last common ancestor to address this issue. This fix has been incorporated into the PR with a slight modification.

  Related to https://github.com/bitcoin/bitcoin/issues/28648

ACKs for top commit:
  fjahr:
    tACK 5b7f70ba26
  achow101:
    ACK 5b7f70ba26
  mzumsande:
    Code Review ACK 5b7f70ba26

Tree-SHA512: f8957349686a6a1292165ea9e0fd8c912d21466072632a10f8ef9d852a5f430bc6b2a531e6884a4dbf2e3adb28b3d512b25919e78f5804a67320ef54c3b1aaf6
2024-07-10 15:18:33 -04:00
..
bench random: drop ad-hoc Shuffle in favor of std::shuffle 2024-07-06 09:06:36 -04:00
common random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
compat
config
consensus refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
crc32c
crypto util: move HexStr and HexDigit from util to crypto 2024-05-16 17:16:08 +02:00
index refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
init Introduce Mining interface 2024-06-18 18:47:51 +02:00
interfaces Have testBlockValidity hold cs_main instead of caller 2024-06-27 08:58:25 +02:00
ipc
kernel Merge bitcoin/bitcoin#30329: fuzz: improve utxo_snapshot target 2024-07-09 16:13:14 -04:00
leveldb Update leveldb-subtree subtree to latest upstream 2024-06-13 13:17:57 +01:00
logging
minisketch Update minisketch subtree to latest master 2024-06-12 14:38:39 +01:00
node Merge bitcoin/bitcoin#30141: kernel: De-globalize validation caches 2024-07-08 12:14:12 -04:00
policy use version=3 instead of v3 in debug strings 2024-07-02 12:20:12 +01:00
primitives Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
qt Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
rpc Merge bitcoin/bitcoin#30396: random: add benchmarks and drop unnecessary Shuffle function 2024-07-09 17:52:47 -04:00
script kernel: De-globalize signature cache 2024-07-05 09:03:04 +02:00
secp256k1 Update secp256k1 subtree to latest master 2024-06-25 15:01:00 +01:00
support
test Merge bitcoin/bitcoin#30396: random: add benchmarks and drop unnecessary Shuffle function 2024-07-09 17:52:47 -04:00
univalue test: Fix failing univalue float test 2024-04-16 16:35:12 +02:00
util random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
wallet Merge bitcoin/bitcoin#30396: random: add benchmarks and drop unnecessary Shuffle function 2024-07-09 17:52:47 -04:00
zmq rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
.bear-tidy-config
.clang-format
.clang-tidy clang-tidy: Add bugprone-move-forwarding-reference check 2024-05-30 11:33:59 +01:00
addrdb.cpp random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
addrdb.h
addresstype.cpp
addresstype.h
addrman.cpp random: add RandomMixin::randbits with compile-known bits 2024-07-01 10:26:46 -04:00
addrman.h
addrman_impl.h Remove timedata 2024-04-10 17:01:27 +02:00
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp
banman.h net_processing: remove Misbehavior score and increments 2024-05-30 08:35:18 -04:00
base58.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
base58.h
bech32.cpp Reduce memory copying operations in bech32 encode 2024-06-05 13:18:13 +02:00
bech32.h refactor: Model the bech32 charlimit as an Enum 2024-05-13 12:07:47 +02:00
bip324.cpp
bip324.h
bitcoin-chainstate.cpp kernel: De-globalize signature cache 2024-07-05 09:03:04 +02:00
bitcoin-cli-res.rc
bitcoin-cli.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoin-tx-res.rc
bitcoin-tx.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoin-util-res.rc
bitcoin-util.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
bitcoin-wallet-res.rc
bitcoin-wallet.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoind-res.rc
bitcoind.cpp refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
blockencodings.cpp test: Make blockencodings_tests deterministic 2024-06-19 22:56:30 +01:00
blockencodings.h test: Make blockencodings_tests deterministic 2024-06-19 22:56:30 +01:00
blockfilter.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
blockfilter.h
chain.cpp
chain.h
chainparams.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
chainparams.h
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h
checkqueue.h
clientversion.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
clientversion.h scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
coins.cpp log: use error level for critical log messages 2024-06-10 13:46:56 +02:00
coins.h
compressor.cpp
compressor.h refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
core_io.h
core_memusage.h
core_read.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
core_write.cpp refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
cuckoocache.h validation: Don't error if maxsigcachesize exceeds uint32::max 2024-07-04 22:35:29 +02:00
dbwrapper.cpp
dbwrapper.h
deploymentinfo.cpp
deploymentinfo.h
deploymentstatus.cpp
deploymentstatus.h
dummywallet.cpp wallet, test: Be able to always swap BDB endianness 2024-05-16 15:03:13 -04:00
external_signer.cpp
external_signer.h
flatfile.cpp
flatfile.h
hash.cpp
hash.h
headerssync.cpp random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
headerssync.h
httprpc.cpp Merge bitcoin/bitcoin#28167: init: Add option for rpccookie permissions (replace 26088) 2024-06-27 17:35:08 -04:00
httprpc.h
httpserver.cpp rest: don't copy data when sending binary response 2024-06-26 06:47:30 +03:00
httpserver.h refactor: Remove no longer needed clang-15 workaround for std::span 2024-06-26 18:50:20 +02:00
i2p.cpp Merge bitcoin/bitcoin#29833: i2p: fix and improve logs 2024-06-26 15:28:26 -04:00
i2p.h i2p: log errors properly according to their severity 2024-06-12 16:19:50 -03:00
indirectmap.h
init.cpp Merge bitcoin/bitcoin#30141: kernel: De-globalize validation caches 2024-07-08 12:14:12 -04:00
init.h
key.cpp refactor: remove unused CKey::Negate method 2024-06-03 16:59:43 +02:00
key.h refactor: remove unused CKey::Negate method 2024-06-03 16:59:43 +02:00
key_io.cpp
key_io.h
logging.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
logging.h util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
Makefile.am Merge bitcoin/bitcoin#30141: kernel: De-globalize validation caches 2024-07-08 12:14:12 -04:00
Makefile.bench.include random bench refactor: move to new bench/random.cpp 2024-07-05 09:51:26 -04:00
Makefile.crc32c.include
Makefile.leveldb.include
Makefile.minisketch.include build: remove minisketch clz check 2024-04-12 14:28:34 +02:00
Makefile.qt.include build, test, doc: Temporarily remove Android-related stuff 2024-05-06 11:29:14 +01:00
Makefile.qt_locale.include
Makefile.qttest.include
Makefile.test.include random: move XoRoShiRo128PlusPlus into random module 2024-07-01 10:26:46 -04:00
Makefile.test_fuzz.include
Makefile.test_util.include random: move XoRoShiRo128PlusPlus into random module 2024-07-01 10:26:46 -04:00
Makefile.univalue.include
mapport.cpp upnp: add compatibility for miniupnpc 2.2.8 2024-06-18 12:24:48 +00:00
mapport.h
memusage.h
merkleblock.cpp [clang-tidy] Enable the misc-no-recursion check 2024-04-07 14:04:45 +01:00
merkleblock.h
net.cpp Merge bitcoin/bitcoin#30396: random: add benchmarks and drop unnecessary Shuffle function 2024-07-09 17:52:47 -04:00
net.h random: drop ad-hoc Shuffle in favor of std::shuffle 2024-07-06 09:06:36 -04:00
net_permissions.cpp util: move fees.h and error.h to common/messages.h 2024-05-16 10:16:08 -05:00
net_permissions.h
net_processing.cpp Merge bitcoin/bitcoin#29996: Assumeutxo: bugfix on loadtxoutset with a divergent chain + test 2024-07-10 15:18:33 -04:00
net_processing.h Merge bitcoin/bitcoin#29575: net_processing: make any misbehavior trigger immediate discouragement 2024-06-20 13:28:38 -04:00
net_types.cpp rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
net_types.h
netaddress.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
netaddress.h random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
netbase.cpp refactor: use #ifdef HAVE_SOCKADDR_UN 2024-06-21 09:43:46 +01:00
netbase.h netbase: extend CreateSock() to support creating arbitrary sockets 2024-06-14 14:23:50 +02:00
netgroup.cpp
netgroup.h
netmessagemaker.h
noui.cpp
noui.h
outputtype.cpp fix incorrect multisig redeem script size limit for segwit 2024-05-03 14:20:44 -03:00
outputtype.h fix incorrect multisig redeem script size limit for segwit 2024-05-03 14:20:44 -03:00
pow.cpp
pow.h
prevector.h
protocol.cpp
protocol.h Merge bitcoin/bitcoin#29421: net: make the list of known message types a compile time constant 2024-05-21 13:59:33 -04:00
psbt.cpp util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
psbt.h Merge bitcoin/bitcoin#29855: psbt: Check non witness utxo outpoint early 2024-07-08 13:56:52 -04:00
pubkey.cpp crypto: add NUMS_H const 2024-05-14 10:24:31 +02:00
pubkey.h crypto: add NUMS_H const 2024-05-14 10:24:31 +02:00
random.cpp random: replace construct/assign with explicit Reseed() 2024-07-01 12:39:57 -04:00
random.h random: drop ad-hoc Shuffle in favor of std::shuffle 2024-07-06 09:06:36 -04:00
randomenv.cpp randomenv: use ifdef over if 2024-06-21 09:42:32 +01:00
randomenv.h
rest.cpp rest: don't copy data when sending binary response 2024-06-26 06:47:30 +03:00
rest.h
reverse_iterator.h
scheduler.cpp
scheduler.h
serialize.h Merge bitcoin/bitcoin#28929: serialization: Support for multiple parameters 2024-05-15 15:09:56 -04:00
signet.cpp refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
signet.h
span.h
streams.cpp Add AutoFile::seek and tell 2024-04-01 14:37:24 -04:00
streams.h Add AutoFile::seek and tell 2024-04-01 14:37:24 -04:00
sync.cpp util: avoid using thread_local variable that has a destructor 2024-05-16 18:16:46 +02:00
sync.h
threadsafety.h
tinyformat.h
torcontrol.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
torcontrol.h
txdb.cpp
txdb.h
txmempool.cpp random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
txmempool.h [[refactor]] Check CTxMemPool options in constructor 2024-05-17 23:37:25 +02:00
txorphanage.cpp scripted-diff: Replace nNextSweep with m_next_sweep 2024-05-29 09:02:07 -07:00
txorphanage.h Don't use iterator addresses in IteratorComparator 2024-06-19 10:14:31 +01:00
txrequest.cpp random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
txrequest.h
uint256.cpp
uint256.h
undo.h
validation.cpp Merge bitcoin/bitcoin#30395: rpc: Use untranslated error strings in loadtxoutset 2024-07-09 15:11:54 -04:00
validation.h Merge bitcoin/bitcoin#30141: kernel: De-globalize validation caches 2024-07-08 12:14:12 -04:00
validationinterface.cpp
validationinterface.h
versionbits.cpp
versionbits.h
walletinitinterface.h