aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-12contrib/signet: Document miner script in README.mdAnthony Towns
2021-01-12contrib/signet: Add script for generating a signet chainAnthony Towns
2021-01-12Add bitcoin-util command line utilityAnthony Towns
2020-12-14rpc: allow getblocktemplate for test chains when unconnected or in IBDAnthony Towns
2020-12-14rpc: update getblocktemplate with signet rule, include signet_challengeAnthony Towns
2020-12-14Merge #20617: p2p: Remove m_is_manual_connection from CNodeStatefanquake
a33442fdc73eabd1c5596ab92954344edc9517e6 Remove m_is_manual_connection from CNodeState (Antoine Riard) Pull request description: Currently, this member is only used to exclude MANUAL peers from discouragement in MaybePunishNodeForBlock(). Manual connections are already protected in MaybeDiscourageAndDisconnect(), independently from their network processing behaviors. ACKs for top commit: MarcoFalke: cr ACK a33442fdc73eabd1c5596ab92954344edc9517e6 promag: Code review ACK a33442fdc73eabd1c5596ab92954344edc9517e6. jnewbery: utACK a33442fdc73eabd1c5596ab92954344edc9517e6 amitiuttarwar: code review ACK a33442fdc73eabd1c5596ab92954344edc9517e6 Tree-SHA512: cfe3f3dfa131373e3299002d34ae9e22ca6e1a966831bab32fcf06ff1d08f06095b4ab020cc4d267f3ec05ae23fbdc22373382ab828b999c0db11b8c842a4f0c
2020-12-13Merge #20588: Remove unused and confusing CTransaction constructorfanquake
fac39c198324715565897f4240709340477af0bf wallet: document that tx in CreateTransaction is purely an out-param (MarcoFalke) faac31521bb7ecbf999541cf918d3750ff589de4 Remove unused and confusing CTransaction constructor (MarcoFalke) Pull request description: The constructor is confusing and dangerous (as explained in the TODO), fix that by removing it. ACKs for top commit: laanwj: Code review ACK fac39c198324715565897f4240709340477af0bf promag: Code review ACK fac39c198324715565897f4240709340477af0bf. theStack: Code review ACK fac39c198324715565897f4240709340477af0bf Tree-SHA512: e0c8cffce8d8ee0166b8e1cbfe85ed0657611e26e2af0d69fde70eceaa5d75cbde3eb489af0428fe4fc431360b4c791fb1cc21b8dee7d4c7a4f17df00836229d
2020-12-12Merge #20079: p2p: Treat handshake misbehavior like unknown messageMarcoFalke
faaad1bbac46cfeb22654b4c59f0aac7a680c03a p2p: Ignore version msgs after initial version msg (MarcoFalke) fad68afcff731153d1c83f7f56c91ecbb264b59a p2p: Ignore non-version msgs before version msg (MarcoFalke) Pull request description: Handshake misbehaviour doesn't cost us more than any other unknown message, so it seems odd to treat it differently ACKs for top commit: jnewbery: utACK faaad1bbac46cfeb22654b4c59f0aac7a680c03a practicalswift: ACK faaad1bbac46cfeb22654b4c59f0aac7a680c03a: patch looks correct Tree-SHA512: 9f30c3b5c1f6604fd02cff878f10999956152419a3dd9825f8267cbdeff7d06787418b41c7fde8a00a5e557fe89204546e05d5689042dbf7b07fbb7eb95cddff
2020-12-12Merge #20275: wallet: List all wallets in non-SQLite and non-BDB buildsMarcoFalke
f3d870fc2271bf45e0269e5ae135bced1a26f620 wallet: List all wallets in non-SQLite or non-BDB builds (Russell Yanofsky) d70dc89e78ee6355e0bc37cc36cfc04ef7a86885 refactor: Consolidate redundant wallet database path and exists functions (Russell Yanofsky) 6a7a63644cd2fc56538d323cc0d5c1d7945247fd refactor: Drop call to GetWalletEnv in wallet salvage code (Russell Yanofsky) 6ee9cbdd18a70894f89dd268c276d5eb47a34827 refactor: Replace ListWalletDir() function with ListDatabases() (Russell Yanofsky) 5aaeb6cf877055c47fa2bbd2ea5e8d3d2033933b MOVEONLY: Move IsBDBFile, IsSQLiteFile, and ListWalletDir (Russell Yanofsky) Pull request description: This PR does not change behavior when bitcoin is built normally with both the SQLite and BDB libraries. It just makes non-SQLite and non-BDB builds more similar to the normal build. Specifically: - It makes wallet directory lists always include all wallets so wallets don't appear missing depending on the build. - It now triggers specific "Build does not support SQLite database format" and "Build does not support Berkeley DB database format" errors if a wallet can't be loaded instead of the more ambiguous and scary "Data is not in recognized format" error. Both changes are implemented in the last commit. The previous commits are just refactoring cleanups that make the last commit possible and consolidate and reduce code. ACKs for top commit: achow101: ACK f3d870fc2271bf45e0269e5ae135bced1a26f620 promag: Tested ACK f3d870fc2271bf45e0269e5ae135bced1a26f620. Tested a --without-sqlite build with sqlite wallets. Tree-SHA512: 029ad21559dbc338b5f351d05113c51bc25bce830f4f4e18bcd82287bc528275347a60249da65b91d252632aeb70b25d057bd59c704bfcaafb9f790bc5b59762
2020-12-11Merge #19858: Periodically make block-relay connections and sync headersMarcoFalke
b3a515c0bec97633a76bec101af47c3c90c0b749 Clarify comments around outbound peer eviction (Suhas Daftuar) daffaf03fbede6c01287779e464379ee3acb005a Periodically make block-relay connections and sync headers (Suhas Daftuar) 3cc8a7a0f5fa183cd7f0cf5e56f16f9a9d1f2441 Use conn_type to identify block-relay peers, rather than m_tx_relay == nullptr (Suhas Daftuar) 91d61952a82af3e8887e8ae532ecc19d87fe9073 Simplify and clarify extra outbound peer counting (Suhas Daftuar) Pull request description: To make eclipse attacks more difficult, regularly initiate outbound connections and stay connected long enough to sync headers and potentially learn of new blocks. If we learn a new block, rotate out an existing block-relay peer in favor of the new peer. This augments the existing outbound peer rotation that exists -- currently we make new full-relay connections when our tip is stale, which we disconnect after waiting a small time to see if we learn a new block. As block-relay connections use minimal bandwidth, we can make these connections regularly and not just when our tip is stale. Like feeler connections, these connections are not aggressive; whenever our timer fires (once every 5 minutes on average), we'll try to initiate a new block-relay connection as described, but if we fail to connect we just wait for our timer to fire again before repeating with a new peer. ACKs for top commit: ariard: Code Review ACK b3a515c, only change since last time is dropping a useless `cs_main` taking. I manually tested a previous version of the PR, and not substantial change has been introduced since then which would alter behavior IMO. jonatack: Tested ACK b3a515c0bec97633a76bec101af47c3c90c0b749 over several weeks, though this change and behavior could benefit from test coverage and other follow-ups (refactoring, etc.) described in the review feedback. I did not verify the behavior of `m_start_extra_block_relay_peers` only being enabled after initial chain sync. Since my last review, one unneeded `cs_main` lock was removed. Tree-SHA512: 75fc6f8e8003e88e93f86b845caf2d30b8b9c0dbb0a6b8aabe4e24ea4f6327351f736a068a3b2720a8a581b789942a3a47f921e2afdb47e88bc50d078aa37b6f
2020-12-11Merge #19982: test: Fix inconsistent lock order in wallet_tests/CreateWalletfanquake
e1e68b6305beb47ebf7ee48f14e12fdebdfea1ef test: Fix inconsistent lock order in wallet_tests/CreateWallet (Hennadii Stepanov) cb23fe01c125e1820f3c37348e06d98c93e6aec2 [skip ci] sync: Check precondition in LEAVE_CRITICAL_SECTION() macro (Hennadii Stepanov) c5e3e74f70c29ac8852903ef425f5f327d5da969 sync: Improve CheckLastCritical() (Hennadii Stepanov) Pull request description: This PR: - fixes #19049 that was caused by #16426 - removes `wallet_tests::CreateWallet` suppression from the `test/sanitizer_suppressions/tsan` The example of the improved `CheckLastCritical()`/`LEAVE_CRITICAL_SECTION()` log (could be got when compiled without the last commit): ``` 2020-09-20T08:34:28.429485Z [test] INCONSISTENT LOCK ORDER DETECTED 2020-09-20T08:34:28.429493Z [test] Current lock order (least recent first) is: 2020-09-20T08:34:28.429501Z [test] 'walletInstance->cs_wallet' in wallet/wallet.cpp:4007 (in thread 'test') 2020-09-20T08:34:28.429508Z [test] 'cs_wallets' in wallet/wallet.cpp:4089 (in thread 'test') ``` Currently, there are other "naked" `LEAVE_CRITICAL_SECTION()` in the code base: https://github.com/bitcoin/bitcoin/blob/b99a1633b270e0e89479b2bb2ae19a8a8dc0fa05/src/rpc/mining.cpp#L698 https://github.com/bitcoin/bitcoin/blob/b99a1633b270e0e89479b2bb2ae19a8a8dc0fa05/src/checkqueue.h#L208 ACKs for top commit: MarcoFalke: review ACK e1e68b6305beb47ebf7ee48f14e12fdebdfea1ef šŸ’‚ ryanofsky: Code review ACK e1e68b6305beb47ebf7ee48f14e12fdebdfea1ef. Just trivial rebase and suggested switch to BOOST_CHECK_EXCEPTION since last review vasild: ACK e1e68b630 Tree-SHA512: a627680eac3af4b4c02772473d68322ce8d3811bf6b035d3485ccc97d35755bef933cffabd3f20b126f89e3301eccecec3f769df34415fb7c426c967b6ce36e6
2020-12-10test: Fix inconsistent lock order in wallet_tests/CreateWalletHennadii Stepanov
2020-12-10[skip ci] sync: Check precondition in LEAVE_CRITICAL_SECTION() macroHennadii Stepanov
This change reveals a bug in the wallet_tests/CreateWalletFromFile test, that will be fixed in the following commit.
2020-12-10sync: Improve CheckLastCritical()Hennadii Stepanov
This commit adds actual lock stack logging if check fails.
2020-12-10Remove m_is_manual_connection from CNodeStateAntoine Riard
Currently, this member is only used to exclude MANUAL peers from discouragement in MaybePunishNodeForBlock(). Manual connections are already protected in MaybeDiscourageAndDisconnect(), independently from their network processing behaviors.
2020-12-10Merge #20613: test: Use Popen.wait instead of RPC in ā†µMarcoFalke
assert_start_raises_init_error fa918dd537fea775c19a590e5f9161bf51a5839b test: Use Popen.wait instead of RPC in assert_start_raises_init_error (MarcoFalke) Pull request description: Using RPC (`wait_for_rpc_connection`) has several issue: * It polls in a loop, which might be slow * It tries to read the RPC cookie file, which might not be present, thus leading to intermittent issues Fix both by using `Popen.wait` ACKs for top commit: laanwj: Code review ACK ~~faf7b05be9c86ee61c39e5314511fe2410128a6b~~ fa918dd537fea775c19a590e5f9161bf51a5839b darosior: ACK fa918dd537fea775c19a590e5f9161bf51a5839b Tree-SHA512: 5368ad0d0ea2deb0af9582a42667c9290efe8f2705f37a236afc2c7908b04265ab342e2dd356a57156e99389f4a27ab6da9fa7bf9161fb7568240aa005e693b9
2020-12-10Clarify comments around outbound peer evictionSuhas Daftuar
2020-12-10Periodically make block-relay connections and sync headersSuhas Daftuar
To make eclipse attacks more difficult, regularly initiate outbound connections and stay connected long enough to sync headers and potentially learn of new blocks. If we learn a new block, rotate out an existing block-relay peer in favor of the new peer. This augments the existing outbound peer rotation that exists -- currently we make new full-relay connections when our tip is stale, which we disconnect after waiting a small time to see if we learn a new block. As block-relay connections use minimal bandwidth, we can make these connections regularly and not just when our tip is stale. Like feeler connections, these connections are not aggressive; whenever our timer fires (once every 5 minutes on average), we'll try to initiate a new block-relay connection as described, but if we fail to connect we just wait for our timer to fire again before repeating with a new peer.
2020-12-10Merge #20587: [doc] Tidy up Tor doc (more stringent)Wladimir J. van der Laan
32045bbfd5d77513efc162be8d4e24ea67539e27 [doc] Tidy up Tor doc (more stringent) (wodry) Pull request description: This is a follow up to https://github.com/bitcoin/bitcoin/pull/19638 that left two deprecated "hidden service/server" naming occurences. It also shall make the chapter titles regarding creation of onion services stringent and easy to read and distinguish. It removes the one and only reference to the testnet (here the testnet onion service port), as it is not explained that it references to the testnet and I do not know why it is mentioned there. It is only confusing. Also, as said, the testnet is not referenced at any other place in this document. ACKs for top commit: practicalswift: ACK 32045bbfd5d77513efc162be8d4e24ea67539e27 laanwj: Review ACK 32045bbfd5d77513efc162be8d4e24ea67539e27 RiccardoMasutti: ACK 32045bb Tree-SHA512: c623387b76d68845c0fa47f67a6f8ef70c9c560e3f8f8754e45a4f51e43198c2092be789588acd4ada607f42fbe62d51a4b1888d81b225df19b6557a081835c0
2020-12-10Use conn_type to identify block-relay peers, rather than m_tx_relay == nullptrSuhas Daftuar
2020-12-10Simplify and clarify extra outbound peer countingSuhas Daftuar
2020-12-10Merge #20527: build: Do not ignore Homebrew's SQLite on macOSJonas Schnelli
c932e0d67e4b369e4265267da6c8bebac2b6fb53 doc: Update wallet database installation guide for macOS (Hennadii Stepanov) ee7b84e63cbeadd5e680d69ff0548275581e9241 build: Use Homebrew's sqlite package if it is available (Hennadii Stepanov) c96d1f65a552712f8476269ad64a415717ead50d build, refactor: Check that Homebrew's qt5 package is actually installed (Hennadii Stepanov) Pull request description: On master (7ae86b3c6845873ca96650fc69beb4ae5285c801) installed Homebrew `sqlite` package is ignored during build on macOS. This PR fixes this issue and update macOS build docs. Closes #20498. ACKs for top commit: willcl-ark: > > That said, another tACK of [c932e0d](https://github.com/bitcoin/bitcoin/commit/c932e0d67e4b369e4265267da6c8bebac2b6fb53) hebasto: > That said, another tACK of [c932e0d](https://github.com/bitcoin/bitcoin/commit/c932e0d67e4b369e4265267da6c8bebac2b6fb53) laanwj: Code review ACK c932e0d67e4b369e4265267da6c8bebac2b6fb53 jonasschnelli: code review re-ACK c932e0d67e4b369e4265267da6c8bebac2b6fb53 Tree-SHA512: 2563f25534d065556b17ee8c0fca957aea61b5ae288a2aa72743e77607843a45c39f209321e0f05b34283a74d2edcf961cf1dc54a35ed0cc21182304bb961505
2020-12-10Merge #20549: Support make src/bitcoin-node and src/bitcoin-guiWladimir J. van der Laan
206f74e88cfa343d228c1d6596d3846863824ca5 Support make src/bitcoin-node and src/bitcoin-gui (JoĆ£o Barbosa) Pull request description: This change adds the following configure output variables ``` dnl Multi Process BITCOIN_MP_NODE_NAME=bitcoin-node BITCOIN_MP_GUI_NAME=bitcoin-gui ``` and adds support for ```sh make src/bitcoin-node src/bitcoin-gui ``` ACKs for top commit: laanwj: Code review ACK 206f74e88cfa343d228c1d6596d3846863824ca5 Tree-SHA512: 4d1a694b9010ecc267ee955f4475127a58e6da72f30179ec740285ee6fe03cd91dcb6847317a47460dbd548edb88b7da6c7a98eac10f0dabe3ce4e83e0aa8093
2020-12-10test: Use Popen.wait instead of RPC in assert_start_raises_init_errorMarcoFalke
2020-12-10Merge #20567: test: Add option to git-subtree-check to do full check, add helpWladimir J. van der Laan
34c80d9eee7d21755f2bb80f7c97fd30d2c7b656 test: Add option to git-subtree-check to do full check, add help (Wladimir J. van der Laan) Pull request description: This adds a brief help text to `git-subtree-check.sh` and adds an option to do a full remote check instead of having two different code paths with a successful exit status. Also make it explicit that the CI is not doing this. ACKs for top commit: fjahr: tested ACK 34c80d9eee7d21755f2bb80f7c97fd30d2c7b656 Tree-SHA512: 20f672fd3b3c1d633eccf9998fdd738194cdd7d10cc206691f2dcc28bbbf8187b8d06b87814f875a06145b179f5ca1f4f4f9922972be72759cf5ac6e0c11abd1
2020-12-10Merge #20589: log: Clarify that failure to read/write fee_estimates.dat is ā†µWladimir J. van der Laan
non-fatal fa0d8359b351fd179a0a2f458671a4d7828c9a80 log: Clarify that failure to read fee_estimates.dat is non-fatal (MarcoFalke) faefa5db5f1d95b772873f4429e8a8fbb4e71cf3 log: Clarify that failure to write fee_estimates.dat is non-fatal (MarcoFalke) Pull request description: two minor logging fixups ACKs for top commit: practicalswift: ACK fa0d8359b351fd179a0a2f458671a4d7828c9a80: patch looks correct laanwj: Code review ACK fa0d8359b351fd179a0a2f458671a4d7828c9a80 Tree-SHA512: d1e7e595d3b4a5e497ee7ab70f3be5783dafec2726ef8e012db836c15e8e622022859a4472d6b516fe19d327737b25fdfb509cd9aeb022ca847b13c54e55800a
2020-12-10Merge #20595: Improve heuristic hex transaction decodingWladimir J. van der Laan
0f949cde3dff15170db7930b0f7345ff995c267d Add regression test for incorrect decoding (Pieter Wuille) 39c42c442044aef611d03ee7053d2dd6df63deb7 Improve heuristic hex transaction decoding (Pieter Wuille) Pull request description: The current hex tx decoding logic will refuse to decode valid extended-encoded transactions if the result fails the heuristic sanity check, even when the legacy-encoding fails. Fix this. Fixes #20579 ACKs for top commit: achow101: Code review ACK 0f949cde3dff15170db7930b0f7345ff995c267d jonatack: Tested ACK 0f949cde3dff15170db7930b0f7345ff995c267d laanwj: Code review ACK 0f949cde3dff15170db7930b0f7345ff995c267d Tree-SHA512: bd6dc80d824eb9a87026a623be910cac92173f8ce1c8b040c2246348c3cf0c6d64bcc40127b859e5e4da1efe88cf02a6945f7ebb91079799395145cb09d9c7a5
2020-12-10Merge #20609: configure: output notice that test binary is disabled by fuzzingMarcoFalke
904d875cf5aecc337daa6a2243a803033cf4eee3 configure: output notice that test binary is disabled by fuzzing (Andrew Poelstra) Pull request description: I wasted a bit of time today running a stale `test_bitcoin` and not understanding why, until I remembered that I'd ./configured my working directory with --enable-fuzz. Top commit has no ACKs. Tree-SHA512: 6cbe30547332114ad3fe61c67e224f5a28aac4b1b58e0acecb29cb04f5a34f792c927797aa8000449aae076435bd45acf209b7323b0b48fa971705d6ed3e6529
2020-12-10Merge #20573: wallet, bugfix: allow send with string fee_rate amountsMarcoFalke
6fa72ceb8021c3b5aea62f6cfe92665c29212923 test: add coverage for passing fee rate as a string (Jon Atack) ce207d6b93d35bc02fcd2dd28f1fd95869261d43 wallet, bugfix: allow send to take string fee rate values (Jon Atack) Pull request description: RPC send currently only accepts fee rates as numbers, which is a user-facing bug. It should accept fee rates as an amount, e.g. a string or a number, as documented in its help and like sendtoaddress, sendmany, fundrawtransaction, walletcreatefundedpsbt, and bumpfee. Provide a fix and regression test coverage. ACKs for top commit: MarcoFalke: review ACK 6fa72ceb8021c3b5aea62f6cfe92665c29212923 achow101: Code review ACK 6fa72ceb8021c3b5aea62f6cfe92665c29212923 promag: Code review ACK 6fa72ceb8021c3b5aea62f6cfe92665c29212923. Tree-SHA512: 735f9269cb1b81953764b5283449c0b154bd62de034225be5bcedc515c84faf767fe8fe0741008679fe412922c847b00d116cb11aab775236b779c847ba87167
2020-12-10Merge #19776: net, rpc: expose high bandwidth mode state via getpeerinfoMarcoFalke
343dc4760fd2407895fc8b3417a504b194429156 test: add test for high-bandwidth mode states in getpeerinfo (Sebastian Falbesoner) dab6583307ceb7dd94affcc3482ddcc1a5747147 doc: release note for new getpeerinfo fields "bip152_hb_{from,to}" (Sebastian Falbesoner) a7ed00f8bbc07dfc09f9e0a5bae10a1afe7612bb rpc: expose high-bandwidth mode states via getpeerinfo (Sebastian Falbesoner) 30bc8fab6833e0447ceadd3fff1566a680e33a98 net: save high-bandwidth mode states in CNodeStats (Sebastian Falbesoner) Pull request description: Fixes #19676, "_For every peer expose through getpeerinfo RPC whether or not we selected them as HB peers, and whether or not they selected us as HB peers._" See [BIP152](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki), in particular the [protocol flow diagram](https://github.com/bitcoin/bips/raw/master/bip-0152/protocol-flow.png). The newly introduced states are changed on the following places in the code: * on reception of a `SENDCMPCT` message with valid version, the field `m_highbandwidth_from` is changed depending on the first integer parameter in the message (1=high bandwidth, 0=low bandwidth), i.e. it just mirrors the field `CNodeState.fPreferHeaderAndIDs`. * after adding a `SENDCMPCT` message to the send queue, the field `m_highbandwidth_to` is changed depending on how the first integer parameter is set (same as above) Note that after receiving `VERACK`, the node also sends `SENDCMPCT`, but that is only to announce the preferred version and never selects high-bandwidth mode, hence there is no need to change the state variables there, which are initialized to `false` anyways. ACKs for top commit: naumenkogs: reACK 343dc4760fd2407895fc8b3417a504b194429156 jonatack: re-ACK 343dc4760fd2407895fc8b3417a504b194429156 per `git range-diff 7ea6499 4df1d12 343dc47` Tree-SHA512: f4999e6a935266812c2259a9b5dc459710037d3c9e938006d282557cc225e56128f72965faffb207fc60c6531fab1206db976dd8729a69e8ca29d4835317b99f
2020-12-10Merge #20217: net: Remove g_relay_txesMarcoFalke
34e33ab8592d757b3acfe812c20d235029bbc319 Remove g_relay_txes (John Newbery) 68334b39443b3cfd75b0ef815ac40074185386f2 [net processing] Add m_ignores_incoming_txs to PeerManager and use internally (John Newbery) 4d510aa055064df5a10c2cc7888baffc3e6bc0e6 [init] Use MakeUnique<> to construct peerman (John Newbery) f3f61d0eb937ada5fd00d7d590f5f29325f7f414 [net processing] Add IgnoresIncomingTxs() function to PeerManager (John Newbery) 5805b8299f8f4943114de53c4dc09fc2dd9e270b [net processing] Move PushNodeVersion into PeerManager (John Newbery) Pull request description: `g_relay_txes` is only required inside net_processing and is set only once at startup. Instead of having a global, move it to be a const member of PeerManager. This requires moving `PushNodeVersion()` into `PeerManager`, which also allows us to remove the `connman` argument. ACKs for top commit: narula: utACK 34e33ab8592d757b3acfe812c20d235029bbc319 MarcoFalke: re-ACK 34e33ab85 šŸ’ Tree-SHA512: 33f75b522e5f34b243731932eb96cd6c8ce9db69b5186395e3718858bc715cec1711a663c6afc5880462812cbc15040930e2dc648b2acad6bc6502ad1397c5e3
2020-12-10Merge #20608: contrib: add symbol check test for PE binariesfanquake
ae9b48995bff505ea2b771313cac65d9acf6f29e contrib: add symbol check test for PE (fanquake) Pull request description: Follow up to #20476. Adds a test for the PE symbol check. One failing case where we link against `-lpdh` and a pass case. ACKs for top commit: laanwj: Code review ACK ae9b48995bff505ea2b771313cac65d9acf6f29e dongcarl: Code Review ACK ae9b48995bff505ea2b771313cac65d9acf6f29e Tree-SHA512: 14109d2c7cb98fb445fe1a7f3078e1e88c49fd29583529c53c75bb625f3060d43df0c64542df72272cff81e1b073f74ce6e437ad0e6617ba2bcccacfd1dc8e53
2020-12-10Merge #20046: depends: Set CMAKE_INSTALL_RPATH for native packagesfanquake
7d0271b5c30f86e4af175a5ab7df5e593cd85195 depends: Set CMAKE_INSTALL_RPATH for native packages (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). --- After #19685 started setting `LDFLAGS`, the `INSTALL_RPATH_USE_LINK_PATH` cmake option used in the libmultiprocess build no longer works, so it is neccessary to set `CMAKE_INSTALL_RPATH` as a fallback. It's unclear currently whether the bad interaction between `INSTALL_RPATH_USE_LINK_PATH` and `LDFLAGS` is a bug, but the issue is reported: - https://github.com/bitcoin/bitcoin/issues/19981#issuecomment-696680877 - https://discourse.cmake.org/t/install-rpath-use-link-path-not-working-when-cmake-exe-linker-flags-ldflags-is-set/1892 Fixes #19981 ACKs for top commit: fanquake: ACK 7d0271b5c30f86e4af175a5ab7df5e593cd85195 - I haven't looked in depth, but I've re-read through #19981 and checked the failure by testing #19160 (with this reverted): dongcarl: ACK 7d0271b Looked into this a bit, it makes sense that for the things we build in depends, we want the library search to start in depends. It seems reasonable to expect this to happen automatically when `CMAKE_INSTALL_PREFIX` and `INSTALL_RPATH_USE_LINK_PATH` are set, but oh well... Tree-SHA512: 97cc5801c3204c14cd33004423631456ca0701e2127ee5146810a76e2f4aac9de1f4b5437402a4329cda54e022dc99270fee7e38c2995765f36b3848215fa78e
2020-12-09configure: output notice that test binary is disabled by fuzzingAndrew Poelstra
2020-12-09Merge #20603: build: Update crc32c subtreeWladimir J. van der Laan
90c0f267bdedc261d8fdab188e96ca58c206652a Squashed 'src/crc32c/' changes from 224988680f..b5ef9be675 (MarcoFalke) Pull request description: Except for the ARM64 darwin fix this is just code-shuffling in files/functions we don't use ACKs for top commit: jonasschnelli: Tested ACK fa7c8d136f6590e54d60c37fb34ebec8da84ebbb - Tested this on an ARM Mac. Linking issue went away (successful depends compilation). Also tested that the ARM64 hardware acceleration code part was used. laanwj: Code review ACK fa7c8d136f6590e54d60c37fb34ebec8da84ebbb Tree-SHA512: 1fa156d72c75d22ead2677b165e566978331f795d52a637e478d83d1cf2adddd84eed259d617df6d11270af2e4e57ae6991aec3bc4c0bdf5dec959f44daa14eb
2020-12-09Remove g_relay_txesJohn Newbery
Also remove vestigial commend in init.cpp
2020-12-09[net processing] Add m_ignores_incoming_txs to PeerManager and use internallyJohn Newbery
2020-12-09[init] Use MakeUnique<> to construct peermanJohn Newbery
2020-12-09[net processing] Add IgnoresIncomingTxs() function to PeerManagerJohn Newbery
2020-12-09[net processing] Move PushNodeVersion into PeerManagerJohn Newbery
2020-12-09Merge #20602: util: Allow use of C++14 chrono literalsMarcoFalke
fa11110bff6288f63e0c487e2e4b4079fb0f4569 util: Allow use of C++14 chrono literals (MarcoFalke) Pull request description: I think we should allow the use of chrono literals for new code to make it less verbose. Obviously old code can stay as-is. This patch pulls in the needed namespace and replaces some lines for illustrative purposes. ACKs for top commit: vasild: ACK fa11110bff6288f63e0c487e2e4b4079fb0f4569 jonatack: ACK fa11110bff6288f63e0c487e2e4b4079fb0f4569 Tree-SHA512: ee2b72c8f28dee07b33b9a8ee8f7c87c0bc43b05c56a17b786cf9803ef204c7628e01b02de1af1a4eb01f5cdf6fc336f69c2833e17acd606ebda20ac6917e6bb
2020-12-09Merge #20606: Remove unused bits from service flags enumWladimir J. van der Laan
fa40168ab3102b9ad850f967a0e7fa22dbfbd0c6 Remove unused bits from service flags enum (MarcoFalke) Pull request description: Remove service bits that haven't been observed on the active network for years and won't ever be observed on the network with this meaning. Keeping this dead assignment in our source code forever doesn't add any value. I somehow forgot to do this in commit fa0d0ff6e1bee60fde63724ae28a51aac5a94d4a. ACKs for top commit: laanwj: Code review ACK fa40168ab3102b9ad850f967a0e7fa22dbfbd0c6 practicalswift: cr ACK fa40168ab3102b9ad850f967a0e7fa22dbfbd0c6 fanquake: ACK fa40168ab3102b9ad850f967a0e7fa22dbfbd0c6 Tree-SHA512: 376e5ac05940493cf2209fea60515c843e978c4b476f2524f6bf7a37a646d237c3ddcf6c0fa23641f9ba550f625609703d9b51b4be631a7f2a90e1092b557232
2020-12-09contrib: add symbol check test for PEfanquake
2020-12-09Merge #19910: net processing: Move peer_map to PeerManagerfanquake
3025ca9e7743d9b96c22e9c6ed7ef051dcea7e54 [net processing] Add RemovePeer() (John Newbery) a20ab22786466fe5164b53e62de9d23a4062fbca [net processing] Make GetPeerRef const (John Newbery) ed7e469ceec6f7101a3fb7b15c21a6fb69697866 [net_processing] Move peer_map to PeerManager (John Newbery) a529fd3e3f2391e592ac937e291fec51e067ea2e [net processing] Move GetNodeStateStats into PeerManager (John Newbery) Pull request description: This moves `g_peer_map` from a global in net_processing.cpp's unnamed namespace to being a member `m_peer_map` of `PeerManager`. ACKs for top commit: theuni: Re-ACK 3025ca9e7743d9b96c22e9c6ed7ef051dcea7e54. dongcarl: Re-ACK 3025ca9 hebasto: re-ACK 3025ca9e7743d9b96c22e9c6ed7ef051dcea7e54, since my [previous](https://github.com/bitcoin/bitcoin/pull/19910#pullrequestreview-545574237) review only reverted the change that introduced NRVO in `PeerManager::GetPeerRef`, and comments are fixed in the proper commits. Tree-SHA512: 6369eb3c688ac5b84f89f7674115f78ff02edbed76063ac2ebb1759894c9e973883e10821a35dab92bd3d738280acc095bd5368f552a060b83cd309330387d47
2020-12-09Merge #20323: tests: Create or use existing properly initialized NodeContextsMarcoFalke
81137c60fe6234569e1c5e6760f3a6f016956944 test: Add new ChainTestingSetup and use it (Carl Dong) 7e9e7fe56734d729ed7de39e880577b135dfd368 qt/test: [FIX] Add forgotten Context setting in RPCNestedTests (Carl Dong) Pull request description: This is part 1/n of the effort to [de-globalize `ChainstateManager`](https://github.com/bitcoin/bitcoin/pull/20158) Reviewers: Looking for tested/Code-Review/plain-ACKs ### Context In many of our tests, we manually instantiate `NodeContext`s or `ChainstateManager`s in the test code, which is error prone. Instead, we should create or use existing references because: 1. Before we [de-globalize `ChainstateManager`](https://github.com/bitcoin/bitcoin/pull/20158), much of our code still acts on `g_chainman` (our global `ChainstateManager`), sometimes even when you're calling a method on a specific instance of `ChainstateManager`! This means that we may act on two instances of `ChainstateManager`, which is most likely not what we want. 2. Using existing references (initialized by the `{Basic,}TestingSetup` constructors) means that you're acting on objects which are properly initialized, instead of "just initialized enough for this dang test to pass". Also, they're already there! It's free! 3. By acting on the right object, we also allow the review-only assertions in future commits of [de-globalize `ChainstateManager`](https://github.com/bitcoin/bitcoin/pull/20158) to work and demonstrate correctness. Some more detailed debugging notes can be found in the first commit, reproduced below: ``` Previously, the validation_chainstatemanager_tests test suite instantiated its own duplicate ChainstateManager on which tests were performed. This wasn't a problem for the specific actions performed in that suite. However, the existence of this duplicate ChainstateManager and the fact that many of our validation static functions reach for g_chainman, ::Chain(state|)Active means we may end up acting on two different CChainStates should we write more extensive tests in the future. This change adds a new ChainTestingSetup which performs all initialization previously done by TestingSetup except: 1. Mempool sanity check frequency setting 2. ChainState initialization 3. Genesis Activation 4. {Ban,Conn,Peer}Man initialization Means that we will no longer need to initialize a duplicate ChainstateManger in order to test the initialization codepaths of CChainState and ChainstateManager. Lastly, this change has the additional benefit of allowing for review-only assertions meant to show correctness to work in future work de-globalizing g_chainman. In the test chainstatemanager_rebalance_caches, an additional LoadGenesisBlock call is added as MaybeReblanaceCaches eventually calls FlushBlockFile, which tries to access vinfoBlockFile[nLastBlockFile], which is out of bounds when LoadGenesisBlock hasn't been called yet. ----- Note for the future: In a previous version of this change, I put ChainTestingSetup between BasicTestingSetup and TestingSetup such that TestingSetup inherited from ChainTestingSetup. This was suboptimal, and showed how the class con/destructor inheritance structure we have for these TestingSetup classes is probably not the most suitable abstraction. In particular, for both TestingSetup and ChainTestingSetup, we need to stop the scheduler first before anything else. Otherwise classes depending on the scheduler may be referenced by the scheduler after said classes are freed. This means that there's no clear parallel between our teardown code and C++'s destructuring order for class hierarchies. Future work should strive to coalesce (as much as possible) test and non-test init codepaths and perhaps structure it in a more fail-proof way. ``` ACKs for top commit: MarcoFalke: ACK 81137c60fe looking excellent now šŸ© jnewbery: ACK 81137c60fe6234569e1c5e6760f3a6f016956944 ryanofsky: Code review ACK 81137c60fe6234569e1c5e6760f3a6f016956944. This change is simpler after the rebase because wallet & bench commits are dropped. Tree-SHA512: a8d84f08f2db6428b0b88449bdc814c9db35b7559156d536dfebd3225c2707dba65959e76d2152e3f8c96eacbf1e0b0000f745edf1e196deddb97ff1ef360953
2020-12-09Merge #20564: Don't send 'sendaddrv2' to pre-70016 software, and send before ā†µMarcoFalke
'verack' 1583498fb6781c01ca2f33c09319ed793964c574 Send and require SENDADDRV2 before VERACK (Pieter Wuille) c5a89196602e43ebb1cdc9cd4f08d153419c13e1 Don't send 'sendaddrv2' to pre-70016 software (Pieter Wuille) Pull request description: BIP155 defines addrv2 and sendaddrv2 for all protocol versions, but some implementations reject messages they don't know. As a courtesy, don't send it to nodes with a version before 70016, as no software is known to support BIP155 that doesn't announce at least that protocol version number. Also move the sending of sendaddrv2 earlier (before sending verack), as proposed in https://github.com/bitcoin/bips/pull/1043. This has the side effect that local address broadcast of torv3 will work (as it'll only trigger after we know whether or not the peer supports addrv2). ACKs for top commit: MarcoFalke: ACK 1583498fb6781c01ca2f33c09319ed793964c574 jnewbery: ACK 1583498fb6781c01ca2f33c09319ed793964c574 jonatack: ACK 1583498fb6781c01ca2f33c09319ed793964c574 vasild: ACK 1583498 Tree-SHA512: 3bd5833fa8c8567b6dedd99e4a9b6bb71c127aa66d5284b217503c86d597dc59aa7382c41f3a4bf561bb658b89db81d1a7703a700eef4ffc17cb916660e23a82
2020-12-08Add regression test for incorrect decodingPieter Wuille
2020-12-08test: Add new ChainTestingSetup and use itCarl Dong
Previously, the validation_chainstatemanager_tests test suite instantiated its own duplicate ChainstateManager on which tests were performed. This wasn't a problem for the specific actions performed in that suite. However, the existence of this duplicate ChainstateManager and the fact that many of our validation static functions reach for g_chainman, ::Chain(state|)Active means we may end up acting on two different CChainStates should we write more extensive tests in the future. This change adds a new ChainTestingSetup which performs all initialization previously done by TestingSetup except: 1. RPC command registration 2. ChainState initialization 3. Genesis Activation 4. {Ban,Conn,Peer}Man initialization Means that we will no longer need to initialize a duplicate ChainstateManger in order to test the initialization codepaths of CChainState and ChainstateManager. Lastly, this change has the additional benefit of allowing for review-only assertions meant to show correctness to work in future work de-globalizing g_chainman. In the test chainstatemanager_rebalance_caches, an additional LoadGenesisBlock call is added as MaybeReblanaceCaches eventually calls FlushBlockFile, which tries to access vinfoBlockFile[nLastBlockFile], which is out of bounds when LoadGenesisBlock hasn't been called yet. ----- Note for the future: The class con/destructor inheritance structure we have for these TestingSetup classes is probably not the most suitable abstraction. In particular, for both TestingSetup and ChainTestingSetup, we need to stop the scheduler first before anything else. Otherwise classes depending on the scheduler may be referenced by the scheduler after said classes are freed. This means that there's no clear parallel between our teardown code and C++'s destructuring order for class hierarchies. Future work should strive to coalesce (as much as possible) test and non-test init codepaths and perhaps structure it in a more fail-proof way.
2020-12-08qt/test: [FIX] Add forgotten Context setting in RPCNestedTestsCarl Dong
2020-12-08build: Update crc32c subtreeMarcoFalke