Commit Graph

14341 Commits

Author SHA1 Message Date
Pieter Wuille 2dd6f80680 Add a test that all flags are softforks 2017-06-30 16:14:13 -07:00
Pieter Wuille 2851b77312 Make all script verification flags softforks 2017-06-30 16:14:13 -07:00
Wladimir J. van der Laan 2935b469ae
Merge #10192: Cache full script execution results in addition to signatures
e3f9c05 Add CheckInputs() unit tests (Suhas Daftuar)
a3543af Better document CheckInputs parameter meanings (Matt Corallo)
309ee1a Update -maxsigcachesize doc clarify init logprints for it (Matt Corallo)
b014668 Add CheckInputs wrapper CCoinsViewMemPool -> non-consensus-critical (Matt Corallo)
eada04e Do not print soft-fork-script warning with -promiscuousmempool (Matt Corallo)
b5fea8d Cache full script execution results in addition to signatures (Matt Corallo)
6d22b2b Pull script verify flags calculation out of ConnectBlock (Matt Corallo)

Tree-SHA512: 0c6c3c79c64fcb21e17ab60290c5c96d4fac11624c49f841a4201eec21cb480314c52a07d1e3abd4f9c764785cc57bfd178511f495aa0469addb204e96214fe4
2017-06-29 20:19:21 +02:00
Wladimir J. van der Laan 0c3542e5de
Merge #10660: Allow to cancel the txdb upgrade via splashscreen keypress 'q'
542ce6e Report [CANCELLED] instead of [DONE] when shut down during txdb upgrade (Jonas Schnelli)
83fbea3 Report txdb upgrade not more often then every 10% (Jonas Schnelli)
06c5b6e Show txdb upgrade progress in debug log (Jonas Schnelli)
316fcb5 Allow to cancel the txdb upgrade via splashscreen callback (Jonas Schnelli)
ae09d45 Allow to shut down during txdb upgrade (Jonas Schnelli)
00cb69b [Qt] allow to execute a callback during splashscreen progress (Jonas Schnelli)

Tree-SHA512: 23190f23f441bfd60821e49f8b3698a6bef97eb0e0ee659328e4a7395769ecd1616420eacc38aa1fa0ff62b9de5f13a0098dc798cdec6bff649575cefebc0db2
2017-06-29 19:55:21 +02:00
Jonas Schnelli 542ce6e246
Report [CANCELLED] instead of [DONE] when shut down during txdb upgrade 2017-06-29 17:48:13 +02:00
Jonas Schnelli 83fbea3f25
Report txdb upgrade not more often then every 10% 2017-06-29 17:48:13 +02:00
Jonas Schnelli 06c5b6edd3
Show txdb upgrade progress in debug log 2017-06-29 17:48:12 +02:00
Jonas Schnelli 316fcb5106
Allow to cancel the txdb upgrade via splashscreen callback 2017-06-29 17:48:12 +02:00
Jonas Schnelli ae09d4583b
Allow to shut down during txdb upgrade 2017-06-29 17:48:11 +02:00
Jonas Schnelli 00cb69bc86
[Qt] allow to execute a callback during splashscreen progress 2017-06-29 17:48:08 +02:00
MarcoFalke 65cc7aacfb
Merge #10556: Move stop/start functions from utils.py into BitcoinTestFramework
5ba83c1 [tests] fix nits. (John Newbery)
05b8c08 [tests] reorganize utils.py module (code move only) (John Newbery)
0d473c5 [tests] move mocktime property and functions to BitcoinTestFramework (John Newbery)
cad967a [tests] Move stop_node and start_node methods to BitcoinTestFramework (John Newbery)
f1fe536 [tests] fix flake8 warnings in test_framework.py and util.py (John Newbery)
37065d2 [tests] remove unused imports from utils.py (John Newbery)

Tree-SHA512: 461db412c57c4d0030e27fe3f78f17bcaf00b966f319a9e613460cca897508ff70a29db7138133fe1be8d447dad6702ba2778f9eddfe929016e560d71c20b09f
2017-06-29 17:38:09 +02:00
John Newbery 5ba83c1d43 [tests] fix nits.
Thanks to Marco Falke.
2017-06-29 15:06:38 +01:00
Wladimir J. van der Laan 4c72cc33eb
Merge #10673: [qt] Avoid potential null pointer dereference in TransactionView::exportClicked()
fd9599b [qt] Avoid potential null pointer dereference in TransactionView::exportClicked() (practicalswift)

Tree-SHA512: 33cbb65bd86aceb58918eb0a19e1727599a22285e7c89d4e7d3b2639c879dc8939708fd506006c6c092f624050d1131f997cc37f837cb980aa440f8abe5a3c18
2017-06-29 15:03:15 +02:00
John Newbery 05b8c081b4 [tests] reorganize utils.py module (code move only)
This commit re-organizes the utils.py module into logical sections.
2017-06-29 11:56:33 +01:00
John Newbery 0d473c539e [tests] move mocktime property and functions to BitcoinTestFramework 2017-06-29 11:55:23 +01:00
John Newbery cad967a892 [tests] Move stop_node and start_node methods to BitcoinTestFramework
This commit moves functions start_node, start_nodes, stop_node and
stop_nodes functions into the BitcoinTestFramework class. It also moves
the bitcoind_processes dict and coverage variables into BitcoinTestFramework.
2017-06-29 11:55:19 +01:00
John Newbery f1fe5368f1 [tests] fix flake8 warnings in test_framework.py and util.py 2017-06-29 11:19:06 +01:00
John Newbery 37065d2ed2 [tests] remove unused imports from utils.py 2017-06-29 11:16:32 +01:00
MarcoFalke 080ec52091
Merge #10688: contrib: Update laanwj key
3c85332 contrib: Update laanwj key (Wladimir J. van der Laan)

Tree-SHA512: c8cad76158850a3e480ccb58ee86c3dbb4e45ef67376173720c2520d3cb02c1c3e13b4e0acea3be6d90991e073db49aad2e185a87a09be194f1d1605b31b6ee4
2017-06-29 11:02:47 +02:00
Pieter Wuille 90a002ea64
Merge #10558: Address nits from per-utxo change
21d4afa12 Comment clarifications in coins.cpp (Alex Morcos)
3c8a9aeff Add belt-and-suspenders in DisconnectBlock (Alex Morcos)

Tree-SHA512: d83e12ed71674faaaaebc03ffa1e2276984c35a29db419268ac9e14a45b33ccab716e3606dff8cfe1dcee4bec6e4794d2ca90341f10d5684be80e3fee61addf8
2017-06-28 11:44:22 -07:00
Pieter Wuille 30c21306c1
Merge #10685: Clarify CCoinsViewMemPool documentation.
381b8fc36 Clarify CCoinsViewMemPool documentation. (Matt Corallo)

Tree-SHA512: 0d1520595a03ea4038b4119871d79dfc28a50f42ac7667b30a583805d4fe4b0480a6912b9b4f7660c7223778ef85f2f9d1870551383a35c5e8c88cd2935f59d3
2017-06-28 11:22:00 -07:00
Wladimir J. van der Laan d4e551adfe
Merge #10148: Use non-atomic flushing with block replay
176c021 [qa] Test non-atomic chainstate writes (Suhas Daftuar)
d6af06d Dont create pcoinsTip until after ReplayBlocks. (Matt Corallo)
eaca1b7 Random db flush crash simulator (Pieter Wuille)
0580ee0 Adapt memory usage estimation for flushing (Pieter Wuille)
013a56a Non-atomic flushing using the blockchain as replay journal (Pieter Wuille)
b3a279c [MOVEONLY] Move LastCommonAncestor to chain (Pieter Wuille)

Tree-SHA512: 47ccc62303f9075c44d2a914be75bd6969ff881a857a2ff1227f05ec7def6f4c71c46680c5a28cb150c814999526797dc05cf2701fde1369c06169f46eccddee
2017-06-28 18:26:41 +02:00
MarcoFalke 416af3edf5
Merge #10690: [qa] Bugfix: allow overriding extra_args in ComparisonTestFramework
4ed3653 [qa] Bugfix: allow overriding extra_args in ComparisonTestFramework (Suhas Daftuar)

Tree-SHA512: d8f724b3324aad73a7b15cf87ff394e8d615bf3cd5a394d5715347d833f2ae9ac745a944202986866255eca5fc105ea06ab3abe12e168b67de34482f751c68e2
2017-06-28 18:09:58 +02:00
Wladimir J. van der Laan 9a941a1010
Merge #10631: Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class
aa95947 Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class (practicalswift)

Tree-SHA512: 3835e9b4ceaa4b2db485a25dfa3e5fe50c2e3ecb22ca9d5331aed7728aa496d4378fb84c0a1a3c47b0adecc10a00bca99cc239cbaf94cf2ce5b4cda497db6023
2017-06-28 15:05:23 +02:00
Suhas Daftuar 4ed36539bc [qa] Bugfix: allow overriding extra_args in ComparisonTestFramework 2017-06-28 08:53:20 -04:00
Wladimir J. van der Laan a381f6a5bd
Merge #10684: Remove no longer used mempool.exists(outpoint)
22378ad Remove no longer used mempool.exists(outpoint) (Alex Morcos)

Tree-SHA512: e98ffdf9039a1bdd84a388dc2da43221b8850bab413dffbd18c20fb06c791ff364f824d1b3b7c0a696987ae126e52b4ee200bb63c5c46e9782c1973c6d888d32
2017-06-28 09:21:38 +02:00
Wladimir J. van der Laan 3c85332f29
contrib: Update laanwj key
I recently added a signing subkey, which is used to sign gitian
asserts as well as commits.

Old:
```
pub  rsa2048/0x74810B012346C9A6 2011-08-24
uid                             Wladimir J. van der Laan <laanwj@gmail.com>
sub  rsa2048/0xF69705ED890DE427 2011-08-24
```

New:
```
pub  rsa2048/0x74810B012346C9A6 2011-08-24 [expires: 2019-02-14]
uid                             Wladimir J. van der Laan <laanwj@visucore.com>
uid                             Wladimir J. van der Laan <laanwj@gmail.com>
sub  rsa2048/0xF69705ED890DE427 2011-08-24
sub  rsa2048/0x1E4AED62986CD25D 2017-05-17 [expires: 2019-05-17]
sub  rsa2048/0x69B4C4CDC628F8F9 2017-05-17 [expires: 2019-05-17]
```
2017-06-28 09:05:28 +02:00
practicalswift aa95947ded Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class 2017-06-28 02:12:06 +02:00
Alex Morcos 21d4afa12f Comment clarifications in coins.cpp 2017-06-27 16:08:06 -04:00
Suhas Daftuar e3f9c05b96 Add CheckInputs() unit tests
Check that cached script execution results are only valid for the same
script flags; that script execution checks are returned for non-cached
transactions; and that cached results are only valid for transactions
with the same witness hash.
2017-06-27 16:05:04 -04:00
Alex Morcos 3c8a9aefff Add belt-and-suspenders in DisconnectBlock
These extra variables were previously checked before the move to per-txout database.
2017-06-27 15:04:56 -04:00
Matt Corallo 381b8fc365 Clarify CCoinsViewMemPool documentation.
Thanks to @sdaftuar for correcting my misunderstanding.
2017-06-27 14:47:07 -04:00
Alex Morcos 22378adbe5 Remove no longer used mempool.exists(outpoint) 2017-06-27 14:10:03 -04:00
Wladimir J. van der Laan acb11535cb
Merge #10659: [qa] blockchain: Pass on closed connection during generate call
fab1fb7 [qa] blockchain: Pass on closed connection during generate call (MarcoFalke)

Tree-SHA512: 754be08675c3aca6f8003dc4bc68336e3693609ec14afc91cec592603aabe515f82534ef7b3db469792458ae4c70d5eae0ea0e8abd0ea338e22351aa01173046
2017-06-27 19:27:57 +02:00
Wladimir J. van der Laan ac52492cd2
Merge #10118: Util: Remove redundant calls to argsGlobal.IsArgSet()
ed866ab Indentation after 'Remove redundant calls to gArgs.IsArgSet()' (Jorge Timón)
506b700 Util: Remove redundant calls to gArgs.IsArgSet() (Jorge Timón)

Tree-SHA512: 4f97a0bf2a76c0f351a6343db62898cf057d745c848de00fa09465e870a120f28e0d836cafd6a047f4ec0da7ab671aebee43fa7410c9f0e66382edd1bb2009ba
2017-06-27 16:29:11 +02:00
practicalswift fd9599b135 [qt] Avoid potential null pointer dereference in TransactionView::exportClicked() 2017-06-27 15:06:39 +02:00
Wladimir J. van der Laan 7c87a9c748
Merge #10612: The young person's guide to the test_framework
e7ba6c1 [tests] add example test (John Newbery)
76859e6 [tests] Update functional tests documentation (John Newbery)

Tree-SHA512: 74eb464e965e16466f95b9eda7d1e89a31ef1ef204dd30e1b11ddf482336f12f33fa5ca3cc733b6eaf440c46401e663585af9caca202deddb440bbadce964a62
2017-06-27 12:07:21 +02:00
Wladimir J. van der Laan 1680ee0edf
Merge #10400: [RPC] Add an uptime command that displays the amount of time (in seconds) bitcoind has been running
c074752 [RPC] Add an uptime command that displays the amount of time that bitcoind has been running (Ricardo Velhote)

Tree-SHA512: 8f59d4205042885f23f5b87a0eae0f5d386e9c6134e5324598e7ee304728d4275f383cd154bf1fb25350f5a88cc0ed9f97edb099e9b50c4a0ba72d63ec5ca5b4
2017-06-27 11:34:15 +02:00
Wladimir J. van der Laan 78783531b7
Merge #10581: Simplify return values of GetCoin/HaveCoin(InCache)
21180ff Simplify return values of GetCoin/HaveCoin(InCache) (Pieter Wuille)

Tree-SHA512: eae0aa64fa1308191100cdc7cdc790c825f33b066c200a18b5895d7d5806cee1cc4caba1766ef3379a7cf93dde4bbae2bc9be92947935f5741f5c126d3ee991b
2017-06-27 11:12:34 +02:00
John Newbery e7ba6c16b3 [tests] add example test 2017-06-27 05:04:52 -04:00
John Newbery 76859e6a76 [tests] Update functional tests documentation 2017-06-27 05:04:52 -04:00
Jorge Timón ed866ab923
Indentation after 'Remove redundant calls to gArgs.IsArgSet()' 2017-06-27 07:39:52 +02:00
Jorge Timón 506b700dcb
Util: Remove redundant calls to gArgs.IsArgSet()
Return empty std::vector<std::string> with ArgsManager::GetArgs if
nothing is set for that string
2017-06-27 02:54:19 +02:00
Pieter Wuille 21180ff734 Simplify return values of GetCoin/HaveCoin(InCache)
This removes the possibility for GetCoin/HaveCoin/HaveCoinInCache to return
true while the respective coin is spent. By doing it across all calls, some
extra checks can be eliminated.

coins_tests is modified to call HaveCoin sometimes before and sometimes
after AccessCoin. A further change is needed because the semantics for
GetCoin slightly changed, causing a pruned entry in the parent cache to not
be pulled into the child in FetchCoin.
2017-06-26 16:16:26 -07:00
Suhas Daftuar 176c021d08 [qa] Test non-atomic chainstate writes
Adds new functional test, dbcrash.py, which uses -dbcrashratio to exercise the
logic for recovering from a crash during chainstate flush.

dbcrash.py is added to the extended tests, as it may take ~10 minutes to run

Use _Exit() instead of exit() for crash simulation

This eliminates stderr output such as:
    terminate called without an active exception
or
    Assertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /usr/local/include/boost/thread/pthread/recursive_mutex.hpp, line 104.

Eliminating the stderr output on crash simulation allows testing with
test_runner.py, which reports a test as failed if stderr is produced.
2017-06-26 14:48:42 -07:00
Matt Corallo d6af06d68a Dont create pcoinsTip until after ReplayBlocks.
This requires that we not access pcoinsTip in InitBlockIndex's
FlushStateToDisk (so we just skip it until later in AppInitMain)
and the LoadChainTip in LoadBlockIndex (which there is already one
later in AppinitMain, after ReplayBlocks, so skipping it there is
fine).

Includes some simplifications by Suhas Daftuar and Pieter Wuille.
2017-06-26 10:46:51 -07:00
Pieter Wuille eaca1b7b08 Random db flush crash simulator 2017-06-26 10:46:51 -07:00
Pieter Wuille 0580ee08ff Adapt memory usage estimation for flushing 2017-06-26 10:45:48 -07:00
Pieter Wuille 013a56aa1a Non-atomic flushing using the blockchain as replay journal 2017-06-26 10:45:48 -07:00
Pieter Wuille b3a279cd58 [MOVEONLY] Move LastCommonAncestor to chain 2017-06-26 10:45:48 -07:00