aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-16Revert "Merge #19606: Backport wtxid relay to v0.20"MarcoFalke
This reverts commit a339289c2ef9caffa1195436695a13f6e48e1bbc, reversing changes made to b9ac31f2d29ae3e79c0f0cde5bab2d7213e6da51.
2020-11-05Merge #19606: Backport wtxid relay to v0.20Wladimir J. van der Laan
d4a1ee8f1d4c46ab726be83965bd86bace2ec1ec Further improve comments around recentRejects (Suhas Daftuar) f082a13ab756a378b260711a30d363f833a2306a Disconnect peers sending wtxidrelay message after VERACK (Suhas Daftuar) 22effa51a77a8b8c72ba3525cb08dd0cf8464715 test: Use wtxid relay generally in functional tests (Fabian Jahr) e4816819630d1e94469ca5499361e0cd2c9ac7c2 test: Add tests for wtxid tx relay in segwit test (Fabian Jahr) 6be398b6fb7a7d5c6c1fe6d74a0700b7ff93674e test: Update test framework p2p protocol version to 70016 (Fabian Jahr) e364b2a2d879e8d30ca9dbc578e4d169b41eb227 Rename AddInventoryKnown() to AddKnownTx() (Suhas Daftuar) 879a3cf2c2367d51310204d21030f3b218582c30 Make TX_WITNESS_STRIPPED its own rejection reason (Suhas Daftuar) c1d6a1003d601ec4ff7d9507563254b29868182f Delay getdata requests from peers using txid-based relay (Suhas Daftuar) 181ffadd162a84551b3518de77b5dcc08c712425 Add p2p message "wtxidrelay" (Suhas Daftuar) 93826726e76730b061ec4c91d69b2b34ebf98ec9 ignore non-wtxidrelay compliant invs (Anthony Towns) 2599277e9cb51e3619582978cba9bf03325c0cb6 Add support for tx-relay via wtxid (Suhas Daftuar) be1b7a8916fdd060db56846ad5dcec0894aae314 Add wtxids to recentRejects (Suhas Daftuar) 73845211d16ad1558d84c966ae18e3507fa7dea6 Add wtxids of confirmed transactions to bloom filter (Suhas Daftuar) 606755b840b1560e4f92c9252fa4cab6eacabdd3 Add wtxid-index to orphan map (Suhas Daftuar) 36549376740d28159a5834ecf4ed9eeeeef6715d Add a wtxid-index to mapRelay (Suhas Daftuar) f7833b5bd894aca2d8820402f4a500d71374ea0e Just pass a hash to AddInventoryKnown (Suhas Daftuar) 4df3d139b7261de33c070691f76a535b8b17433a Add a wtxid-index to the mempool (Suhas Daftuar) Pull request description: We want wtxid relay to be widely deployed before taproot activation, so it should be backported to v0.20. The main difference from #18044 is removing the changes to the unbroadcast set (which was only added post-v0.20). The rest is mostly minor rebase conflicts (eg connman changed from a pointer to a reference in master, etc). We'll also want to backport #19569 after that's merged. ACKs for top commit: fjahr: re-ACK d4a1ee8f1d4c46ab726be83965bd86bace2ec1ec instagibbs: reACK https://github.com/bitcoin/bitcoin/pull/19606/commits/d4a1ee8f1d4c46ab726be83965bd86bace2ec1ec laanwj: re-ACK d4a1ee8f1d4c46ab726be83965bd86bace2ec1ec hebasto: re-ACK d4a1ee8f1d4c46ab726be83965bd86bace2ec1ec, only rebased since my [previous](https://github.com/bitcoin/bitcoin/pull/19606#pullrequestreview-492763028) review: Tree-SHA512: 1bb8725dd2313a9a03cacf8fb7317986eed3d8d1648fa627528441256c37c793bb0fae6c8c139d05ac45d0c7a86265792834e8e09cbf45286426ca6544c10cd5
2020-10-13Merge #20142: [0.20] build: set minimum required Boost to 1.48.0MarcoFalke
3562c15be3dbf725197d719d58c8d78e2f2c6779 build: set minimum required Boost to 1.48.0 (fanquake) Pull request description: Due to the use of [`boost::filesystem::canonical()`](https://github.com/bitcoin/bitcoin/blob/80aa83aa406447d9b0932301b37966a30d0e1b6e/src/wallet/load.cpp#L21), the minimum required version of Boost is actually 1.48.0. Use of canonical was introduced in #14146. See also [Boost filesystem 1.48.0 release notes](https://github.com/boostorg/filesystem/blob/6b5e38134a336b6ea777cd8a69b6ae929819db7e/doc/release_history.html#L508). Also discussed in #20080. ACKs for top commit: practicalswift: ACK 3562c15be3dbf725197d719d58c8d78e2f2c6779: correct is better than incorrect :) hebasto: ACK 3562c15be3dbf725197d719d58c8d78e2f2c6779, this is the status quo. Tree-SHA512: 1d2226c60accb8e2276e023120a72f070392a6c1d3db97fb23e7759c174984226f81fed6d94f3203ef663fb4b3648e65960aaf15ed718895b6673e3ebeb082bd
2020-10-13build: set minimum required Boost to 1.48.0fanquake
Due to the use of boost::filesystem::canonical(), the minimum required version of Boost is actually 1.48.0. Use of canonical was introduced in #14146. See also Boost filesystem 1.48.0 release notes: https://github.com/boostorg/filesystem/blob/6b5e38134a336b6ea777cd8a69b6ae929819db7e/doc/release_history.html#L508
2020-09-24Further improve comments around recentRejectsSuhas Daftuar
2020-09-24Disconnect peers sending wtxidrelay message after VERACKSuhas Daftuar
2020-09-24test: Use wtxid relay generally in functional testsFabian Jahr
2020-09-24test: Add tests for wtxid tx relay in segwit testFabian Jahr
Also cleans up some doublicate lines in the rest of the test. co-authored-by: Anthony Towns <aj@erisian.com.au>
2020-09-24test: Update test framework p2p protocol version to 70016Fabian Jahr
This new p2p protocol version allows to use WTXIDs for tx relay.
2020-09-24Rename AddInventoryKnown() to AddKnownTx()Suhas Daftuar
2020-09-24Make TX_WITNESS_STRIPPED its own rejection reasonSuhas Daftuar
Previously, TX_WITNESS_MUTATED could be returned during transaction validation for either transactions that had a witness that was non-standard, or for transactions that had no witness but were invalid due to segwit validation rules. However, for txid/wtxid-relay considerations, net_processing distinguishes the witness stripped case separately, because it affects whether a wtxid should be able to be added to the reject filter. It is safe to add the wtxid of a witness-mutated transaction to the filter (as that wtxid shouldn't collide with the txid, and hence it wouldn't interfere with transaction relay from txid-relay peers), but it is not safe to add the wtxid (== txid) of a witness-stripped transaction to the filter, because that would interfere with relay of another transaction with the same txid (but different wtxid) when relaying from txid-relay peers. Also updates the comment explaining this logic, and explaining that we can get rid of this complexity once there's a sufficient deployment of wtxid-relaying peers on the network.
2020-09-24Delay getdata requests from peers using txid-based relaySuhas Daftuar
Using both txid and wtxid-based relay with peers means that we could sometimes download the same transaction twice, if announced via two different hashes from different peers. Use a heuristic of delaying txid-peer-getdata requests by 2 seconds, if we have at least one wtxid-based peer.
2020-09-24Add p2p message "wtxidrelay"Suhas Daftuar
When sent to and received from a given peer, enables using wtxid's for announcing and fetching transactions with that peer.
2020-09-24ignore non-wtxidrelay compliant invsAnthony Towns
2020-09-24Add support for tx-relay via wtxidSuhas Daftuar
This adds a field to CNodeState that tracks whether to relay transactions with that peer via wtxid, instead of txid. As of this commit the field will always be false, but in a later commit we will add a way to negotiate turning this on via p2p messages exchanged with the peer.
2020-09-24Add wtxids to recentRejectsSuhas Daftuar
Previously, we only added txids to recentRejects if we were sure that the transaction couldn't have had the wrong witness (either because the witness was malleated or stripped). In preparation for wtxid-based relay, we can observe that txid == wtxid for transactions that have no witness, and add the wtxid of rejected transactions, provided the transaction wasn't a witness-stripped one. This means that we now add more data to the filter (as prior to this commit, any transaction with a witness that failed to be accepted was being skipped for inclusion in the filter) but witness malleation should still not interfere with relay of a valid segwit transaction, because the txid of a segwit transaction would not be added to the filter after failing validation. In the future, having wtxids in the recent rejects filter will allow us to skip downloading the same wtxid multiple times, once our peers use wtxids for transaction relay. Also add the txid to recentRejects if the transaction failed for TX_INPUTS_NOT_STANDARD.
2020-09-24Add wtxids of confirmed transactions to bloom filterSuhas Daftuar
This is in preparation for wtxid-based invs (we need to be able to tell whether we AlreadyHave() a transaction based on either txid or wtxid). This also double the size of the bloom filter, which is overkill, but still uses a manageable amount of memory.
2020-09-24Add wtxid-index to orphan mapSuhas Daftuar
2020-09-24Add a wtxid-index to mapRelaySuhas Daftuar
2020-09-24Just pass a hash to AddInventoryKnownSuhas Daftuar
Since it's only used for transactions, there's no need to pass in an inv type.
2020-09-24Add a wtxid-index to the mempoolSuhas Daftuar
2020-09-24Merge #20008: [Backport] #19839 and #19842 to v0.20Wladimir J. van der Laan
498b7cb6f3f11d96129a4934cf1dbdc48c099f3a Update the vcpkg checkout commit ID in appveyor config. (Aaron Clauson) ad99777b57f76a089fb87e3376e37081d560ce2e Set appveyor vm version to previous Visual Studio 2019 release. (Aaron Clauson) Pull request description: Required for appveyor builds to succeed for other v0.20 backports. For example #19606 fails to build on appveyor without these commits, and succeeds with them. The first commit is actually reversed by the second commit (which also changes `VCPKG_COMMIT_ID`), but I'm backporting them both so that they're clean cherrypicks. ACKs for top commit: laanwj: ACK 498b7cb6f3f11d96129a4934cf1dbdc48c099f3a Tree-SHA512: 723a834fd86c8b5f58e71b9f1abfa8b3ad67376fab8e7d3699330142a6fde98547209b2b5fa6fdf9b934a447b29bf866e2258d0c303cec1062401e924e83f297
2020-09-24Update the vcpkg checkout commit ID in appveyor config.Aaron Clauson
2020-09-24Set appveyor vm version to previous Visual Studio 2019 release.Aaron Clauson
Latest vm version has updated cmake and the berkeleydb vcpkg now fails to build.
2020-09-04Merge #19680: 0.20: Add txids with non-standard inputs to reject filterfanquake
107cf1515e69ee773ad1bcc1d5b6fffa49b78750 test addition of unknown segwit spends to txid reject filter (Gregory Sanders) 06f9c5c3be43bb9e4703ba120c9cb35de0736b54 Add txids with non-standard inputs to reject filter (Suhas Daftuar) Pull request description: Backport of #19620 to 0.20. ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/19680/commits/107cf1515e69ee773ad1bcc1d5b6fffa49b78750 fjahr: utACK 107cf1515e69ee773ad1bcc1d5b6fffa49b78750 jnewbery: utACK 107cf1515e69ee773ad1bcc1d5b6fffa49b78750 Tree-SHA512: d89c75fefdb6b50f40adfcf3cfdb2a791122e4d6a5903cb553c664042963577beb97a73319f9d1cb8320d32846778233c95255812c37fb4c7b1b25da161a6595
2020-08-07test addition of unknown segwit spends to txid reject filterGregory Sanders
Github-Pull: #19620 Rebased-From: 9f88ded82b2898ca63d44c08072f1ba52f0e18d7
2020-08-07Add txids with non-standard inputs to reject filterSuhas Daftuar
Our policy checks for non-standard inputs depend only on the non-witness portion of a transaction: we look up the scriptPubKey of the input being spent from our UTXO set (which is covered by the input txid), and the p2sh checks only rely on the scriptSig portion of the input. Consequently it's safe to add txids of transactions that fail these checks to the reject filter, as the witness is irrelevant to the failure. This is helpful for any situation where we might request the transaction again via txid (either from txid-relay peers, or if we might fetch the transaction via txid due to parent-fetching of orphans). Further, in preparation for future witness versions being deployed on the network, ensure that WITNESS_UNKNOWN transactions are rejected in AreInputsStandard(), so that transactions spending v1 (or greater) witness outputs will fall into this category of having their txid added to the reject filter. Github-Pull: #19620 Rebased-From: 7989901c7eb62ca28b3d1e5d5831041a7267e495
2020-08-01Merge #19636: doc: Update 0.20.1 release notes with psbt changesWladimir J. van der Laan
7c1c15329e5fc82d379725b4723913635490f34c doc: Update 0.20.1 release notes with psbt changes (Andrew Chow) Pull request description: #19215 was missing from the list. Also felt it was important to mention this change. Top commit has no ACKs. Tree-SHA512: b795cf73954ff493747a793039918a5e19c377d9325e6156a8e23ba8f510af12f48b2d63854f57d482640531a865190f1fe1ece0c78a5e45d6926f9533c6d695
2020-07-31doc: Update 0.20.1 release notes with psbt changesAndrew Chow
2020-07-31build: Bump version to 0.20.1-finalv0.20.1Wladimir J. van der Laan
Tree-SHA512: 7edd91cdb03cf55201987775e5d14bfa61e3eff54abd04eaf249889e5216b12ad722188e12bb51eabb81bcd66014fd349484533744dc777e7af68a78fbc7f51b
2020-07-28Merge #19612: [0.20] lint: fix shellcheck URL in CI installMarcoFalke
7ee4769cd4be0975254b218134d057c2bb443509 [0.20] lint: fix shellcheck URL in CI install (fanquake) Pull request description: This is causing the tests to fail for backports i.e #19606. If you look in the Travis logs there, the output is: ```bash You are downloading ShellCheck from an outdated URL! Please update to the new URL: https://github.com/koalaman/shellcheck/releases/download/v0.6.0/shellcheck-v0.6.0.linux.x86_64.tar.xz For more information, see: https://github.com/koalaman/shellcheck/issues/1871 PS: Sorry for breaking your build. The hosting costs were getting out of hand :( ``` ACKs for top commit: MarcoFalke: review ACK 7ee4769cd4be0975254b218134d057c2bb443509 Tree-SHA512: 62470291e53954ab541a7109e530390410d9b8a4d3ed6f4128ab8807d2225f368b8c984342f92de802a60dd082292cb59557599b4112413a29fc9ad8e8bcd0ee
2020-07-28[0.20] lint: fix shellcheck URL in CI installfanquake
This is causing the tests to fail for backports etc.
2020-07-23doc: Add changelog and authors to release notes for 0.20.1Wladimir J. van der Laan
Tree-SHA512: 39bbead4040097dd8aeac13bed57ad5e698aa2453883d8259930399e3c0f51168913a991f303a3407b649cfbf6e223291ca0942119514060e9a164bd05fa91f5
2020-07-17qt: Translation update for 0.20.1rc1v0.20.1rc1Wladimir J. van der Laan
Tree-SHA512: b03b180f9ade0e6f74a722c9704725674abc8bdfdaed4579ed3b0569c6b584359a4696821d07c070887284c9876785ae92b1ccdc11fece0d505040e97fe81413
2020-07-17doc: Regenerate man pages for 0.20.1rc1Wladimir J. van der Laan
Tree-SHA512: 9707cb25e7020d9db6005066675256ee34c689cf8f04586051501bb3a89f2c4eee222a39cd4c2a648dca8274f0fcf2d6aeee010cd3525ca8edae2ad2ffae9811
2020-07-17build: Bump version to 0.20.1rc1Wladimir J. van der Laan
Tree-SHA512: 643ff61093258641e0d69456cc6fbb8c47801af494aacbf3d3f6401ce9ea8f171d27b0703845fd581dbda8037b97c2b428ed92853909d49f251a4666fe8dae9a
2020-07-17qt: Fix QFileDialog for static buildsHennadii Stepanov
This change partially reverts 248e22bbc0d7bc40ae3584d53a18507c46b0e553. Github-Pull: #19536 Rebased-From: 6457361e90c0cf704d086c51d75f51dbdfd374d7 Tree-SHA512: 3b48c64f59068d70b3aec4514ebe4a091813c77518a52a81bd8a36b44d0854b3f5e187f52c0f8e4527506087cb7e2cafb7c39cb7d28e4b8f620a77980e8a4697
2020-07-16Merge #19524: [0.20] Backport #19517 - Increment input value sum only once ↵Wladimir J. van der Laan
per UTXO in decodepsbt bad9cf8f404ab70df7d3df430885430f76fea596 Increment input value sum only once per UTXO in decodepsbt (Andrew Chow) Pull request description: Github-Pull: #19517 Rebased-From: 75122780e2c46505d977e24c5612dfa9442ab754 ACKs for top commit: jnewbery: utACK bad9cf8f404ab70df7d3df430885430f76fea596 laanwj: ACK bad9cf8f404ab70df7d3df430885430f76fea596 Tree-SHA512: 543bbe58f2dafc772289708007d72fa61592270f3de083afffb9a56274b03f2ffe8d8d509a93790ceea3a708e1c02b1ad941e23281b3db1f48766c01a930dbd6
2020-07-15Increment input value sum only once per UTXO in decodepsbtAndrew Chow
Github-Pull: #19517 Rebased-From: 75122780e2c46505d977e24c5612dfa9442ab754
2020-07-15Merge #19482: doc: move-only release notes for 0.20.1fanquake
fae0e93836c0aa96b9274c69651b02cbf6352dc1 Remove cached directories and associated script blocks from appveyor CI configuration. (Aaron Clauson) faf5e256c50a3fe5f946daeab3fe68a894caad95 appveyor: Remove clcache (MarcoFalke) 888886ed5b72621872af23e141ab51f59661c139 doc: move-only release notes for 0.20.1 (MarcoFalke) fa3998859885fa75039ad72e0b7746d7d349b7d1 doc: Clear release notes for minor release (MarcoFalke) Pull request description: Also fix appveyor ACKs for top commit: fanquake: ACK fae0e93836c0aa96b9274c69651b02cbf6352dc1 Tree-SHA512: 93840aaea9163a90bacf58bd1428fd5dda1187daabfa691d5d03e4abf00238d935c10c9d420ae7f9776d78f9fb2c6eb03f4bf1655ebe03483c224ab1fe851b84
2020-07-10Remove cached directories and associated script blocks from appveyor CI ↵Aaron Clauson
configuration. Github-Pull: #19444 Rebased-From: 961e667600441c35845fcb36b120500c813cd3ed
2020-07-10appveyor: Remove clcacheMarcoFalke
Github-Pull: #18640 Rebased-From: fac0c8db9f634ea7231fb0b6dc139ae0bda4a051
2020-07-10doc: move-only release notes for 0.20.1MarcoFalke
2020-07-10doc: Clear release notes for minor releaseMarcoFalke
2020-07-10Merge #19224: [0.20] Backportsfanquake
2b79ac740622218a52e2cf3ae1755dd3a8d4847a Clean up separated ban/discourage interface (Pieter Wuille) 04773480575ac79f238ac5764247dddd0cae5051 Replace automatic bans with discouragement filter (Pieter Wuille) e7f06f9b0e84a65812d24ff6efa4bc2d3d818590 test: remove Cirrus CI FreeBSD job (fanquake) eb6b82a5586a0cea5b72c376ff377a7322acb588 qa: Test concurrent wallet loading (João Barbosa) c9b49d28563487e76169c7749b309244cabc70bd wallet: Handle concurrent wallet loading (João Barbosa) cf0b5a933da540416b530ca6eb0259ab18cc6548 tests: Check that segwit inputs in psbt have both UTXO types (Andrew Chow) 3228b59b1761a80bca6aa7309cb46db5acafc905 psbt: always put a non_witness_utxo and don't remove it (Andrew Chow) ed5ec3080419445c0af7410c0af7a421704841a6 psbt: Allow both non_witness_utxo and witness_utxo (Andrew Chow) 68e0e6f85247c8b9e0b0f039bc31c434632c2982 rpc: show both UTXOs in decodepsbt (Andrew Chow) 27786d072dbcf65cba9110f1dd171f94b6abc107 trivial: Suggested cleanups to surrounding code (Russell Yanofsky) 654420d6dfb455ca4030055881db4e3aa9ec6e8b wallet: Minimal fix to restore conflicted transaction notifications (Russell Yanofsky) febebc4ea68104bba9ad2cf4468fc50e6136f803 Fix WSL file locking by using flock instead of fcntl (Samuel Dobson) 5c7151a60468bf3c603ffe0490fbbe95736fdd69 gui: update Qt base translations for macOS release (fanquake) c219d21634b3eff537471c4d52e631679965d8d8 build: improved output of configure for build OS (sachinkm77) 0596a6eeb5ddb84c7095aed71bb7e6645c275f07 util: Don't reference errno when pthread fails. (MIZUTA Takeshi) Pull request description: Currently backports the following to the 0.20 branch: * #18700 - Fix locking on WSL using flock instead of fcntl * #18982 - wallet: Minimal fix to restore conflicted transaction notifications * #19059 - gui: update Qt base translations for macOS release * #19152 - build: improve build OS configure output * #19194 - util: Don't reference errno when pthread fails. * #19215 - psbt: Include and allow both non_witness_utxo and witness_utxo for segwit inputs * #19219 - Replace automatic bans with discouragement filter * #19300 - wallet: Handle concurrent wallet loading ACKs for top commit: amitiuttarwar: ACK 04773480575ac79f238ac5764247dddd0cae5051 2b79ac740622218a52e2cf3ae1755dd3a8d4847a by comparing to original changes, double checking the diff sipa: utACK 2b79ac740622218a52e2cf3ae1755dd3a8d4847a laanwj: ACK 2b79ac740622218a52e2cf3ae1755dd3a8d4847a Tree-SHA512: e5eb31d08288fa4a6e8aba08e60b16ce1988f14f249238b1cfd18ab2c8f6fcd9f07e3c0c491d32d2361fca26e3037fb0374f37464bddcabecea29069d6737539
2020-07-08Clean up separated ban/discourage interfacePieter Wuille
Github-Pull: #19219 Rebased-From: 2ad58381fffb33d611abf900b73d9e6b5a4e35f8
2020-07-08Replace automatic bans with discouragement filterPieter Wuille
This patch improves performance and resource usage around IP addresses that are banned for misbehavior. They're already not actually banned, as connections from them are still allowed, but they are preferred for eviction if the inbound connection slots are full. Stop treating these like manually banned IP ranges, and instead just keep them in a rolling Bloom filter of misbehaving nodes, which isn't persisted to disk or exposed through the ban framework. The effect remains the same: preferred for eviction, avoided for outgoing connections, and not relayed to other peers. Also change the name of this mechanism to better reflect reality; they're not banned, just discouraged. Contains release notes and several interface improvements by John Newbery. Github-Pull: #19219 Rebased-From: b691f2df5f7d443c0c9ee056ab94aa0fc19566d5
2020-07-03test: remove Cirrus CI FreeBSD jobfanquake
This has been removed from the master branch, and always seems to fail at the installing packages phase. i.e: ```bash pkg install -y autoconf automake boost-libs git gmake libevent libtool pkgconf python3 ccache Updating FreeBSD repository catalogue... Fetching meta.txz: . done pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2 repository FreeBSD has no meta file, using default settings Fetching packagesite.txz: .......... done pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2 pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0 Unable to open created repository FreeBSD Unable to update repository FreeBSD Error updating repositories! Exit status: 3 ```
2020-07-03qa: Test concurrent wallet loadingJoão Barbosa
Github-Pull: #19300 Rebased-From: 9b009fae6e2eb0ab2ee7ce7882c3556a9ac363a7
2020-07-03wallet: Handle concurrent wallet loadingJoão Barbosa
Github-Pull: #19300 Rebased-From: b9971ae5853c1d62e09d976a8705f4f731290d85