Page MenuHomePhabricator

always unpark even when -parkdeepreorg=0
ClosedPublic

Authored by markblundeberg on Jan 20 2020, 04:07.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABCabf0af027c00: always unpark even when -parkdeepreorg=0
Summary

The parked / parkedparent flags do get saved in the block index,
and so if we restart with -parkdeepreorg=0 we don't want to get
stuck in a situation where a chain gets permanently parked until
the user manually intervenes with unparkblock RPC.

Test Plan

ninja check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markblundeberg created this revision.Jan 20 2020, 04:07
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 20 2020, 04:07
markblundeberg added inline comments.
test/functional/abc-parkedchain.py
52 ↗(On Diff #15678)

Unfortunately all this stuff we're doing with node assumes that automatic unparking never happens. So the test currently fails here.

markblundeberg planned changes to this revision.Jan 20 2020, 04:09

Snippet of first build failure:

[04:10:43] :	 [Step 1/1]  [0m [0;34mrpc_users.py                            | ✓ Passed  | 2 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mrpc_zmq.py                              | ✓ Passed  | 1 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_abandonconflict.py               | ✓ Passed  | 4 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_basic.py                         | ✓ Passed  | 20 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_createwallet.py                  | ✓ Passed  | 1 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_createwallet.py --usecli         | ✓ Passed  | 1 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_disable.py                       | ✓ Passed  | 0 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_dump.py                          | ✓ Passed  | 2 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_encryption.py                    | ✓ Passed  | 4 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_groups.py                        | ✓ Passed  | 13 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_hd.py                            | ✓ Passed  | 3 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_import_rescan.py                 | ✓ Passed  | 4 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_importmulti.py                   | ✓ Passed  | 2 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_importprunedfunds.py             | ✓ Passed  | 2 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_keypool.py                       | ✓ Passed  | 3 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_keypool_topup.py                 | ✓ Passed  | 2 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_labels.py                        | ✓ Passed  | 3 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_listreceivedby.py                | ✓ Passed  | 11 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_listsinceblock.py                | ✓ Passed  | 3 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_listtransactions.py              | ✓ Passed  | 10 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_multiwallet.py                   | ✓ Passed  | 9 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_multiwallet.py --usecli          | ✓ Passed  | 10 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_resendwallettransactions.py      | ✓ Passed  | 1 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_txn_clone.py                     | ✓ Passed  | 2 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_txn_clone.py --mineblock         | ✓ Passed  | 3 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_txn_doublespend.py               | ✓ Passed  | 3 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_txn_doublespend.py --mineblock   | ✓ Passed  | 2 s
[04:10:43] :	 [Step 1/1]  [0m [0;34mwallet_zapwallettxes.py                 | ✓ Passed  | 2 s
[04:10:43] :	 [Step 1/1]  [0m [0;31mabc-parkedchain.py                      | ✖ Failed  | 0 s
[04:10:43] :	 [Step 1/1]  [0m [0;31m [1m
[04:10:43] :	 [Step 1/1] ALL                                     | ✖ Failed  | 429 s (accumulated) 
[04:10:43] :	 [Step 1/1]  [0m [0mRuntime: 97 s
[04:10:43] :	 [Step 1/1] 
[04:10:43] :	 [Step 1/1] [215/355] Running bitcoin-seeder test suite
[04:10:43] :	 [Step 1/1] PASSED: bitcoin-seeder test suite
[04:10:43] :	 [Step 1/1] [217/355] cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/contrib/devtools/chainparams && /usr/bin/python3 ./test_make_chainparams.py
[04:10:43] :	 [Step 1/1] .....
[04:10:43] :	 [Step 1/1] ----------------------------------------------------------------------
[04:10:43] :	 [Step 1/1] Ran 5 tests in 0.001s
[04:10:43] :	 [Step 1/1] 
[04:10:43] :	 [Step 1/1] OK
[04:10:43] :	 [Step 1/1] [242/355] Running bitcoin-qt test suite
[04:10:43] :	 [Step 1/1] PASSED: bitcoin-qt test suite
[04:10:43] :	 [Step 1/1] [350/355] Running bitcoin test suite
[04:10:43] :	 [Step 1/1] PASSED: bitcoin test suite
[04:10:43] :	 [Step 1/1] [352/355] Running secp256k1 test suite
[04:10:43] :	 [Step 1/1] PASSED: secp256k1 test suite
[04:10:43] :	 [Step 1/1] [354/355] Running leveldb test suite
[04:10:43] :	 [Step 1/1] PASSED: leveldb test suite
[04:10:43] :	 [Step 1/1] FAILED: test/CMakeFiles/check-functional 
[04:10:43] :	 [Step 1/1] cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/build/test && /usr/bin/python3 ./functional/test_runner.py
[04:10:43] :	 [Step 1/1] ninja: build stopped: subcommand failed.
[04:10:43]W:	 [Step 1/1] ++ print_sanitizers_log
[04:10:43]W:	 [Step 1/1] ++ for log in "${SAN_LOG_DIR}"/*.log.*
[04:10:43]W:	 [Step 1/1] ++ echo '*** Output of /tmp/sanitizer_logs/*.log.* ***'
[04:10:43]W:	 [Step 1/1] ++ cat '/tmp/sanitizer_logs/*.log.*'
[04:10:43] :	 [Step 1/1] *** Output of /tmp/sanitizer_logs/*.log.* ***
[04:10:43]W:	 [Step 1/1] cat: '/tmp/sanitizer_logs/*.log.*': No such file or directory
[04:10:43]W:	 [Step 1/1] Process exited with code 1
[04:10:44]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)

Each failure log is accessible here:
bitcoin_abc_tests: abc-parkedchain.py

markblundeberg added inline comments.Jan 20 2020, 04:13
src/validation.cpp
2573 ↗(On Diff #15678)

a possibility: we can change this from "-parkdeepreorg" to "-automaticunparking" (default True).

markblundeberg edited the summary of this revision. (Show Details)
markblundeberg removed a reviewer: Fabien.

add -automaticunparking option

markblundeberg added inline comments.Jan 26 2020, 02:30
src/validation.cpp
2657 ↗(On Diff #15787)

Not strictly in-scope, but I found this to be a very helpful log message when figuring out what is happening. Happy to move it to another diff if that is wanted.

deadalnix accepted this revision.Jan 27 2020, 00:21
This revision is now accepted and ready to land.Jan 27 2020, 00:21

rebase (conflict with hidden args changes in D5054)

typo switcing -> switching