aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-23Merge bitcoin/bitcoin#21470: BIP 350: Implement Bech32m and use it for v1+ ↵W. J. van der Laan
segwit addresses (0.20 backport) c0f85fd8503a6e6f66cb8659bd88deec92b96eec Backport invalid address tests (Pieter Wuille) c6709867d3614809c17d38bab5ac6772460c0599 naming nits (Fabian Jahr) 1a4e88e0e885cfcb91196840a958e7c9fa09c3b5 Use Bech32m encoding for v1+ segwit addresses (Pieter Wuille) cf18ac9665a13ea701f4410287e6ad10ae1f1c30 Add Bech32m test vectors (Pieter Wuille) 5f9537b2d9d1af80431870d77814d93f621e83cb Implement Bech32m encoding/decoding (Pieter Wuille) Pull request description: Backport of #20861 for 0.20. Also includes #21471. ACKs for top commit: jnewbery: utACK c0f85fd8503a6e6f66cb8659bd88deec92b96eec MarcoFalke: range-diff-only ACK c0f85fd850 🐔 Tree-SHA512: e87e52995cb9b555109bc500dba1e844993d881821d2001443b3de9e3ef9050ddb73deefa0c1af732418fa7355a86b875789887c9611c340713b3ad26809d58e
2021-03-27Backport invalid address testsPieter Wuille
Reduced version of the test from master/#20861 by John Newbery. Github-Pull: #20861 Rebased-From: fe5e495c31de47b0ec732b943db11fe345d874af
2021-03-27naming nitsFabian Jahr
Github-Pull: #20861 Rebased-From: 03346022d611871f2cc185440b19d928b9264d9d
2021-03-27Use Bech32m encoding for v1+ segwit addressesPieter Wuille
This also includes updates to the Python test framework implementation, test vectors, and release notes. Github-Pull: #20861 Rebased-From: fe5e495c31de47b0ec732b943db11fe345d874af
2021-03-18Add Bech32m test vectorsPieter Wuille
Github-Pull: #20861 Rebased-From: 25b1c6e13ddf1626210d5e3d37298d1f3a78a94f
2021-03-18Implement Bech32m encoding/decodingPieter Wuille
Github-Pull: #20861 Rebased-From: da2bb6976dadeec682d163c258c9afecc87d6428
2021-01-12Merge #20738: [0.20] final rc2 backportsWladimir J. van der Laan
19bcf178485c7d2c353581e514582bd569c66c00 [doc] Add permissions to the getpeerinfo help. (Amiti Uttarwar) d0c75abb288afdd295c4aa9d7e747f13d5926327 doc: Extract net permissions doc (MarcoFalke) bcb655d7d19de9997c5acb4b25a7bf59f4882851 rpc: Add missing description of vout in getrawtransaction help text (Ben Carman) Pull request description: ACKs for top commit: benthecarman: ACK 19bcf17 fanquake: ACK 19bcf178485c7d2c353581e514582bd569c66c00 Tree-SHA512: 5c0e500d44adba7707dddccee9a956957ff1771439a0aea9841f01571ac21028531b8e0276a4b7dee2588b1828853bd227a64de1590204472470cd43268a5368
2021-01-05[doc] Add permissions to the getpeerinfo help.Amiti Uttarwar
This field was already being returned, but the RPCHelpMan did not indicate this. So, this PR updates the help text to match. Github-Pull: #20756 Rebased-From: 667d203687708390bc0f43f2dd3f4ab427b88338
2021-01-05doc: Extract net permissions docMarcoFalke
Github-Pull: #19192 Rebased-From: fa2c2b50d895ff3402b82ce3db69bfc43053b519
2021-01-05rpc: Add missing description of vout in getrawtransaction help textBen Carman
Github-Pull: #20731 Rebased-From: b23349b8804fb60c6b3d7d0e2a95927a0d1b49b9
2020-12-10doc: Update manual pages pre-rc1v0.20.2rc1Wladimir J. van der Laan
Tree-SHA512: 88384fc1e1be9f2bcdbe725dae5306aa74427f63d0dc54d177b0008fde74bd3284a1073d446c04d54c491e970607b14fbd58592296575e99ba328c50b7cf55dc
2020-12-10gui: Pre-rc1 translations updateWladimir J. van der Laan
Tree-SHA512: 3a262c501cdfe9bda7f33045c6d16fb4d3aa46c11ebfd6664302460413c2333ea39fb201fbd7b9edaddb76f92138a3e026ec2f0a9ba40eabff45ae451d5c6af3
2020-12-10build: Bump version to 0.20.2rc1Wladimir J. van der Laan
Tree-SHA512: 05bd998383127dae969dbb811aa6170fe07a5f92af3b13dc6d7c135461aa93697e5e4a5a5fc98d4c0f848fdc0ed8317c3624e2a0a54c0ea18d25d5a585efc6ec
2020-12-10Merge #19740: [0.20] wallet: Simplify and fix CWallet::SignTransactionMarcoFalke
6a326cf66f04948ffe729e5540a69e159a7840ad tests: Test that a fully signed tx given to signrawtx is unchanged (Andrew Chow) 2d48d7dcfb93eeec36dd6f5cbad289b89ec69324 Simplify and fix CWallet::SignTransaction (Andrew Chow) Pull request description: Backport `CWallet::SignTransaction` from master which is simpler and not broken. Previously `CWallet::SignTransaction` would return false for a fully signed transaction. This is a regression and obviously incorrect - a fully signed transaction is always complete. This occurs because `CWallet::SignTransaction` would iterate through each input and skip any further checks if the input was already signed. It would then end up falling through to the `return false` catch-all thus erroneously saying a fully signed transaction is incomplete. The change to attempting to use all `ScriptPubKeyMan`s fixes this problem since the `LegacyScriptPubKeyMan` (the only spkm implemented in 0.20) will verify inputs during its signing attempt and correctly return that it is complete when the inputs verify. Thus a fully signed transaction will be correctly identified as complete, `LegacyScriptPubKeyMan::SignTranaction` will return true, and so `CWallet::Transaction` will return true too. Note that this is not a backport of any specific commit. Rather it is the end result of the changes we have made to this function in master. Fixes #19737 ACKs for top commit: fjahr: Code review ACK 6a326cf66f04948ffe729e5540a69e159a7840ad MarcoFalke: re-ACK 6a326cf66f 👓 Tree-SHA512: 7b8e04cfc264de01a2de08a99477c1a110fa0965dcbd4305bf4632a165f28b090746789195f5cb584eb6d85e27d4801a09d2dad28e508d7898c7c088e771812b
2020-12-05tests: Test that a fully signed tx given to signrawtx is unchangedAndrew Chow
Tests that a fully signed transaction given to signrawtransactionwithwallet is both unchanged and marked as complete. This tests for a regression in 0.20 where the transaction would not be marked as complete. Github-Pull: #20562 Rebased-From: 773c42b265fb2212b5cb8785b7226a206d063543
2020-11-23Merge #20399: Revert "Merge #19606: Backport wtxid relay to v0.20"MarcoFalke
fa074d2c7b9c3d34876c428d12672a505d4ce4eb Revert "Merge #19606: Backport wtxid relay to v0.20" (MarcoFalke) Pull request description: The 0.20 branch has bugfixes that should be released. However, a tag can currently not be created because the latest merge introduced a regression and is not a bugfix (https://github.com/bitcoin/bitcoin/pull/20317#issuecomment-723754509, https://github.com/bitcoin/bitcoin/pull/20317#issuecomment-727624755). Fix that by reverting the last merge. Can be reviewed by re-doing the revert or calling `git diff HEAD HEAD~2 | wc` and observing an empty diff. ACKs for top commit: laanwj: Code review ACK fa074d2c7b9c3d34876c428d12672a505d4ce4eb Tree-SHA512: 1a1314b9bb85f44696dc307845e80292998d6c9c000e7386c48405e74400d9cd22be6996e555f198da917e04024a1c8e609dfd830759a27fe4070168b0d272bb
2020-11-18Merge #20166: [0.20] BackportsMarcoFalke
7566af419f3e7060152ae062f5a578f543a16a5a doc: Update data directory path comments (Hennadii Stepanov) 09261de6edd7f9fd876607fef350995052da63ba util: Add StripRedundantLastElementsOfPath function (Hennadii Stepanov) 8ef0dace867dbdc1b1dead98f0d69f64eb886d67 macOS deploy: use the new plistlib API (Jonas Schnelli) 314e79581f05881284ed9dfb661754830ed54833 build: fix mutex detection when building bdb on macOS (fanquake) 1f67a30e8374951997af924293c60eff56ae39ed random: fixes read buffer resizing in RandAddSeedPerfmon (Ethan Heilman) 6113b547f4cce8be732bf45687a74eccf4a3abfc net: Send post-verack handshake messages at most once (MarcoFalke) bdf15d0d5d12eb33594b90ebb48366ea7bb5c3d9 rpc: Adjust witness-tx deserialize error message (MarcoFalke) 731502a18385276887a57ad8574fdbaef976920d rpc: Properly deserialize txs with witness before signing (MarcoFalke) ee0082b886264fcddd73c5bb7c41ba8316527b9c Avoid the use of abs64 in timedata (Pieter Wuille) 05bd0c220aa0f4cb6202dd19d3164ba2e7cb015e docs: Correct description for getblockstats's txs field (Nadav Ivgi) Pull request description: Backports the following PRs to the 0.20 branch: * https://github.com/bitcoin/bitcoin/pull/19777 - docs: Correct description for getblockstats's txs field * https://github.com/bitcoin/bitcoin/pull/19836 - rpc: Properly deserialize txs with witness before signing * https://github.com/bitcoin/bitcoin/pull/20080 - Strip any trailing `/` in -datadir and -blocksdir paths * https://github.com/bitcoin/bitcoin/pull/20082 - [bugfix] random: fixes read buffer to use min rather than max * https://github.com/bitcoin/bitcoin/pull/20141 - Avoid the use of abs64 in timedata * https://github.com/bitcoin/bitcoin/pull/20146 - net: Send post-verack handshake messages at most once * https://github.com/bitcoin/bitcoin/pull/20195 - build: fix mutex detection when building bdb on macOS * https://github.com/bitcoin/bitcoin/pull/20298 - macOS deploy: use the new plistlib API Will add additional commits as they become available. ACKs for top commit: MarcoFalke: review ACK 7566af419f3e7060152ae062f5a578f543a16a5a 🗡 Tree-SHA512: add6bb978313c12c3e07bc232636ae9d1ab0edd0b816705c5c70eeb1cc04097165fd5e29d60c706886943ceb1f749a422020766b4aa2d23be51e9f839157a4bb
2020-11-16Revert "Merge #19606: Backport wtxid relay to v0.20"MarcoFalke
This reverts commit a339289c2ef9caffa1195436695a13f6e48e1bbc, reversing changes made to b9ac31f2d29ae3e79c0f0cde5bab2d7213e6da51.
2020-11-06doc: Update data directory path commentsHennadii Stepanov
Github-Pull: #20080 Rebased-From: ad5cef5dfdd5802fc187a52e74d940a52f420a51
2020-11-06util: Add StripRedundantLastElementsOfPath functionHennadii Stepanov
Co-authored-by: saibato <saibato.naga@pm.me> Co-authored-by: MarcoFalke <falke.marco@gmail.com> Github-Pull: 20080 Rebased-From: b19e88230f0e93e95e883e65376963cb9c36f606
2020-11-06macOS deploy: use the new plistlib APIJonas Schnelli
See https://docs.python.org/3/library/plistlib.html. The new API was added in 3.4 and old removed in 3.9. Github-Pull: 20298 Rebased-From: 04a69c200e0d18ae63c7e47898f85d1b4cb5c23d
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-30build: fix mutex detection when building bdb on macOSfanquake
Starting with the Clang shipped with Xcode 12, Apple has enabled -Werror=implicit-function-declaration by default. This causes bdbs mutex detection to fail when building on macOS (not cross-compiling): checking for mutexes... UNIX/fcntl configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM. configure: error: Unable to find a mutex implementation as previously emitted warnings are being turned into errors. i.e: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] Append -Wno-error=implicit-function-declaration to cflags so that -Wimplicit-function-declaration returns to being a warning, and the configure checks will succeed. Fixes #19411. Github-Pull: #20195 Rebased-From: d0a829e9632379e42f0be5c554e3b692f0d14a95
2020-10-23random: fixes read buffer resizing in RandAddSeedPerfmonEthan Heilman
+ Replaces std::max with std::min to resize buffer in RandAddSeedPerfmon + Documents behavior of RandAddSeedPerfmon Github-Pull: #20082 Rebased-From: bd5215103eb3985c1622eddea45a040e6173829c
2020-10-19net: Send post-verack handshake messages at most onceMarcoFalke
Github-Pull: #20146 Rebased-From: fa1f6f237d02265af616129402fa2b8a3019dda5
2020-10-16rpc: Adjust witness-tx deserialize error messageMarcoFalke
Github-Pull: #19836 Rebased-From: 33330778230961cfbf2a24de36b5877e395cc596
2020-10-16rpc: Properly deserialize txs with witness before signingMarcoFalke
Github-Pull: #19836 Rebased-From: cccc7525697e7b8d99b545e34f0f504c78ffdb94
2020-10-16Avoid the use of abs64 in timedataPieter Wuille
Github-Pull: #20141 Rebased-From: d1292f25f272401da0c58580521c74b1fa03a9ad
2020-10-16docs: Correct description for getblockstats's txs fieldNadav Ivgi
It does count the coinbase transaction. Refs #19766 Github-Pull: #19777 Rebased-From: 4148f55dd016f940df50a44cf03d117cdb1dd929
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