aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-01Merge #18477: ci: Use Focal for fuzzersfanquake
faa9491870bf29583a989c407694d01f49b65bec ci: Use Focal for fuzzers (MarcoFalke) Pull request description: This gives us access to clang-10, as well as a newer version of valgrind ACKs for top commit: fanquake: ACK faa9491870bf29583a989c407694d01f49b65bec - [Clang 10](https://packages.ubuntu.com/focal/clang) and [valgrind 3.15](https://packages.ubuntu.com/focal/valgrind). practicalswift: ACK faa9491870bf29583a989c407694d01f49b65bec -- diff looks correct & contemporary clang is better than vintage clang Tree-SHA512: 0e67232673434c0309db79c1054e3e981115083585945967e346f4d58792635832100f89911428aab928155e44e5f401207a023681ae008fdb5280cf02c4d427
2020-04-01Merge #18247: test: Wait for both veracks in add_p2p_connectionMarcoFalke
faf1d047313e71658fb31f6b94fdd5d37705ab85 test: Remove redundant sync_with_ping after add_p2p_connection (MarcoFalke) fa9064704524a0fd1fa9ea73eea45b07316ac3d1 test: Wait for both veracks in add_p2p_connection (MarcoFalke) Pull request description: This fixes the race in p2p_blocksonly E.g. https://travis-ci.org/MarcoFalke/bitcoin-core/jobs/657038844#L4500 ``` ... test 2020-03-01T20:58:28.825000Z TestFramework.mininode (DEBUG): Closed connection to: 127.0.0.1:11828 node0 2020-03-01T20:58:28.825642Z [net] disconnecting peer=0 node0 2020-03-01T20:58:28.825826Z [net] Cleared nodestate for peer=0 node0 2020-03-01T20:58:28.875835Z [http] Received a POST request for / from 127.0.0.1:53448 node0 2020-03-01T20:58:28.876067Z [httpworker.0] ThreadRPCServer method=getmempoolinfo user=__cookie__ test 2020-03-01T20:58:28.877000Z TestFramework.mininode (DEBUG): Connecting to Bitcoin Node: 127.0.0.1:11828 test 2020-03-01T20:58:28.878000Z TestFramework.mininode (DEBUG): Connected & Listening: 127.0.0.1:11828 test 2020-03-01T20:58:28.878000Z TestFramework.mininode (DEBUG): Send message to 127.0.0.1:11828: msg_version(nVersion=70014 nServices=9 nTime=Sun Mar 1 20:58:28 2020 addrTo=CAddress(nServices=1 ip=127.0.0.1 port=11828) addrFrom=CAddress(nServices=1 ip=0.0.0.0 port=0) nNonce=0x164D5DEB952A4A0B strSubVer=b'/python-mininode-tester:0.0.3/' nStartingHeight=-1 nRelay=1) node0 2020-03-01T20:58:28.883808Z [net] Added connection peer=1 node0 2020-03-01T20:58:28.883950Z [net] connection from 127.0.0.1:33798 accepted node0 2020-03-01T20:58:28.884300Z [msghand] received: version (116 bytes) peer=1 node0 2020-03-01T20:58:28.884483Z [msghand] sending version (114 bytes) peer=1 node0 2020-03-01T20:58:28.884700Z [msghand] send version message: version 70015, blocks=200, us=[::]:0, peer=1 node0 2020-03-01T20:58:28.884765Z [msghand] sending verack (0 bytes) peer=1 test 2020-03-01T20:58:28.885000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_version(nVersion=70015 nServices=1033 nTime=Sun Mar 1 20:58:28 2020 addrTo=CAddress(nServices=0 ip=0.0.0.0 port=0) addrFrom=CAddress(nServices=1033 ip=0.0.0.0 port=0) nNonce=0x4A0F2F4C549B3399 strSubVer=b'/Satoshi:0.19.99(testnode0)/' nStartingHeight=200 nRelay=0) test 2020-03-01T20:58:28.885000Z TestFramework.mininode (DEBUG): Send message to 127.0.0.1:11828: msg_verack() test 2020-03-01T20:58:28.885000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_verack() node0 2020-03-01T20:58:28.885004Z [msghand] receive version message: /python-mininode-tester:0.0.3/: version 70014, blocks=-1, us=127.0.0.1:11828, peer=1 test 2020-03-01T20:58:28.886000Z TestFramework (INFO): Check that txs from rpc are not rejected and relayed to other peers node0 2020-03-01T20:58:28.886556Z [http] Received a POST request for / from 127.0.0.1:53448 node0 2020-03-01T20:58:28.886783Z [httpworker.1] ThreadRPCServer method=getpeerinfo user=__cookie__ node0 2020-03-01T20:58:28.889032Z [http] Received a POST request for / from 127.0.0.1:53448 node0 2020-03-01T20:58:28.889294Z [httpworker.2] ThreadRPCServer method=testmempoolaccept user=__cookie__ node0 2020-03-01T20:58:28.891655Z [http] Received a POST request for / from 127.0.0.1:53448 node0 2020-03-01T20:58:28.891963Z [httpworker.3] ThreadRPCServer method=sendrawtransaction user=__cookie__ node0 2020-03-01T20:58:28.893115Z [httpworker.3] Enqueuing TransactionAddedToMempool: txid=af34fc5ff9ea8babbd4083fbb79ffd2ad5aff1d6def803c07ca5aeed880bd60f wtxid=af34fc5ff9ea8babbd4083fbb79ffd2ad5aff1d6def803c07ca5aeed880bd60f node0 2020-03-01T20:58:28.893443Z [scheduler] TransactionAddedToMempool: txid=af34fc5ff9ea8babbd4083fbb79ffd2ad5aff1d6def803c07ca5aeed880bd60f wtxid=af34fc5ff9ea8babbd4083fbb79ffd2ad5aff1d6def803c07ca5aeed880bd60f node0 2020-03-01T20:58:28.894814Z [msghand] received: verack (0 bytes) peer=1 node0 2020-03-01T20:58:28.894937Z [msghand] sending sendheaders (0 bytes) peer=1 node0 2020-03-01T20:58:28.895087Z [msghand] sending sendcmpct (9 bytes) peer=1 node0 2020-03-01T20:58:28.895235Z [msghand] sending sendcmpct (9 bytes) peer=1 node0 2020-03-01T20:58:28.895430Z [msghand] sending ping (8 bytes) peer=1 node0 2020-03-01T20:58:28.895896Z [msghand] initial getheaders (199) to peer=1 (startheight:-1) test 2020-03-01T20:58:28.896000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_sendheaders() node0 2020-03-01T20:58:28.896016Z [msghand] sending getheaders (645 bytes) peer=1 node0 2020-03-01T20:58:28.896607Z [msghand] sending feefilter (8 bytes) peer=1 test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_sendcmpct(announce=False, version=2) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_sendcmpct(announce=False, version=1) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_ping(nonce=f735096062d217b5) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Send message to 127.0.0.1:11828: msg_pong(nonce=f735096062d217b5) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_getheaders(locator=CBlockLocator(nVersion=70014 vHave=[48924041037103782797700918670732352379567180837453042168545380831411841797392, 28010422273815860773972769588722664110955084223364219183119416607410792753789, 5954376895683677137597080246740451260829355661937599865380797589540815086241, 14500403275336359851183244421245184901482464358719551678581030092830439955257, 17853919108052771837249729512111680264864054213441538187113939176285784834878, 28843166929059356839755035875664073555480989477... (msg truncated) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_feefilter(feerate=000003e8) node0 2020-03-01T20:58:28.898144Z [msghand] received: pong (8 bytes) peer=1 node0 2020-03-01T20:59:28.338539Z [scheduler] Feeding 13446 bytes of dynamic environment data into RNG test 2020-03-01T20:59:28.908000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: '''' def test_function(): assert self.is_connected if not self.last_message.get('tx'): return False return self.last_message['tx'].tx.rehash() == txid ''' test 2020-03-01T20:59:28.908000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/home/travis/build/MarcoFalke/bitcoin-core/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 112, in main self.run_test() File "/home/travis/build/MarcoFalke/bitcoin-core/build/bitcoin-x86_64-pc-linux-gnu/test/functional/p2p_blocksonly.py", line 57, in run_test self.nodes[0].p2p.wait_for_tx(txid) File "/home/travis/build/MarcoFalke/bitcoin-core/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/mininode.py", line 369, in wait_for_tx wait_until(test_function, timeout=timeout, lock=mininode_lock) File "/home/travis/build/MarcoFalke/bitcoin-core/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/util.py", line 234, in wait_until raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout)) AssertionError: Predicate '''' def test_function(): assert self.is_connected if not self.last_message.get('tx'): return False return self.last_message['tx'].tx.rehash() == txid ''' not true after 60 seconds ACKs for top commit: jonatack: ACK faf1d04 Tree-SHA512: 3b1a38a5c87d11c610eee0988f0c4af9bfcd978df9ac718ef611f663df2fd4a0eb04e077df5e940d15971bb2f22328fb6021cacccb6902f1e527f288ad2c4a2c
2020-04-01Merge #18486: doc: Explain new test loggingMarcoFalke
7777703958937ec0ae609b1ee882f1bf2d113d10 doc: Explain new test logging (MarcoFalke) Pull request description: Explain logging added in #18472 and #16975 ACKs for top commit: jonatack: ACK 7777703 Tree-SHA512: 3a0aa7bab32a6753d8894d29cf82604b044b23e512102dd275b717eefda3c2212dbf43ea7e9155267350dd9f3bc5badba2eb660152db3efeab30a04f52126c95
2020-03-31doc: Explain new test loggingMarcoFalke
2020-03-31test: Remove redundant sync_with_ping after add_p2p_connectionMarcoFalke
Also replace the two-line (send_message + sync_with_ping) with the one-line send_and_ping
2020-03-31test: Wait for both veracks in add_p2p_connectionMarcoFalke
2020-03-31Merge #18474: test: check that peer is connected when calling sync_*MarcoFalke
fac3716b09bb9ee121db629873d9694a95cae942 test: check that peer is connected when calling sync_* (MarcoFalke) Pull request description: Without a connection there is no way to sync, so we can fail early and don't have to wait for the timeout ACKs for top commit: jonatack: ACK fac3716b09bb9 Tree-SHA512: 12f771473c23e152dae4bfb201fadb2c3530cf439de64fea07d048734614543080a5d05c9c36e6e398c6a69c8279f609d34706599571814172a11bcfbea4a3b9
2020-03-31Merge #18472: test: Remove unsafe BOOST_TEST_MESSAGEMarcoFalke
fa3cc0bfc4c4fc13a384fc291403c9fd41082f18 test: Remove unsafe BOOST_TEST_MESSAGE (MarcoFalke) Pull request description: Fixes #17987 Can be tested with ``` ./src/test/test_bitcoin -l test_suite -- DEBUG_LOG_OUT ACKs for top commit: fjahr: tested ACK fa3cc0bfc4c4fc13a384fc291403c9fd41082f18 mzumsande: Tested ACK fa3cc0bfc4c4fc13a384fc291403c9fd41082f18 Tree-SHA512: f63b110d77882cd7c0d7574ff6c9c948db8febb3400ecdac45164746b587b0fa223463041801271b3959267ddc1d9a4a67ba76939e242e7dd2f92a2834a400a0
2020-03-31Merge #18481: test: add BIP37 'filterclear' test to p2p_filter.pyMarcoFalke
00559229588feb19de2a0cb7506f70c483a1f433 test: add BIP37 'filterclear' test to p2p_filter.py (Sebastian Falbesoner) Pull request description: Integrates the message type `filterclear` to the test framework and adds a simple test to `p2p_filter.py`, checking that arbitrary txs get relayed again after deleting the filter. ACKs for top commit: naumenkogs: utACK 00559229588feb19de2a0cb7506f70c483a1f433 Tree-SHA512: fe64e99a526865770707d8077b9968d3923f248045ec7fa56cd380dba85ac77a71a473d244ef3aede2fc0d287b8d7c6bc0156b6033b0c949c2058cc08e255697
2020-03-31Merge #18338: Fix wallet unload race conditionWladimir J. van der Laan
41b0baf43c243b64b394e774e336475a489cca2b gui: Handle WalletModel::unload asynchronous (João Barbosa) ab31b9d6fe7b39713682e3f52d11238dbe042c16 Fix wallet unload race condition (Russell Yanofsky) Pull request description: This PR consists in two fixes. The first fixes a concurrency issues with `boost::signals2`. The second fixes a wallet model destruction while it's being used. From boost signal documentation at https://www.boost.org/doc/libs/1_72_0/doc/html/signals2/thread-safety.html: > When a signal is invoked by calling signal::operator(), the invocation first acquires a lock on the signal's mutex. Then it obtains a handle to the signal's slot list and combiner. Next it releases the signal's mutex, before invoking the combiner to iterate through the slot list. This means that `UnregisterValidationInterface` doesn't prevent more calls to that interface. The fix consists in capturing the `shared_ptr<CValidationInterface>` in each internal slot. The GUI bug is fixed by using a `Qt::QueuedConnection` in the `WalletModel::unload` connection. ACKs for top commit: ryanofsky: Code review ACK 41b0baf43c243b64b394e774e336475a489cca2b. Only change is moving assert as suggested hebasto: ACK 41b0baf43c243b64b394e774e336475a489cca2b, tested on Linux Mint 19.3. Tree-SHA512: 4f712d8de65bc1214411831250de5dc0a9fd505fb84da5baf9f2cc4d551bc3abffc061616f00afe43dba7525af2cd96c9b54aeead9383145e3b8801f25d85f50
2020-03-31Merge #18160: gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChangedWladimir J. van der Laan
0933a37078e1ce3a3d70983c3e7f4b3ac6c3fa37 gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged (João Barbosa) Pull request description: Each 250ms the slot `WalletModel::pollBalanceChanged` is called which, at worst case, calls `Wallet::GetBalance`. This is a waste of resources since most of the time there aren't new transactions or new blocks. Fix this by early checking if cache is dirty or not. The actual balance computation can still hang the GUI thread but that is tracked in #16874 and should be fixed with a solution similar to #17135. ACKs for top commit: hebasto: ACK 0933a37078e1ce3a3d70983c3e7f4b3ac6c3fa37, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged. jonasschnelli: utACK 0933a37078e1ce3a3d70983c3e7f4b3ac6c3fa37 instagibbs: ACK 0933a37078e1ce3a3d70983c3e7f4b3ac6c3fa37 ryanofsky: Code review ACK 0933a37078e1ce3a3d70983c3e7f4b3ac6c3fa37, but I would prefer (not strongly) for #17905 to be merged first. This PR can be simpler if it is based on #17905, so tryGetBalances can just be left alone instead of changing into to a more complicated tryGetBalancesIfNeeded function, and then getting changed back later when we want to optimize it out. jonatack: ACK 0933a37078e based primarily on code review, despite a lot of manual testing with a large 177MB wallet. Tree-SHA512: 18db35bf33a7577666658c8cb0b57308c8474baa5ea95bf1468cd8531a69857d8915584f6ac505874717aa6aabeb1b506ac77630f8acdb6651afab89275e38a1
2020-03-31test: add BIP37 'filterclear' test to p2p_filter.pySebastian Falbesoner
2020-03-30Merge #18420: test: listsinceblock block height checksMarcoFalke
83e1d92413e262e6a876336ec433a6fbc335223a test: listsinceblock block height checks (Jon Atack) Pull request description: This is the second commit of #17535. This PR extends a listsinceblock test to check the new transaction 'blockheight' field recently added in #17437. It also cleans up code in the test function without changing or removing existing checks. ACKs for top commit: fjahr: tested ACK 83e1d92413e262e6a876336ec433a6fbc335223a ryanofsky: Code review ACK 83e1d92413e262e6a876336ec433a6fbc335223a. Nice test improvements! Tree-SHA512: 92874b49a3bc0236500495f32dfcf683e1971ca3d4c51702c69ed4ce7dfce21273754f02f93d1243d73793701d9fdf49e14b149477cd249cbbd9e4e8d5bd49f8
2020-03-30ci: Use Focal for fuzzersMarcoFalke
2020-03-30test: check that peer is connected when calling sync_*MarcoFalke
2020-03-30Merge #18334: test: Add basic test for BIP 37MarcoFalke
fa156999695ddaeb016d8320bee62f8d96679d55 test: Add basic test for BIP 37 (MarcoFalke) Pull request description: This does not add full coverage, but should be a good start and can be extended in the future. Currently, none of the BIP 37 p2p code has test coverage. ACKs for top commit: practicalswift: Code review ACK fa156999695ddaeb016d8320bee62f8d96679d55 -- more testing coverage is better than less testing coverage Tree-SHA512: d52e8be79240dffb769105c087ae0ae9305d599282546e4ca7379c4c7add2dbcd668265b46670aa07c357638044cf0f61a6fab7dba8971dd0f80c8f99768686e
2020-03-30test: Remove unsafe BOOST_TEST_MESSAGEMarcoFalke
2020-03-30Merge #18433: serialization: prevent int overflow for big Coin::nHeightfanquake
e980214bc4fd49530e8d50fe0a6657b8583bc6b5 serialization: prevent int overflow for big Coin::nHeight (pierrenn) Pull request description: This is an attempt to fix fuzzer issues 1,2,8 reported by practicalswift here : https://github.com/bitcoin/bitcoin/issues/18046 The fuzzer harness doesn't prevent deserialization of unrealistic high values for `Coin::nHeight`. In the [provided examples](https://github.com/bitcoin/bitcoin/issues/18046), we have : - `blockundo_deserialize` : the varint `0x8DD88DD700` is deserialized as `3944983552` in `Coin::nHeight` (`TxInOutFormatter::Unser`) - `coins_deserialize` : the varint `0x8DD5D5EC40` is deserialized as `3939874496` similarly - `txundo_deserialize`: the varint `0x8DCD828F01` is deserialized as `3921725441` in `Coin::nHeight` (`Coin::Unserialize`) Since `Coin::nHeight` is 31 bit long, multiplying a large value by 2 triggers the fuzzer. AFAIK those values are unrealistic (~70k years for the smallest..). I've looked a bit a reducing the range of values the fuzzer can deserialize, but this seems to be too much code change for not much. Hence this PR chooses to static cast `nHeight` when re-serializing; it seems to be the less intrusive/safest way to prevent the fuzzer output. Another more "upstream" approach would be to limit `Coin::nHeight` values to something more realistic, e.g. `0xFFFFFFF` (~5k years) : https://github.com/pierreN/bitcoin/blob/de3a30bab28e2db853a795017c5ec1704a1d0fee/src/undo.h#L39 and https://github.com/pierreN/bitcoin/blob/de3a30bab28e2db853a795017c5ec1704a1d0fee/src/coins.h#L71 Thanks ! NB: i was also not sure about the component/area to prefix the PR/commit with.. ? ACKs for top commit: practicalswift: ACK e980214bc4fd49530e8d50fe0a6657b8583bc6b5 -- patch looks correct promag: ACK e980214bc4fd49530e8d50fe0a6657b8583bc6b5. sipa: utACK e980214bc4fd49530e8d50fe0a6657b8583bc6b5 MarcoFalke: re-ACK e980214bc4fd49530e8d50fe0a6657b8583bc6b5 🎑 ryanofsky: Code review ACK e980214bc4fd49530e8d50fe0a6657b8583bc6b5. Just removed ternary ? 1 : 0 and replaced / 2 with >> 1 since last review Tree-SHA512: 905fc9e5e52a6857abee4a1c863751767835965804bb8c39474f27a120f65399ff4ba7a49ef1da0ba565379f8c12095bd384b6c492cf06776f01b2db68d522b8
2020-03-29Merge #18455: tests: Add fuzzing harness for functions/classes in ↵MarcoFalke
flatfile.h, merkleblock.h, random.h, serialize.h and span.h 11a520f6793e21e0a8a9301f5ec4c28a48131b85 tests: Add fuzzing harness for functions/classes in random.h (practicalswift) 64d277bbbcbd464b2a795bae011ee808298a42ca tests: Add fuzzing harness for LimitedString (serialize.h) (practicalswift) f205cf7fef5618aaa96f016fda168eedfd9da437 tests: Add fuzzing harness for functions/classes in span.h (practicalswift) 9718f38f54357f15b8a27e060aed56f91015112d tests: Add fuzzing harness for functions/classes in merkleblock.h (practicalswift) a16ea051f915eb4c975fe06f89470aa99d99d7e4 tests: Add fuzzing harness for functions/classes in flatfile.h (practicalswift) Pull request description: * Add fuzzing harness for functions/classes in `flatfile.h` * Add fuzzing harness for functions/classes in `merkleblock.h` * Add fuzzing harness for functions/classes in `span.h` * Add fuzzing harness for `LimitedString` (`serialize.h`) * Add fuzzing harness for functions/classes in `random.h` Top commit has no ACKs. Tree-SHA512: 6f7e0f946f1062d51216990cde9672b4e896335152548ace3d8711e4969c3e3c8566d01d915b72adcda5c1caa9c2e34da6b7473b55a229f5b77239d3b0ba4b67
2020-03-29tests: Add fuzzing harness for functions/classes in random.hpracticalswift
2020-03-29tests: Add fuzzing harness for LimitedString (serialize.h)practicalswift
2020-03-29tests: Add fuzzing harness for functions/classes in span.hpracticalswift
2020-03-29tests: Add fuzzing harness for functions/classes in merkleblock.hpracticalswift
2020-03-29tests: Add fuzzing harness for functions/classes in flatfile.hpracticalswift
2020-03-29Merge #18391: doc: Update init and reduce-traffic docs for -blocksonlyMarcoFalke
621e86ee8d0102e2bf41f7656a368083b89b2f83 Update -blocksonly documentation (glowang) Pull request description: When -blocksonly is set to 1, it interacts with the -walletbroadcast parameter and sets it to 0. This behavior is not captured by the current documentation, which claims that -blocksonly does not impact any wallet transactions at all. Fixes #17294 ACKs for top commit: MarcoFalke: ACK 621e86ee8d0102e2bf41f7656a368083b89b2f83 Tree-SHA512: f47bfb40a196c23e62505e1d4f79094011ac7c21fc9b920fad60cdadb5c4f48e993be1f015e26e568ce329967c24848fd7b665a6cffd3881f4cfcd2fd0081ed8
2020-03-29Update -blocksonly documentationglowang
When -blocksonly is set to 1, it interacts with the -walletbroadcast parameter and sets it to 0 if it has not been set already.This behavior is not captured by the current documentation, which claims that -blocksonly does not impact any wallet transactions. Update the max number of outgoing peers from 8 to 10, due to the addition of two -blocksonly peers.
2020-03-28Merge #18459: rpc: remove unused getbalances() codeMarcoFalke
6e0d82c55bf4a9aae98c47b7cd00b2828b5dd0ee rpc: remove unused getbalances() code (Jon Atack) Pull request description: This line from 999931cf8f1 appears to be extraneous and replaced 2 lines after by `UniValue balances{UniValue::VOBJ};`. ACKs for top commit: Empact: ACK https://github.com/bitcoin/bitcoin/pull/18459/commits/6e0d82c55bf4a9aae98c47b7cd00b2828b5dd0ee hebasto: ACK 6e0d82c55bf4a9aae98c47b7cd00b2828b5dd0ee, the `obj` local variable is not used until the end of the scope. Tree-SHA512: a220ca9cda091e78144d9b7fbe4bf90e8338d6e8c8dc7bea27a8e62f3a8ac1d983ad12a48a0a3366b2d8b9586878dfc69c1ec34bf846b34c91e42cda48a59850
2020-03-28rpc: remove unused getbalances() codeJon Atack
2020-03-28Merge #18444: RPC: Remove final comma for last entry of fixed-size ↵MarcoFalke
arrays/objects in RPCResult c34164896c62fc6307b4cc72c060a277263590bb Bugfix: RPC: Remove final comma for last entry of fixed-size Arrays and Objects in RPCResult (Luke Dashjr) Pull request description: JSON doesn't allow a trailing comma in arrays Top commit has no ACKs. Tree-SHA512: 761502a05f447afc09c120f13bf23abd2aee83a7f5e5dadaf54c7e1c0c1280d83ee041ca6ca45998fb561e41b32d01067ec52a187c3bcc9d53303ea813bc212c
2020-03-28Merge #18449: util: Remove unused itostrWladimir J. van der Laan
faaf1cb5b9a4c22b21757f7578833f908b79b867 util: Replace i64tostr with ToString (MarcoFalke) fac96fff624a3ab65209dcd3378efb6e6ab47a58 util: Remove unused itostr (MarcoFalke) Pull request description: Currently unused, but if someone really needed to use a helper with this functionality in the future, they could use `ToString`. ACKs for top commit: laanwj: ACK faaf1cb5b9a4c22b21757f7578833f908b79b867 promag: Code review ACK faaf1cb5b9a4c22b21757f7578833f908b79b867. Tree-SHA512: 42180c03f51d677f7b69da23c7868bdd88944335fad0752fcc307f2c3e3c69f1cc1b316ac0875bcefb9a69c5d55200d7cf66843ea4c0f0f26baf7a054b96c1bb
2020-03-28Bugfix: RPC: Remove final comma for last entry of fixed-size Arrays and ↵Luke Dashjr
Objects in RPCResult JSON doesn't allow a trailing comma in Arrays/Objects
2020-03-28Merge #18415: scripts: add MACHO tests to test-security-check.pyWladimir J. van der Laan
7142d50ac33e0ad7d24e49e04c1fc7e3e769ed46 scripts: rename test_64bit_PE to test_PE (fanquake) edaca2dd123cef958699c07ab248cf0ffc71af07 scripts: add MACHO NX check to security-check.py (fanquake) 1a4e9f32efcc5f6a74290446dc58784fd85c7b31 scripts: add MACHO tests to test-security-check.py (fanquake) Pull request description: Adds tests for the MACHO checks in security-check.py: https://github.com/bitcoin/bitcoin/blob/ac579ada7e83a1b8100d611412f9ede885a4e522/contrib/devtools/security-check.py#L212-L214 I'm planning on following up with more checks in security-check.py, and corresponding tests in test-security-check.py. Note that you'll probably have to be on macOS to run them. You can run just this suite with `python3 test-security-check.py TestSecurityChecks.test_MACHO`. ACKs for top commit: laanwj: ACK 7142d50ac33e0ad7d24e49e04c1fc7e3e769ed46 Tree-SHA512: ace3ca9f6df5d4fedd5988938fb7dc7563ec7dc587aa275f780b5f51e9b8d7d6f7768e0a1e05ce438510a07b8640aba92c76847b30c2990f46c66b78a0acf960
2020-03-28serialization: prevent int overflow for big Coin::nHeightpierrenn
2020-03-27Merge #16995: Fix gcc 9 warningsWladimir J. van der Laan
ff9c671b11d40e5d0623eff3dd12e48cbaafb34e refactor: Work around GCC 9 `-Wredundant-move` warning (Russell Yanofsky) b837b334db5dd6232725fd2350928ff4fbd3feee net: Fail instead of truncate command name in CMessageHeader (Wladimir J. van der Laan) Pull request description: Fixes all 3 from #16992 (see commits) - net: Fail instead of truncate command name in CMessageHeader - refactor: Use std::move workaround for unique_ptr upcast only when necessary ACKs for top commit: practicalswift: ACK ff9c671b11d40e5d0623eff3dd12e48cbaafb34e -- patch looks correct sipa: utACK ff9c671b11d40e5d0623eff3dd12e48cbaafb34e ryanofsky: Code review ACK ff9c671b11d40e5d0623eff3dd12e48cbaafb34e. Looks good and seems to pass travis, modulo a timeout on one build hebasto: ACK ff9c671b11d40e5d0623eff3dd12e48cbaafb34e, tested on Fedora 31: Tree-SHA512: 52d8c13aaf0d56f9bc546a98d7f853eae21f7e325b202fdeb2286b19a9a0ee308634c644b039f60ad8043421e382381cbf1bce58d9f807547f928621c7d245d0
2020-03-27gui: Handle WalletModel::unload asynchronousJoão Barbosa
This change prevents deleting a WalletModel instance while it's being used.
2020-03-27Fix wallet unload race conditionRussell Yanofsky
Currently it's possible for ReleaseWallet to delete the CWallet pointer while it is processing BlockConnected, etc chain notifications. To fix this, unregister from notifications earlier in UnloadWallet instead of ReleaseWallet, and use a new RegisterSharedValidationInterface function to prevent the CValidationInterface shared_ptr from being deleted until the last notification is actually finished.
2020-03-27util: Replace i64tostr with ToStringMarcoFalke
2020-03-27Merge #18447: test: Add coverage for script parse error in ParseScriptMarcoFalke
dcda81c47101196e53e379d965a2692515ef8363 test: add coverage for script parse error in ParseScript (pierrenn) Pull request description: Follow up on this suggestion : https://github.com/bitcoin/bitcoin/pull/18416#issuecomment-603966799 This adds a test case to raise the `script parse error` in `ParseScript`. ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/18447/commits/dcda81c47101196e53e379d965a2692515ef8363 Tree-SHA512: ae0ef2c00f34cee818c83582f190d5f4043159e922862f2b442b7b895b8ff3ca421533699247c12c367be77813b5205830a771cd47a18e8932807ccace2d6a1c
2020-03-27Merge #18107: build: Add cov_fuzz targetWladimir J. van der Laan
faf7d4fa86b700ec272806cd2bd8666a92405619 build: Add cov_fuzz target (MarcoFalke) fac71e364e4bbaeffc35e45aff8c8c2c6f2b5c67 build: link fuzz/test_runner.py for out-of-tree builds (MarcoFalke) faf2c5aca01643eb560287e08f9c0a7ca0ac9c88 build: Remove unused USE_COVERAGE (MarcoFalke) Pull request description: Only libFuzzer is supported right now, so clang is required. Thus, this needs a workaround such as https://github.com/bitcoin/bitcoin/issues/12602#issuecomment-562788247 Can be tested with: ``` mkdir build && cd build ../configure --enable-fuzz --with-sanitizers=fuzzer --enable-lcov --enable-lcov-branch-coverage CC=clang CXX=clang++ make $MAKEJOBS make cov_fuzz ACKs for top commit: practicalswift: ACK faf7d4fa86b700ec272806cd2bd8666a92405619 Tree-SHA512: 6828f8f81d95f6781713d0b09d7eba2ffdb50217e09ca839db61791a4ed70024859c7a0cb01d9eede79166d574dd57ece01f9d9fe2610d4a72a4ca4a4ce0b838
2020-03-27util: Remove unused itostrMarcoFalke
2020-03-27Merge #18398: rpc: fix broken RPCExamples for waitforblock(height)fanquake
ef35604c9c88e7800e9be106b791b1c0fa8b310a rpc: fix broken RPCExamples for waitforblock(height) (Sebastian Falbesoner) Pull request description: This PR fixes several broken RPCExamples from the "blockchain" category: - `HelpExampleCli` for `waitforblock` (disturbing comma between arguments) - `HelpExampleCli` for `waitforblockheight` (disturbing comma between arguments) - `HelpExampleRpc` for `waitforblockheight` (disturbing quotation marks around integer argument) Note that the CLI example for `waitforblockheight` would also work with the first argument in quotation marks (in contrast to the RPC example), but I removed them as well as they are not needed. Outputs for the non-working examples in the master branch: ``` $ ./bitcoin-cli waitforblock "0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862", 1000 error code: -8 error message: blockhash must be of length 64 (not 65, for '0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862,') ``` ``` $ ./bitcoin-cli waitforblockheight "100", 1000 error: Error parsing JSON:100, ``` ``` $ curl --user __cookie__ --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "waitforblockheight", "params": ["100", 1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ Enter host password for user '__cookie__': {"result":null,"error":{"code":-1,"message":"JSON value is not an integer as expected"},"id":"curltest"} ``` Outputs for the fixed examples in the PR branch: ``` $ ./bitcoin-cli waitforblock "0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862" 1000 { "hash": "0000000000000000000910ae4d56120e0ddd55c0552e80ed12dba147abc68080", "height": 622416 } ``` ``` $ ./bitcoin-cli waitforblockheight 100 1000 { "hash": "0000000000000000000910ae4d56120e0ddd55c0552e80ed12dba147abc68080", "height": 622416 } ``` ``` $ curl --user __cookie__ --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "waitforblockheight", "params": [100, 1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ Enter host password for user '__cookie__': {"result":{"hash":"0000000000000000000910ae4d56120e0ddd55c0552e80ed12dba147abc68080","height":622416},"error":null,"id":"curltest"} ``` ACKs for top commit: fanquake: ACK ef35604c9c88e7800e9be106b791b1c0fa8b310a Tree-SHA512: b98c6681d1aa24b3ee3ef4ef450cb630082a9f8695af18f3b6d418e5b0b1e472b787ccf6397cd719b4d5fe0082ea5f1d0ca553c1cc56066ee2d288be34c601e3
2020-03-27Merge #18416: util: Limit decimal range of numbers ParseScript acceptsWladimir J. van der Laan
9ab14e4d21c73d16d8d782f1576fe29e659e2a70 Limit decimal range of numbers ParseScript accepts (pierrenn) Pull request description: Following up on this suggestion : https://github.com/bitcoin/bitcoin/pull/18413#issuecomment-602966490, prevent the output of `atoi64` in the `core_read.cpp:ParseScript` helper to send to `CScriptNum::serialize` values wider than 32-bit. Since the `ParseScript` helper is only used by the tool defined in `bitcoin-tx.cpp`, this only prevents users to provide too much unrealistic values. ACKs for top commit: laanwj: ACK 9ab14e4d21c73d16d8d782f1576fe29e659e2a70 Tree-SHA512: ee228269d19d04e8fee0aa7c0ae2bb0a2b437b8e574356e8d9b2279318242057d51fcf39a842aa3afe27408d0f2d5276df245d07a3f4828644a366f80587b666
2020-03-27Limit decimal range of numbers ParseScript acceptspierrenn
2020-03-27Merge #18388: Make VerifyWitnessProgram use a Span stackfanquake
2b0fcff7f26d59fed4bcafd1602325122a206c67 Make VerifyWitnessProgram use a Span stack (Pieter Wuille) Pull request description: Here is a follow-up to #18002, again with the goal of simplifying (potential) BIP341 code. Instead of passing a begin and end iterator of the initial stack to `ExecuteWitnessScript`, they are turned into a `Span<const valtype>`, representing a span of `valtype`s in memory. This allows `VerifyWitnessProgram` to operate on that span directly, instead of juggling iterators around (which would be exacerbated by #17977 if trying to avoid copying the stack). ACKs for top commit: ajtowns: ACK 2b0fcff7f26d59fed4bcafd1602325122a206c67 elichai: ReACK on the diff 2b0fcff7f26d59fed4bcafd1602325122a206c67 instagibbs: re-ACK https://github.com/bitcoin/bitcoin/pull/18388/commits/2b0fcff7f26d59fed4bcafd1602325122a206c67 theStack: re-ACK https://github.com/bitcoin/bitcoin/commit/2b0fcff7f26d59fed4bcafd1602325122a206c67 Empact: ACK https://github.com/bitcoin/bitcoin/commit/2b0fcff7f26d59fed4bcafd1602325122a206c67 jnewbery: utACK 2b0fcff7f26d59fed4bcafd1602325122a206c67 Tree-SHA512: 38eb4ce17f1947674c1c274caa40feb6ea8266bd96134d9cf1bc41e6fbf1114d4dde6c7a9e26e1ca8f3d0155429ef0911cc8ec0c1037d8fe7d6ec7f9e7184e93
2020-03-27test: add coverage for script parse error in ParseScriptpierrenn
2020-03-26Merge #18445: tests: Add fuzzing harnesses for functions/classes in chain.h ↵MarcoFalke
and protocol.h 7834c3b9ecf6bfd343542e4c5dc9b44f265f1922 tests: Add fuzzing harness for functions/classes in chain.h (practicalswift) d7930c43269346686ec67614281cbca59808f43c tests: Add fuzzing harness for functions/classes in protocol.h (practicalswift) Pull request description: Add fuzzing harnesses for functions/classes in `chain.h` and `protocol.h`. Top commit has no ACKs. Tree-SHA512: ac2d66bc678ebba0ffbbc42e77806eaf3bb07413ff19219c7a83b171ccd4601e0aa8546ee7ffe8018ca4de12d080f79f693d184cc337c234cde641803279f00c
2020-03-26Merge #18270: util: Fail to parse whitespace-only strings in ParseMoney(...) ↵MarcoFalke
(instead of parsing as zero) 100213c5c29ebd7bd50aa885e54594ae10bf87a4 util: Fail to parse space-only strings in ParseMoney(...) (instead of parsing as zero) (practicalswift) Pull request description: Fail to parse whitespace-only strings in `ParseMoney(...)` (instead of parsing as `0`). This is a follow-up to #18225 ("util: Fail to parse empty string in `ParseMoney`") which made `ParseMoney("")` fail instead of parsing as `0`. Context: https://github.com/bitcoin/bitcoin/pull/18225#issuecomment-592994765 Current non-test call sites: ``` $ git grep ParseMoney ":(exclude)src/test/" src/bitcoin-tx.cpp: if (!ParseMoney(strValue, value)) src/init.cpp: if (!ParseMoney(gArgs.GetArg("-incrementalrelayfee", ""), n)) src/init.cpp: if (!ParseMoney(gArgs.GetArg("-minrelaytxfee", ""), n)) { src/init.cpp: if (!ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n)) src/init.cpp: if (!ParseMoney(gArgs.GetArg("-dustrelayfee", ""), n)) src/miner.cpp: if (gArgs.IsArgSet("-blockmintxfee") && ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n)) { src/util/moneystr.cpp:bool ParseMoney(const std::string& str, CAmount& nRet) src/util/moneystr.h:NODISCARD bool ParseMoney(const std::string& str, CAmount& nRet); src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-mintxfee", ""), n) || 0 == n) { src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-fallbackfee", ""), nFeePerK)) { src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-discardfee", ""), nFeePerK)) { src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-paytxfee", ""), nFeePerK)) { src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-maxtxfee", ""), nMaxFee)) { ``` ACKs for top commit: Empact: ACK https://github.com/bitcoin/bitcoin/pull/18270/commits/100213c5c29ebd7bd50aa885e54594ae10bf87a4 sipa: ACK 100213c5c29ebd7bd50aa885e54594ae10bf87a4 theStack: ACK https://github.com/bitcoin/bitcoin/commit/100213c5c29ebd7bd50aa885e54594ae10bf87a4 Tree-SHA512: cadfb1ac8276cf54736c3444705f2650e7a08023673aedc729fabe751ae80f6c490fc0945ee38dbfd02c95e4d9853d1e4c84f5d3c310f44eaf3585afec8a4c22
2020-03-26tests: Add fuzzing harness for functions/classes in chain.hpracticalswift
2020-03-26tests: Add fuzzing harness for functions/classes in protocol.hpracticalswift
2020-03-26Merge #18441: ci: Remove misplaced comments from folded block scalarMarcoFalke
e41e46cee0d9b98869a569b73dafc5452b4272d6 ci: Remove misplaced comments from folded block scalar (Hennadii Stepanov) Pull request description: On master (f3a91ab0edc70e1bcb7e770f0878f03459c399e1) the [build log for ARM](https://travis-ci.org/github/bitcoin/bitcoin/jobs/667247758) contains: ``` $ export FILE_ENV="./ci/test/00_setup_env_arm.sh" $ export QEMU_USER_CMD="" $ export Can= $ export run= $ export the= $ export tests= $ export natively= $ export without= $ export qemu= Setting up build cache ... ``` and ![Screenshot from 2020-03-26 18-58-50](https://user-images.githubusercontent.com/32963518/77674223-e28d2d00-6f93-11ea-82a1-7f805ccb678d.png) With this PR: ``` $ export FILE_ENV="./ci/test/00_setup_env_arm.sh" $ export QEMU_USER_CMD="" Setting up build cache ... ``` and ![Screenshot from 2020-03-26 19-01-56](https://user-images.githubusercontent.com/32963518/77674456-4d3e6880-6f94-11ea-9c83-546c81f1cdf7.png) --- Also Travis [build config validation](https://docs.travis-ci.com/user/build-config-validation) added: ![Screenshot from 2020-03-26 19-04-19](https://user-images.githubusercontent.com/32963518/77674686-9ee6f300-6f94-11ea-900f-fdef8a673113.png) Top commit has no ACKs. Tree-SHA512: a3ea05d543a4d46c65fffd7c67df9bbd4ca8d426fa215c5ce26653de34145edd419a54884da0416608a2c90bf5b421cab3ec32290c8916f10399354b44ddeb99