0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-18 11:57:37 -05:00
bitcoin-bitcoin-core/src
Ava Chow 90a5786bba
Merge bitcoin/bitcoin#30678: wallet: Write best block to disk before backup
f20fe33e94 test: Add basic balance coverage to wallet_assumeutxo.py (Fabian Jahr)
037b101e80 test: Add coverage for best block locator write in wallet_backup (Fabian Jahr)
31c0df0389 wallet: migration, write best locator before unloading wallet (furszy)
7e3dbe4180 wallet: Write best block to disk before backup (Fabian Jahr)

Pull request description:

  I discovered that we don't write the best block to disk when trying to explain the behavior described here: https://github.com/bitcoin/bitcoin/pull/30455#discussion_r1719951882

  In the context of that test, the behavior is confusing and I think it also shows that one of the already existing tests in `wallet_assumeutxo.py` doesn't actually test what it says. It only fails because the best block isn't written and actually, the height of the backup that is loaded is at the snapshot height during backup. So it really shouldn't fail since it's past the background sync blocks already.

  I'm not sure if this is super relevant in practice though so I am first looking for concept ACKs on the `BackupWallet` code change. Either way, I think this behavior should be documented better if it is left as is and the test should be changed.

ACKs for top commit:
  achow101:
    ACK f20fe33e94
  furszy:
    ACK f20fe33

Tree-SHA512: bb384a940df5c942fffe2eb06314ade4fc5d9b924012bfef3b1c456c4182a30825d1e137d8ae561d93d3a8a2f4d1c1ffe568132d20fa7d04844f1e289ab4a28b
2024-09-23 16:03:04 -04:00
..
bench Merge bitcoin/bitcoin#30884: streams: cache file position within AutoFile 2024-09-16 23:09:16 -04:00
common multiprocess: Add -ipcbind option to bitcoin-node 2024-09-06 09:08:10 -04:00
compat netbase: refactor CreateSock() to accept sa_family_t 2024-03-01 13:13:07 -05:00
config
consensus doc: fix a few simple codespell warnings 2024-08-28 18:42:10 +02:00
crc32c Update crc32c subtree to latest upstream master 2024-02-27 18:28:19 +00:00
crypto cmake: Build bitcoin_crypto library 2024-08-16 19:27:38 +01:00
index refactor: rename BlockKey to BlockRef 2024-09-17 09:14:15 +02:00
init multiprocess: Add -ipcbind option to bitcoin-node 2024-09-06 09:08:10 -04:00
interfaces Merge bitcoin/bitcoin#30409: Introduce waitTipChanged() mining interface, replace RPCNotifyBlockChange, drop CRPCSignals & g_best_block 2024-09-23 15:40:33 -04:00
ipc multiprocess: Add unit tests for connect, serve, and listen functions 2024-09-06 09:08:10 -04:00
kernel Merge bitcoin/bitcoin#30765: refactor: Allow CScript's operator<< to accept spans, not just vectors 2024-09-20 15:16:53 -04:00
leveldb Update leveldb-subtree subtree to latest upstream 2024-06-13 13:17:57 +01:00
logging scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
minisketch Update minisketch subtree to latest master 2024-06-12 14:38:39 +01:00
node Merge bitcoin/bitcoin#30409: Introduce waitTipChanged() mining interface, replace RPCNotifyBlockChange, drop CRPCSignals & g_best_block 2024-09-23 15:40:33 -04:00
policy scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
primitives tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
qt Merge bitcoin/bitcoin#30875: doc: fixed inconsistencies in documentation between autotools to cmake change 2024-09-18 18:44:02 +01:00
rpc Remove unused g_best_block 2024-09-17 09:27:45 +02:00
script Merge bitcoin/bitcoin#30765: refactor: Allow CScript's operator<< to accept spans, not just vectors 2024-09-20 15:16:53 -04:00
secp256k1 Update secp256k1 subtree to latest master 2024-09-07 18:15:41 +01:00
support cleanse: Use SecureZeroMemory for mingw-w64 (release) builds 2024-07-24 09:57:49 +01:00
test Merge bitcoin/bitcoin#30409: Introduce waitTipChanged() mining interface, replace RPCNotifyBlockChange, drop CRPCSignals & g_best_block 2024-09-23 15:40:33 -04:00
univalue build: Remove Autotools-based build system 2024-08-30 21:31:39 +01:00
util Merge bitcoin/bitcoin#30875: doc: fixed inconsistencies in documentation between autotools to cmake change 2024-09-18 18:44:02 +01:00
wallet Merge bitcoin/bitcoin#30678: wallet: Write best block to disk before backup 2024-09-23 16:03:04 -04:00
zmq scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
.clang-format refactor: Print verbose serialize compiler error messages 2023-12-15 15:20:54 +01:00
.clang-tidy tidy: add clang-tidy modernize-use-starts-ends-with check 2024-09-14 20:33:32 +03:00
addrdb.cpp streams: remove AutoFile::Get() entirely 2024-09-13 21:59:29 -04:00
addrdb.h Use serialization parameters for CAddress serialization 2023-09-05 10:13:25 +02:00
addresstype.cpp policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
addresstype.h policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
addrman.cpp Merge bitcoin/bitcoin#30568: addrman: change internal id counting to int64_t 2024-09-20 12:55:22 -04:00
addrman.h addrman: change Select to support multiple networks 2024-09-10 12:58:54 -03:00
addrman_impl.h Merge bitcoin/bitcoin#30568: addrman: change internal id counting to int64_t 2024-09-20 12:55:22 -04:00
arith_uint256.cpp refactor: Remove unused and fragile string interface from arith_uint256 2023-11-21 17:37:25 +01:00
arith_uint256.h doc + test: Correct uint256 hex string endianness 2024-08-03 21:59:54 +02:00
attributes.h Introduce platform-agnostic ALWAYS_INLINE macro 2023-05-04 20:57:51 +01:00
banman.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
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 fuzz: replace hardcoded numbers for bech32 limits 2024-08-06 11:03:31 +02:00
bech32.h fuzz: replace hardcoded numbers for bech32 limits 2024-08-06 11:03:31 +02:00
bip324.cpp net: merge V2Transport constructors, move key gen 2023-09-10 16:11:52 -04:00
bip324.h net: merge V2Transport constructors, move key gen 2023-09-10 16:11:52 -04:00
bitcoin-chainstate.cpp kernel: Move background load thread to node context 2024-09-13 16:10:31 +02:00
bitcoin-cli-res.rc
bitcoin-cli.cpp rpc, cli: improve error message on multiwallet mode 2024-09-17 16:22:12 -03:00
bitcoin-tx-res.rc
bitcoin-tx.cpp refactor: Replace ParseHashStr with FromHex 2024-07-24 17:40:18 +02: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 testnet: Introduce Testnet4 2024-08-06 01:38:10 +02:00
bitcoind-res.rc
bitcoind.cpp multiprocess: Add -ipcbind option to bitcoin-node 2024-09-06 09:08:10 -04:00
blockencodings.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
blockencodings.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
blockfilter.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
blockfilter.h Remove unused includes from blockfilter.h 2023-08-17 18:28:15 +02:00
chain.cpp
chain.h doc: update NeedsRedownload() comment 2024-09-17 09:54:18 +02:00
chainparams.cpp testnet: Introduce Testnet4 2024-08-06 01:38:10 +02:00
chainparams.h test: Throw error when -signetchallenge is non-hex 2023-05-25 19:24:05 +02:00
chainparamsbase.cpp Deduplicate list of chain strings in RPC help texts 2024-08-13 14:00:33 -03:00
chainparamsbase.h Deduplicate list of chain strings in RPC help texts 2024-08-13 14:00:33 -03:00
chainparamsseeds.h seeds: Regenerate mainnet seeds 2024-08-27 07:00:27 +02:00
checkqueue.h refactor: Make CCheckQueue non-copyable and non-movable explicitly 2023-10-03 10:52:17 +01:00
clientversion.cpp build: drop superfluous HAVE_BUILD_INFO define 2024-09-19 17:59:16 +02:00
clientversion.h scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
cluster_linearize.h clusterlin: only start/use search when enough iterations left 2024-09-12 15:15:36 -04:00
CMakeLists.txt build: drop superfluous HAVE_BUILD_INFO define 2024-09-19 17:59:16 +02:00
coins.cpp Reduce cache lookups in CCoinsViewCache::FetchCoin 2024-08-08 22:51:24 +02:00
coins.h coins: move Sync logic to CoinsViewCacheCursor 2024-08-05 22:34:35 -04:00
compressor.cpp Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
compressor.h refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
core_io.h refactor: Replace ParseHashStr with FromHex 2024-07-24 17:40:18 +02:00
core_memusage.h
core_read.cpp refactor: Replace ParseHashStr with FromHex 2024-07-24 17:40:18 +02: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 scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
dbwrapper.h dbwrapper: Use DataStream for batch operations 2023-09-12 12:07:39 +02:00
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 refactor: Remove Span operator==, Use std::ranges::equal 2024-08-13 07:44:31 +02:00
external_signer.h refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
flatfile.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
flatfile.h refactor: Add FlatFileSeq member variables in BlockManager 2024-07-24 09:39:35 +02:00
hash.cpp crypto, hash: replace custom rotl32 with std::rotl 2024-01-05 17:12:38 +01:00
hash.h Include version.h in fewer places 2023-11-16 11:36:22 +10:00
headerssync.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
headerssync.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
httprpc.cpp Merge bitcoin/bitcoin#30401: fix: increase consistency of rpcauth parsing 2024-09-09 12:29:17 -04:00
httprpc.h
httpserver.cpp fix: increase rpcbind check robustness 2024-09-17 21:47:33 -04:00
httpserver.h Merge bitcoin/bitcoin#30406: refactor: modernize-use-equals-default 2024-07-11 19:08:46 +01: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#30409: Introduce waitTipChanged() mining interface, replace RPCNotifyBlockChange, drop CRPCSignals & g_best_block 2024-09-23 15:40:33 -04:00
init.h multiprocess: Add -ipcbind option to bitcoin-node 2024-09-06 09:08:10 -04:00
key.cpp refactor: remove un-tested early returns 2024-08-04 08:52:22 +02:00
key.h refactor: move SignSchnorr to KeyPair 2024-08-04 08:51:36 +02:00
key_io.cpp policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
key_io.h Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
logging.cpp doc: move-only logging warning 2024-09-12 19:33:46 +02:00
logging.h log: Use ConstevalFormatString 2024-09-17 18:21:23 +02:00
mapport.cpp upnp: add compatibility for miniupnpc 2.2.8 2024-06-18 12:24:48 +00:00
mapport.h
memusage.h add std::list to memusage 2023-09-13 11:37:45 +01:00
merkleblock.cpp [clang-tidy] Enable the misc-no-recursion check 2024-04-07 14:04:45 +01:00
merkleblock.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
net.cpp Merge bitcoin/bitcoin#29436: net: call Select with reachable networks in ThreadOpenConnections 2024-09-16 16:49:25 -04:00
net.h assumeUTXO: fix peers disconnection during sync 2024-09-10 18:08:32 -03: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 Accept "in" and "out" flags to -whitelist to allow whitelisting manual connections 2024-02-28 10:05:56 -03:00
net_processing.cpp Merge bitcoin/bitcoin#30661: fuzz: Test headers pre-sync through p2p 2024-09-16 13:59:22 -04:00
net_processing.h add clarification in comment 2024-09-20 15:00:19 +01:00
net_types.cpp rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
net_types.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
netaddress.cpp refactor: Remove Span operator==, Use std::ranges::equal 2024-08-13 07:44:31 +02:00
netaddress.h random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
netbase.cpp Merge bitcoin/bitcoin#30868: refactor: add clang-tidy modernize-use-starts-ends-with check 2024-09-16 15:47:04 -04:00
netbase.h net: add All() in ReachableNets 2024-09-10 11:20:40 -03:00
netgroup.cpp Merge bitcoin/bitcoin#27581: net: Continuous ASMap health check 2023-12-06 11:22:42 -05:00
netgroup.h net: Add continuous ASMap health check logging 2023-12-02 22:03:08 +01:00
netmessagemaker.h refactor: NetMsg::Make() without nVersion 2023-11-20 14:02:27 +01:00
noui.cpp node: Use log levels in noui_ThreadSafeMessageBox 2024-03-21 16:41:16 +01:00
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 Add FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION in PoW check 2024-09-02 15:43:33 +01:00
pow.h Add FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION in PoW check 2024-09-02 15:43:33 +01:00
prevector.h prevector: avoid GCC bogus warnings in insert method 2024-09-11 17:41:26 +02:00
protocol.cpp protocol: make message types constexpr 2024-02-28 18:03:23 +01:00
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#30406: refactor: modernize-use-equals-default 2024-07-11 19:08:46 +01:00
pubkey.cpp refactor: Hand-replace some ParseHex -> ""_hex 2024-08-28 19:11:59 +02:00
pubkey.h refactor: Make XOnlyPubKey tolerate constexpr std::arrays 2024-08-28 19:09:51 +02:00
random.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
random.h random: drop ad-hoc Shuffle in favor of std::shuffle 2024-07-06 09:06:36 -04:00
randomenv.cpp Fix MSVC warning C4273 "inconsistent dll linkage" 2024-07-19 22:01:01 +01:00
randomenv.h
rest.cpp rest: improve error when only header of a block is available. 2024-09-13 10:50:43 -04:00
rest.h
scheduler.cpp scripted-diff: Rename SingleThreadedSchedulerClient to SerialTaskRunner 2024-02-15 14:43:14 +01:00
scheduler.h kernel: Remove dependency on CScheduler 2024-02-16 17:12:52 +01:00
serialize.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
signet.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
signet.h
span.h refactor: Remove Span operator==, Use std::ranges::equal 2024-08-13 07:44:31 +02:00
streams.cpp streams: remove unused code 2024-09-19 07:33:02 -04:00
streams.h streams: reorder/document functions 2024-09-19 07:57:45 -04:00
sync.cpp util: avoid using thread_local variable that has a destructor 2024-05-16 18:16:46 +02:00
sync.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
threadsafety.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
tinyformat.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
torcontrol.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
torcontrol.h doc, refactor: Changing -torcontrol help to specify that a default port is used 2023-08-17 23:58:47 -05:00
txdb.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
txdb.h Merge bitcoin/bitcoin#28358: Drop -dbcache limit 2024-09-16 15:56:02 -04:00
txmempool.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
txmempool.h Revert "build: work around issue with Boost <= 1.80 and Clang >= 18" 2024-09-06 15:57:00 +02:00
txorphanage.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
txorphanage.h Merge bitcoin/bitcoin#30082: test: expand LimitOrphan and EraseForPeer coverage 2024-08-05 17:25:57 -04:00
txrequest.cpp Merge bitcoin/bitcoin#30194: refactor: use recommended type hiding on multi_index types 2024-08-07 20:00:28 +01:00
txrequest.h
uint256.cpp scripted-diff: Rename SetHex to SetHexDeprecated 2024-07-24 09:15:34 +02:00
uint256.h test: remove test-only uint256S 2024-09-06 17:36:18 +02:00
undo.h Include version.h in fewer places 2023-11-16 11:36:22 +10:00
validation.cpp Merge bitcoin/bitcoin#30409: Introduce waitTipChanged() mining interface, replace RPCNotifyBlockChange, drop CRPCSignals & g_best_block 2024-09-23 15:40:33 -04:00
validation.h Remove unused g_best_block 2024-09-17 09:27:45 +02:00
validationinterface.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
validationinterface.h [refactor] change ActiveTipChange to use CBlockIndex ref instead of ptr 2024-07-25 11:01:22 +01:00
versionbits.cpp
versionbits.h
walletinitinterface.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00