aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-10-14scripted-diff: rename vRecvGetDataNeha Narula
-BEGIN VERIFY SCRIPT- sed -i 's/vRecvGetData/m_getdata_requests/g' src/net_processing.cpp -END VERIFY SCRIPT-
2020-10-14Guard vRecvGetData (now in net processing) with its own mutexNeha Narula
This requires slightly reorganizing the logic in GETBLOCKTXN to maintain locking order.
2020-10-14Move vRecvGetData to net processingNeha Narula
2020-10-14Lock before checking if orphan_work_set is empty; indicate it is guardedNeha Narula
2020-10-14Move m_orphan_work_set to net_processingNeha Narula
2020-10-14Merge #18750: build: optionally skip external warningsWladimir J. van der Laan
ba8950ee0134a7958e3e9b041cd54d222feb09a1 build: optionally skip external warnings (Vasil Dimov) Pull request description: Add an option to `./configure` to suppress compilation warnings from external headers. The option is off by default (no change in behavior, show warnings from external headers). This option is useful if e.g. Boost or Qt is installed outside of `/usr/include` (warnings from headers in `/usr/include` are already suppressed by default) and those warnings stand in the way of compiling Bitcoin Core with `-Werror[=...]` or they just clutter the build output too much and make our own warnings hard to spot. `-isystem /usr/include` bricks GCC's `#include_next`, so we use `-idirafter` instead. This way we don't have to treat `/usr/include` specially. ACKs for top commit: practicalswift: ACK ba8950ee0134a7958e3e9b041cd54d222feb09a1: diff looks correct! hebasto: ACK ba8950ee0134a7958e3e9b041cd54d222feb09a1, tested on Linux Mint 20 (x86_64). luke-jr: utACK ba8950ee0134a7958e3e9b041cd54d222feb09a1 Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
2020-10-14refactor: promote some -netinfo localvars to class membersJon Atack
2020-10-14cli: simplify -netinfo using getpeerinfo network fieldJon Atack
2020-10-14rpc, test: expose CNodeStats network in RPC getpeerinfoJon Atack
2020-10-14net: add peer network to CNodeStatsJon Atack
2020-10-14Merge #20130: Wallet: remove db mode stringWladimir J. van der Laan
135afa749c6e835ea33b8678cdb35da9640eede8 wallet: remove db mode string (Ivan Metlushko) Pull request description: This is a [follow-up](https://github.com/bitcoin/bitcoin/pull/19077#discussion_r500261927) for #19077 This PR simplifies DB interface by removing mode string from `WalletDatabase` and `WalletBatch`. The mode string was used to determine two flags for the instantiation of db connection: 1) read-only flag. Never used on connection level. And on batch level Is only used within `BerkeleyDatabase::Rewrite` where it's replaced with bool flag. 2) create flag. Is not required as we always check `require_existing` & `require_create` flags in `MakeDatabase()` before creating actual database instance. So we can safely default to always creating database if it doesn't exist yet. ACKs for top commit: achow101: ACK 135afa749c6e835ea33b8678cdb35da9640eede8 laanwj: Code review ACK 135afa749c6e835ea33b8678cdb35da9640eede8 Tree-SHA512: f49c07c7387c02e517a58199620a678a918f8dfc20d1347d29fd6adea0bc89698c26cb8eef42b0977961c11c207c4bbe109bc31059f47c126cc600b01fd987eb
2020-10-14Merge #20129: tests: don't export in6addr_loopbackMarcoFalke
8e4d62280e3d3fa729e71d557ba457a3e08349f8 tests: don't export in6addr_loopback (Vasil Dimov) Pull request description: Don't export `in6addr_loopback` because that upsets `contrib/devtools/symbol-check.py` Fixes https://github.com/bitcoin/bitcoin/issues/20127 ACKs for top commit: sipa: utACK 8e4d62280e3d3fa729e71d557ba457a3e08349f8 hebasto: ACK 8e4d62280e3d3fa729e71d557ba457a3e08349f8 Tree-SHA512: 216ffb53df55d2888317a81d18745308aaf93a3f3b45aa778166f7c91edb9741c28424d6333b35cefb5ece42b74e20ea21c761d93d8432798e7ec12097c2758f
2020-10-14net: Send post-verack handshake messages at most onceMarcoFalke
2020-10-14Merge #20109: Release notes and followups from 19339fanquake
88197b0769770913941a3361bff3a1c67a86f7d2 [doc] release notes for max fee checking (gzhao408) c201d73df3602dac75573a0ec3fe4c86bbc02585 style and nits for fee-checking in BroadcastTransaction (gzhao408) Pull request description: Pretty trivial... addresses some tiny comments from #19339. Also fixes a docs typo from #19940 and adds a release note about the error message change for testmempoolaccept. ACKs for top commit: achow101: ACK 88197b0769770913941a3361bff3a1c67a86f7d2 MarcoFalke: cr re-ACK 88197b0769770913941a3361bff3a1c67a86f7d2 Tree-SHA512: fff16d731426b9b4db5222df02633983402f4c7241551eec98bb1554145dbdc132f40ed8ca4abd5edcebe1f4d1e879fb6d11bd91730604f6552c10cdf65706a1
2020-10-13[Rename only] Rename orphan_work_set to m_orphan_work_set.Neha Narula
This helps distinguish the member from any local variables.
2020-10-13test: Speed up wallet_resendwallettransactions test with mockscheduler RPCMarcoFalke
2020-10-13rpc: Adjust witness-tx deserialize error messageMarcoFalke
2020-10-13Merge bitcoin-core/gui#102: Fix SplashScreen crash when run with -disablewalletMarcoFalke
c056064a4a93be3601a63b37afea41f8b878df79 gui: Fix SplashScreen crash when run with -disablewallet (Hennadii Stepanov) Pull request description: This PR fixes the bug introduced in https://github.com/bitcoin/bitcoin/pull/19099: ``` $ src/qt/bitcoin-qt -disablewallet bitcoin-qt: interfaces/node.cpp:236: auto interfaces::(anonymous namespace)::NodeImpl::walletClient()::(anonymous class)::operator()() const: Assertion `"m_context->wallet_client" && check' failed. Aborted (core dumped) ``` ACKs for top commit: Sjors: tACK c056064 promag: ACK c056064a4a93be3601a63b37afea41f8b878df79. Tree-SHA512: 263d9efd5899cc6e447dfc5142bf911ca627149fac0a1c5e5b58dd196aa5e0d12fe13e3f750fb5f3c4338222f7959935d2f77391263f967dbca2e0e79a416a29
2020-10-13Merge #20126: test: p2p_leak_tx.py improvements (use MiniWallet, add ↵MarcoFalke
p2p_lock acquires) 5b77f8098de537898151ab116d0e547fd6ff9466 test: add p2p_lock acquires in p2p_leak_tx.py (Sebastian Falbesoner) cc8c6823b4a8b74922f78ce6ce527ced9325bd49 test: use MiniWallet for p2p_leak_tx.py (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (p2p_leak_tx.py) to be run even with the Bitcoin Core wallet disabled by using the new MiniWallet instead, as proposed in #20078. It also adds missing p2p_lock acquires that need to be held while modifying internal p2p Interface state (in this case the `last_message` dictionary) to avoid data races. ACKs for top commit: laanwj: Code review ACK 5b77f8098de537898151ab116d0e547fd6ff9466 Tree-SHA512: 6661bc6e3491a9af4bf040f379e5955c525136397e99d3eadde92e247580d0d87efff750e6d3b1f6d9a4e578144a433a982f574ef056b44dd6bca33873a1bae6
2020-10-13Merge #20141: Avoid the use of abs64 in timedatafanquake
d1292f25f272401da0c58580521c74b1fa03a9ad Avoid the use of abs64 in timedata (Pieter Wuille) Pull request description: Fixes #20135. ACKs for top commit: kallewoof: ACK d1292f25f272401da0c58580521c74b1fa03a9ad jonatack: ACK d1292f25f272401da0c58580521c74b1fa03a9ad code/logic review, verified there are no remaining callers of `abs64()`, verified no warnings in a debug build practicalswift: ACK d1292f25f272401da0c58580521c74b1fa03a9ad MarcoFalke: ACK d1292f25f272401da0c58580521c74b1fa03a9ad 🎹 Tree-SHA512: d17e95c668eb5e02ea546433b3d1b5a0ccbfb2c9cec62fa67dad1844d7e278a2576fbc0b75bddbf4db9af7331e978148c7bef7fce7e6a07e0eb917ef1392f302
2020-10-13wallet: remove db mode stringIvan Metlushko
We never need to open database in read-only mode as it's controlled separately for every batch. Also we can safely create database if it doesn't exist already because require_existing option is verified in MakeDatabase before creating a new WalletDatabase instance.
2020-10-12Avoid the use of abs64 in timedataPieter Wuille
2020-10-12tests: dumping and minimizing of script assets dataPieter Wuille
This adds a --dumptests flag to the feature_taproot.py test, to dump all its generated test cases to files, in a format compatible with the script_assets_test unit test. A fuzzer for said format is added as well, whose primary purpose is coverage-based minimization of those dumps.
2020-10-12tests: add generic qa-asset-based script verification unit testPieter Wuille
This adds a unit test that does generic script verification tests, with positive/negative witnesses/scriptsigs, under various flags. The test data is large (several MB) so it's stored in the qa-assets repo.
2020-10-12tests: functional tests for Schnorr/Taproot/TapscriptPieter Wuille
A large functional test is added that automatically generates random transactions which exercise various aspects of the new rules, and verifies they are accepted into the mempool (when appropriate), and correctly accepted/rejected in (Python-constructed) blocks. Includes sighashing code and many tests by Johnson Lau. Includes a test by Matthew Zipkin. Includes several tests and improvements by Greg Sanders.
2020-10-12tests: add BIP340 Schnorr signature support to test frameworkPieter Wuille
Add a pure Python implementation of BIP340 signing and verification, tested against the BIP's test vectors.
2020-10-12--- [TAPROOT] Tests ---Pieter Wuille
2020-10-12Activate Taproot/Tapscript on regtest (BIP 341, BIP 342)Pieter Wuille
Define a versionbits-based activation for the new consensus rules on regtest. No activation or activation mechanism is defined for testnet or mainnet.
2020-10-12Make Taproot spends standard + policy limitsPieter Wuille
This adds a `TxoutType::WITNESS_V1_TAPROOT` for P2TR outputs, and permits spending them in standardness rules. No corresponding `CTxDestination` is added for it, as that isn't needed until we want wallet integration. The taproot validation flags are also enabled for mempool transactions, and standardness rules are added (stack item size limit, no annexes).
2020-10-12--- [TAPROOT] Regtest activation and policy ---Pieter Wuille
2020-10-12Implement Tapscript script validation rules (BIP 342)Johnson Lau
This adds a new `SigVersion::TAPSCRIPT`, makes the necessary interpreter changes to make it implement BIP342, and uses them for leaf version 0xc0 in Taproot script path spends.
2020-10-12Use ScriptExecutionData to pass through annex hashPieter Wuille
Instead of recomputing the annex hash every time a signature is verified, compute it once and cache it in a new ScriptExecutionData structure.
2020-10-12Implement Taproot validation (BIP 341)Pieter Wuille
This includes key path spending and script path spending, but not the Tapscript execution implementation (leaf 0xc0 remains unemcumbered in this commit). Includes constants for various aspects of the consensus rules suggested by Jeremy Rubin.
2020-10-12Support for Schnorr signatures and integration in SignatureCheckers (BIP 340)Pieter Wuille
This enables the schnorrsig module in libsecp256k1, adds the relevant types and functions to src/pubkey, as well as in higher-level `SignatureChecker` classes. The (verification side of the) BIP340 test vectors is also added.
2020-10-12Implement Taproot signature hashing (BIP 341)Johnson Lau
This implements the new sighashing scheme from BIP341, with all relevant whole-transaction values precomputed once and cached. Includes changes to PrecomputedTransactionData by Pieter Wuille.
2020-10-12Ignore incorrectly-serialized banlist.dat entriesPieter Wuille
2020-10-12Restore compatibility with old CSubNet serializationPieter Wuille
2020-10-12Report and verify expirationsPieter Wuille
2020-10-12Delete limitedmap as it is unused nowPieter Wuille
2020-10-12Make txid delay penalty also apply to fetches of orphan's parentsPieter Wuille
2020-10-12Expedite removal of tx requests that are no longer neededPieter Wuille
Whenever a transaction is added to the mempool or orphan pool, both its txid and wtxid are considered AlreadyHave, and thus will eventually be removed from m_txrequest. The same is true for hashes added to the reject filter, but note that sometimes only the wtxid is added (in which case only the wtxid can be removed from m_txrequest).
2020-10-12Reduce MAX_PEER_TX_ANNOUNCEMENTS for non-PF_RELAY peersPieter Wuille
Maintaining up to 100000 INVs per peer is excessive, as that is far more than fits in a typical mempool. Also disable the "overload" penalty for PF_RELAY peers.
2020-10-12Change transaction request logic to use txrequestPieter Wuille
This removes most transaction request logic from net_processing, and replaces it with calls to a global TxRequestTracker object. The major changes are: * Announcements from outbound (and whitelisted) peers are now always preferred over those from inbound peers. This used to be the case for the first request (by delaying the first request from inbound peers), and a bias afters. The 2s delay for requests from inbound peers still exists, but after that, if viable outbound peers remain for any given transaction, they will always be tried first. * No more hard cap of 100 in flight transactions per peer, as there is less need for it (memory usage is linear in the number of announcements, but independent from the number in flight, and CPU usage isn't affected by it). Furthermore, if only one peer announces a transaction, and it has over 100 in flight and requestable already, we still want to request it from them. The cap is replaced with an additional 2s delay (possibly combined with the existing 2s delays for inbound connections, and for txid peers when wtxid peers are available). Includes functional tests written by Marco Falke and Antoine Riard.
2020-10-12Add txrequest fuzz testsPieter Wuille
This adds a fuzz test that reimplements a naive reimplementation of TxRequestTracker (with up to 16 fixed peers and 16 fixed txhashes), and compares the real implementation against it.
2020-10-12Add txrequest unit testsPieter Wuille
Add unit tests for TxRequestTracker. Several scenarios are tested, randomly interleaved with eachother. Includes a test by Antoine Riard (ariard).
2020-10-12Add txrequest modulePieter Wuille
This adds a new module (unused for now) which defines TxRequestTracker, a data structure that maintains all information about transaction requests, and coordinates requests.
2020-10-12Merge #19998: net: Add CNode::ConnectedThroughNetwork member functionWladimir J. van der Laan
3984b78cd7f49e409377f2175a56e8e4bd71d1d8 test: Add tests for CNode::ConnectedThroughNetwork (Hennadii Stepanov) 49fba9c1aa699d3aa47ea4dafe07b47c8d0aac6e net: Add CNode::ConnectedThroughNetwork member function (Hennadii Stepanov) d4dde24034d7467883b290111da60527ab8048f8 net: Add CNode::m_inbound_onion data member (Hennadii Stepanov) Pull request description: This PR: - adds `CNode::ConnectedThroughNetwork` member function - is based on #19991, and only last two commits belong to it - is required for https://github.com/bitcoin-core/gui/pull/86 and #20002 ACKs for top commit: jonatack: re-ACK 3984b78cd7f49e409377f2175a56e8e4bd71d1d8 per `git diff 3989fcf 3984b78c` laanwj: Code review ACK 3984b78cd7f49e409377f2175a56e8e4bd71d1d8 Tree-SHA512: 23a9c8bca8dca75113b5505fe443b294f2d42d03c98c7e34919da12d8396beb8d0ada3a58ae16e3da04b7044395f72cf9c216625afc078256cd6c897ac42bf3d
2020-10-12build: optionally skip external warningsVasil Dimov
Add an option to `./configure` to suppress compilation warnings from external headers. The option is off by default (no change in behavior, show warnings from external headers). This option is useful if e.g. Boost or Qt is installed outside of `/usr/include` (warnings from headers in `/usr/include` are already suppressed by default) and those warnings stand in the way of compiling Bitcoin Core with `-Werror[=...]` or they just clutter the build output too much and make our own warnings hard to spot.
2020-10-12test: Remove unused nVersion=1 in p2p testsMarcoFalke
After commit ddefb5c0b759950942ac03f28c43b548af7b4033 nVersion is no longer used in p2p logic when sending messages. Only when receiving messages, but in this test no messages are received.
2020-10-12Add TaggedHash function (BIP 340)Pieter Wuille
This adds the TaggedHash function as defined by BIP340 to the hash module, which is used in BIP340 and BIP341 to produce domain-separated hashes.