dash/src
fanquake db4c8cf41e Merge #15305: [validation] Crash if disconnecting a block fails
a47df13471e3168e2e02023fb20cdf2414141b36 [qa] Test disconnect block failure -> shutdown (Suhas Daftuar)
4433ed0f730cfd60eeba3694ff3c283ce2c0c8ee [validation] Crash if disconnecting a block fails (Suhas Daftuar)

Pull request description:

  If we're unable to disconnect a block during normal operation, then that is a
  failure of our local system (such as disk failure) or the chain that we are on
  (eg CVE-2018-17144), but cannot be due to failure of the (more work) chain that
  we're trying to validate.

  We should abort rather than stay on a less work chain.

  Fixes #14341.

ACKs for top commit:
  practicalswift:
    utACK a47df13471e3168e2e02023fb20cdf2414141b36
  TheBlueMatt:
    utACK a47df13471e3168e2e02023fb20cdf2414141b36. Didn't bother to review the test in detail, it looked fine. Debated whether invalidateblock should ever crash the node, but *not* crashing in the case of hitting a pruned block (which is the only change here) is clearly better, even if there are other cases I'd argue we should crash in.
  ryanofsky:
    utACK a47df13471e3168e2e02023fb20cdf2414141b36. Only change since last review is new comment.
  promag:
    ACK a47df1347, it takes awhile to quit (RPC connection timeouts) but that's unrelated - hope to fix that soon.
  fanquake:
    ACK a47df13471e3168e2e02023fb20cdf2414141b36

Tree-SHA512: 4dec8cef6e7dbbe513c138fc5821a7ceab855e603ece3c16185b51a3830ab7ebbc844a28827bf64e75326f45325991dcb672f13bd7baede53304f27289c4af8d
2021-07-12 20:16:37 -05:00
..
bench bench: adapt bls_dkg tests to nanobench 2021-07-05 18:28:58 +05:30
bls Fix data races in bls_worker and use ctpl_stl queue. (#4240) 2021-07-11 22:25:27 -05:00
coinjoin Use one global string for "CoinJoin" in gui related stuff (#4117) 2021-07-11 12:28:50 +03:00
compat Merge #15522: Document sizeof(size_t) assumptions and compiler assumptions in assumptions.h 2021-07-10 12:10:51 -05:00
config
consensus partial bitcoin#15638: Add several util units 2021-06-27 12:03:15 +05:30
crypto Merge #15950: Do not construct out-of-bound pointers in SHA2 code 2021-07-10 12:10:51 -05:00
evo merge bitcoin#20499: Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17) 2021-06-27 12:03:14 +05:30
governance Merge #13235: Break circular dependency: init -> * -> init by extracting shutdown.h 2021-07-02 00:42:18 +03:00
immer
index Merge #13235: Break circular dependency: init -> * -> init by extracting shutdown.h 2021-07-02 00:42:18 +03:00
interfaces Merge #13083: Add compile time checking for cs_main runtime locking assertions 2021-07-07 16:30:58 -04:00
leveldb Merge #13925: Merge leveldb subtree 2021-02-04 14:58:13 -06:00
llmq Fix data races in bls_worker and use ctpl_stl queue. (#4240) 2021-07-11 22:25:27 -05:00
logging merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
masternode Merge #13235: Break circular dependency: init -> * -> init by extracting shutdown.h 2021-07-02 00:42:18 +03:00
node merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
obj
obj-test
policy Merge #14103: docs: Fix broken Doxygen comments 2021-07-02 11:39:23 -04:00
primitives Merge pull request #4226 from PastaPastaPasta/backport-triv-pr6 2021-07-08 23:25:09 +03:00
qt Merge #16128: Delete error-prone CScript constructor only used with FindAndDelete 2021-07-12 20:16:37 -05:00
rpc Merge #16262: rpc: Allow shutdown while in generateblocks 2021-07-12 20:16:37 -05:00
script Merge #16128: Delete error-prone CScript constructor only used with FindAndDelete 2021-07-12 20:16:37 -05:00
secp256k1
support Merge #16158: Fix logic of memory_cleanse() on MSVC and clean up docs 2021-07-12 20:16:37 -05:00
test Merge #16422: test: remove redundant setup in addrman_tests 2021-07-12 20:16:37 -05:00
univalue Merge #14164: Update univalue subtree 2021-07-07 12:04:54 -04:00
util Fix data races in bls_worker and use ctpl_stl queue. (#4240) 2021-07-11 22:25:27 -05:00
wallet Use one global string for "CoinJoin" in gui related stuff (#4117) 2021-07-11 12:28:50 +03:00
zmq merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
.clang-format
addrdb.cpp Merge #16212: addrdb: Avoid eating inodes - remove temporary files created by SerializeFileDB in case of errors 2021-07-12 20:16:37 -05:00
addrdb.h Merge #17850: Convert addrdb/addrman to new serialization 2021-04-18 17:02:40 -04:00
addressindex.h
addrman.cpp Merge #15486: [addrman, net] Ensure tried collisions resolve, and allow feeler connections to existing outbound netgroups 2021-06-26 11:23:42 -05:00
addrman.h merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
amount.h Merge #14244: amount: Move CAmount CENT to unit test header 2021-07-01 16:57:02 -05:00
arith_uint256.cpp Merge #14510: Avoid triggering undefined behaviour in base_uint<BITS>::bits() 2021-07-01 17:20:18 -05:00
arith_uint256.h Merge #14838: Use const in COutPoint class 2021-07-08 11:57:10 -05:00
attributes.h merge bitcoin#20499: Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17) 2021-06-27 12:03:14 +05:30
base58.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
base58.h merge bitcoin#20499: Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17) 2021-06-27 12:03:14 +05:30
batchedlogger.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
batchedlogger.h Merge #12954: util: Refactor logging code into a global object 2021-05-25 14:09:35 +03:00
bech32.cpp partial bitcoin#16889: Add some general std::vector utility functions 2021-06-27 12:03:14 +05:30
bech32.h Partial merge bitcoin#11167: Full BIP173 (Bech32) support 2021-01-08 22:35:13 +03:00
bip39_english.h
bip39.cpp
bip39.h
blockencodings.cpp merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
blockencodings.h merge #18635: Replace -Wthread-safety-analysis with -Wthread-safety 2021-06-10 14:35:05 +05:30
blockfilter.cpp merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
blockfilter.h merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
bloom.cpp Merge #13948: trivial: Removes unsed CBloomFilter constructor. 2021-06-29 22:18:54 -04:00
bloom.h Merge #13948: trivial: Removes unsed CBloomFilter constructor. 2021-06-29 22:18:54 -04:00
cachemap.h Other Dash-specific serializations 2021-05-28 12:31:13 +03:00
cachemultimap.h Other Dash-specific serializations 2021-05-28 12:31:13 +03:00
chain.cpp
chain.h Merge #13974: [trivial] Fix typo in CDiskBlockPos struct's ToString 2021-07-01 16:33:23 -05:00
chainparams.cpp Merge #14149: doc: Remove misleading checkpoints comment in CMainParams 2021-07-07 12:04:54 -04:00
chainparams.h Make recently added help strings dynamic, add one missing string (#3996) 2021-02-23 01:46:40 +03:00
chainparamsbase.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
chainparamsbase.h backport bitcoin#13190: Have gArgs handle printing help 2021-03-19 18:00:24 +03:00
chainparamsseeds.h contrib|src: Update hard coded seeds (#4152) 2021-05-13 12:31:45 +03:00
checkpoints.cpp Merge bitcoin#11041 Add LookupBlockIndex 2020-12-15 11:20:19 -06:00
checkpoints.h Merge bitcoin#11041 Add LookupBlockIndex 2020-12-15 11:20:19 -06:00
checkqueue.h merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
clientversion.cpp Adjust version formatting and add formatted version to rpc (#3908) 2021-01-11 20:34:42 +01:00
clientversion.h
coins.cpp merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
coins.h merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
compat.h Merge #14031: Make IS_TRIVIALLY_CONSTRUCTIBLE consistent on GCC < 5, don't patch clang 2021-07-01 16:33:23 -05:00
compressor.cpp Merge #12752: Move compressor utility functions out of class 2021-04-18 17:10:05 -04:00
compressor.h Merge #17957: Convert compression.h to new serialization framework 2021-04-18 17:10:25 -04:00
core_io.h merge bitcoin#20499: Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17) 2021-06-27 12:03:14 +05:30
core_memusage.h
core_read.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
core_write.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
ctpl_stl.h Fix data races in bls_worker and use ctpl_stl queue. (#4240) 2021-07-11 22:25:27 -05:00
cuckoocache.h Merge #12770: Use explicit casting in cuckoocache's compute_hashes(...) to clarify integer conversion 2020-11-01 01:58:42 -04:00
cxxtimer.hpp
dash-cli-res.rc
dash-cli.cpp Merge pull request #4226 from PastaPastaPasta/backport-triv-pr6 2021-07-08 23:25:09 +03:00
dash-tx-res.rc
dash-tx.cpp Merge pull request #4226 from PastaPastaPasta/backport-triv-pr6 2021-07-08 23:25:09 +03:00
dashd-res.rc
dashd.cpp Merge #13872: [docs] Reformat -help output for help2man 2021-07-02 12:59:29 +03:00
dbwrapper.cpp Merge #15880: utils and libraries: Replace deprecated Boost Filesystem functions 2021-07-10 12:10:51 -05:00
dbwrapper.h merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
dsnotificationinterface.cpp instantsend: Use NotifyEntryRemoved signal instead of calling CInstantSendManager::TransactionRemovedFromMempool from CTxMemPool::removeUnchecked directly (#4160) 2021-05-19 01:02:31 +02:00
dsnotificationinterface.h instantsend: Use NotifyEntryRemoved signal instead of calling CInstantSendManager::TransactionRemovedFromMempool from CTxMemPool::removeUnchecked directly (#4160) 2021-05-19 01:02:31 +02:00
flat-database.h merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
fs.cpp Merge #13159: Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) 2021-07-02 11:39:23 -04:00
fs.h Merge #15880: utils and libraries: Replace deprecated Boost Filesystem functions 2021-07-10 12:10:51 -05:00
hash.cpp merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
hash.h merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
hdchain.cpp Merge #12924: Fix hdmaster-key / seed-key confusion (scripted diff) 2021-06-28 02:00:48 +03:00
hdchain.h Other Dash-specific serializations 2021-05-28 12:31:13 +03:00
httprpc.cpp Merge #13534: Don't assert(foo()) where foo() has side effects 2021-06-28 22:09:56 -04:00
httprpc.h
httpserver.cpp Merge pull request #4225 from PastaPastaPasta/backport-triv-pr5 2021-07-04 00:07:27 +03:00
httpserver.h Merge #13774: Return void instead of bool for functions that cannot fail 2021-07-02 12:59:28 +03:00
indirectmap.h
init.cpp Merge #12980: Allow quicker shutdowns during LoadBlockIndex() 2021-07-12 17:11:08 -05:00
init.h Merge #13235: Break circular dependency: init -> * -> init by extracting shutdown.h 2021-07-02 00:42:18 +03:00
keepass.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
keepass.h Update copyright (#4115) 2021-04-20 22:33:02 +03:00
key_io.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
key_io.h Merge #11372: Address encoding cleanup 2021-01-08 22:35:34 +03:00
key.cpp Merge #13666: Always create signatures with Low R values 2021-07-06 20:29:32 +03:00
key.h Merge #13666: Always create signatures with Low R values 2021-07-06 20:29:32 +03:00
keystore.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
keystore.h Merge #13627: Free keystore.h from file scope level type aliases 2020-12-18 12:55:45 -06:00
limitedmap.h
logging.cpp Merge #13982: refactor: use fs:: over boost::filesystem:: 2021-07-02 10:38:08 -04:00
logging.h Merge pull request #4191 from kittywhiskers/checkqueue 2021-06-26 16:08:02 +03:00
Makefile.am Fix data races in bls_worker and use ctpl_stl queue. (#4240) 2021-07-11 22:25:27 -05:00
Makefile.bench.include merge #18011: Replace current benchmarking framework with nanobench 2021-07-05 18:28:55 +05:30
Makefile.leveldb.include bitcoin#16710: Enable -Wsuggest-override if available 2021-06-17 19:54:52 +05:30
Makefile.qt.include Merge #11491: [gui] Add proxy icon in statusbar 2021-07-06 19:50:27 +03:00
Makefile.qttest.include Merge #12830: [qt] [tests] Clarify address book error messages, add tests 2021-05-23 01:24:26 +03:00
Makefile.test.include Merge #13355: Fix "gmake check" under OpenBSD 6.3 (probably *BSD): Avoid using GNU grep specific regexp handling 2021-06-28 02:00:51 +03:00
memusage.h
merkleblock.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
merkleblock.h partial merge #18317: Serialization improvements step 6 (all except wallet/gui) 2021-05-28 11:39:24 +03:00
messagesigner.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
messagesigner.h Update copyright (#4115) 2021-04-20 22:33:02 +03:00
miner.cpp Merge #13554: Remove unused function arguments 2021-07-02 12:59:28 +03:00
miner.h
net_processing.cpp Merge #16188: net: Document what happens to getdata of unknown type 2021-07-12 20:16:37 -05:00
net_processing.h Merge #13083: Add compile time checking for cs_main runtime locking assertions 2021-07-07 16:30:58 -04:00
net.cpp Merge pull request #4225 from PastaPastaPasta/backport-triv-pr5 2021-07-04 00:07:27 +03:00
net.h Merge #13774: Return void instead of bool for functions that cannot fail 2021-07-02 12:59:28 +03:00
netaddress.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
netaddress.h merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
netbase.cpp Merge #16412: net: Make poll in InterruptibleRecv only filter for POLLIN events. 2021-07-12 20:16:37 -05:00
netbase.h Merge #12569: net: Increase signal-to-noise ratio in debug.log by adjusting log level when logging failed non-manual connect():s 2020-11-17 14:32:36 -05:00
netfulfilledman.cpp Merge #13235: Break circular dependency: init -> * -> init by extracting shutdown.h 2021-07-02 00:42:18 +03:00
netfulfilledman.h Other Dash-specific serializations 2021-05-28 12:31:13 +03:00
netmessagemaker.h
noui.cpp Merge #13961: util: Replace boost::signals2 with std::function 2021-06-28 22:09:56 -04:00
noui.h
pow.cpp
pow.h
prevector.h Merge pull request #4235 from PastaPastaPasta/backport-triv-pr7 2021-07-10 21:46:25 +03:00
protocol.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
protocol.h merge #19954: Complete the BIP155 implementation and upgrade to TORv3 2021-05-29 23:24:52 +03:00
pubkey.cpp
pubkey.h Merge #13194: Remove template matching and pseudo opcodes 2021-06-28 02:00:49 +03:00
random.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
random.h Partial merge bitcoin#14624: Some simple improvements to the RNG code (#3923) 2021-01-14 13:46:16 -06:00
rest.cpp Merge #14353: REST: add blockhash call, fetch blockhash by height 2021-06-28 13:40:57 -05:00
reverse_iterator.h
reverselock.h
saltedhasher.cpp Update copyright (#4115) 2021-04-20 22:33:02 +03:00
saltedhasher.h merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
scheduler.cpp
scheduler.h Merge #15380: trivial: correct parameter name in comments 2021-06-28 19:05:22 -05:00
serialize.h merge #19954: Complete the BIP155 implementation and upgrade to TORv3 2021-05-29 23:24:52 +03:00
shutdown.cpp Merge #13235: Break circular dependency: init -> * -> init by extracting shutdown.h 2021-07-02 00:42:18 +03:00
shutdown.h Merge #13235: Break circular dependency: init -> * -> init by extracting shutdown.h 2021-07-02 00:42:18 +03:00
span.h Partial #19326: Simplify hash.h interface using Spans 2021-05-20 10:15:17 +05:30
spentindex.h Other Dash-specific serializations 2021-05-28 12:31:13 +03:00
spork.cpp Update copyright (#4115) 2021-04-20 22:33:02 +03:00
spork.h merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
stacktraces.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
stacktraces.h Update copyright (#4115) 2021-04-20 22:33:02 +03:00
statsd_client.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
statsd_client.h trivial: misc. trivial refactoring (#4104) 2021-04-15 13:58:04 -04:00
streams.h Merge #14838: Use const in COutPoint class 2021-07-08 11:57:10 -05:00
sync.cpp Merge #15233: Prevent mutex lock fail even if --enable-debug 2021-06-28 13:40:58 -05:00
sync.h merge bitcoin#17073: PASTE macros to util/macros.h 2021-06-27 12:03:15 +05:30
threadinterrupt.cpp merge #11640: Make LOCK, LOCK2, TRY_LOCK work with CWaitableCriticalSection 2021-06-06 16:22:17 +05:30
threadinterrupt.h merge #11599: Small locking rename 2021-06-06 16:22:17 +05:30
threadsafety.h Merge #14129: Trivial: update clang thread-safety docs url 2021-07-01 16:33:23 -05:00
timedata.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
timedata.h
tinyformat.h Merge #17682: Update tinyformat to upstream 2021-05-20 10:15:17 +05:30
torcontrol.cpp Merge #16405: fix: tor: Call event_base_loopbreak from the event's callback 2021-07-12 20:16:37 -05:00
torcontrol.h
txdb.cpp Merge #12980: Allow quicker shutdowns during LoadBlockIndex() 2021-07-12 17:11:08 -05:00
txdb.h Merge #13774: Return void instead of bool for functions that cannot fail 2021-07-02 12:59:28 +03:00
txmempool.cpp Merge #16056: mempool: remove unused magic number from consistency check 2021-07-12 17:11:12 -05:00
txmempool.h Merge #13774: Return void instead of bool for functions that cannot fail 2021-07-02 12:59:28 +03:00
ui_interface.cpp Merge #13634: ui: Compile boost::signals2 only once 2021-06-28 22:09:56 -04:00
ui_interface.h Merge #13634: ui: Compile boost::signals2 only once 2021-06-28 22:09:56 -04:00
uint256.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
uint256.h Partial #19326: Simplify hash.h interface using Spans 2021-05-20 10:15:17 +05:30
undo.h merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
unordered_lru_cache.h Update copyright (#4115) 2021-04-20 22:33:02 +03:00
validation.cpp Merge #15305: [validation] Crash if disconnecting a block fails 2021-07-12 20:16:37 -05:00
validation.h Merge #13083: Add compile time checking for cs_main runtime locking assertions 2021-07-07 16:30:58 -04:00
validationinterface.cpp Merge #13083: Add compile time checking for cs_main runtime locking assertions 2021-07-07 16:30:58 -04:00
validationinterface.h Merge #13083: Add compile time checking for cs_main runtime locking assertions 2021-07-07 16:30:58 -04:00
version.h merge #19845: add support to (un)serialize as ADDRv2 2021-05-29 23:24:02 +03:00
versionbits.cpp Rename bit 6 from "v17" to "dip0020" (#4142) 2021-05-07 18:36:30 +02:00
versionbits.h
walletinitinterface.h backport bitcoin#13190: Have gArgs handle printing help 2021-03-19 18:00:24 +03:00
warnings.cpp merge bitcoin#14555: Move util files to directory 2021-06-27 12:03:13 +05:30
warnings.h