aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-23Merge bitcoin-core/gui#248: Fix: For values of "Bytes transferred" and ↵MarcoFalke
"Bytes/s" with 1000-based prefix names use 1000-based divisor instead of 1024-based d09ebc47233187ab8dd5a70df4d261353958978c Fix wrong(1024) divisor for 1000-based prefixes (wodry) Pull request description: v.0.21.0 I saw in the GUI peer window in the "received" column `1007 KB`, and after increasing to >=1024 I guess, it switched to `1 MB`. I would have expected the display unit to change from KB to MB already at value >=1000. I looked into the code, and the values appear to be power-of-2 byte values, so the switching at >=1024 and not >=1000 seems correct. But the unit display is not precisely correct, binary prefixes should be used for power-of-2 byte values. To be correct, this PR changes ~~KB/MB/GB to KiB/MiB/GiB.~~ KB to kB and the divisor from 1024 to 1000. ACKs for top commit: hebasto: ACK d09ebc47233187ab8dd5a70df4d261353958978c, tested on Linux Mint 20.1 (Qt 5.12.8) the both "Network Traffic" and "Peers" tabs of the "Node Window". jarolrod: ACK d09ebc47233187ab8dd5a70df4d261353958978c leonardojobim: Tested ACK https://github.com/bitcoin-core/gui/pull/248/commits/d09ebc47233187ab8dd5a70df4d261353958978c on Ubuntu 20.04 Qt 5.12.8 Tree-SHA512: 8f830b08cc3fd36dc8a18f1192959fe55d1644938044bf31d770f7c3bf8475fba6da5019a2d2024d5b2c81a8dab112f360c555367814a14f4d05c89d130f25b0
2021-03-23Merge #21497: build: Do not opt-in unused CoreWLAN stuff in depends for macOSfanquake
810b1310d6173250df850db0538e7f1b1cfb2843 build: Do not build unused CoreWLAN stuff in depends for macOS (Hennadii Stepanov) Pull request description: We [do not use](https://github.com/bitcoin/bitcoin/blob/d2a78ee9288e4d3bace9125bcfae6b7747f85982/contrib/devtools/symbol-check.py#L96-L111) any macOS CoreWLAN Framework stuff. Changes in Qt Configure summary with `HOST=x86_64-apple-darwin18`: ```diff --- wlan-master/summary2021-03-22 00:26:04.377387806 +0200 +++ wlan-pr/summary2021-03-22 00:37:07.060997990 +0200 @@ -49,7 +49,7 @@ slog2 ................................ no Using system PCRE2 ..................... no Qt Network: - CoreWLan ............................... yes + CoreWLan ............................... no getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no ``` ACKs for top commit: fanquake: ACK 810b1310d6173250df850db0538e7f1b1cfb2843 - Only obvious difference I could see in the build is skipping a configure check. Tree-SHA512: 54e177c4ad528ef48cc80c3a39ab1b66267dd0ca4fe6cc4f70579c87b74051a04ebeeca1a26afee7fc29f750af456804578abbe7e8a9ad2717297291f206547e
2021-03-23Merge #18030: doc: Coin::IsSpent() can also mean never existedMarcoFalke
1404c574037da331c233317618b9b90d3329ed33 [doc] Coin: explain that IsSpent() can also mean never existed (Sjors Provoost) Pull request description: This can be especially confusing where `AccessCoin()` is used with logic like this: ```c++ while (iter.n < MAX_OUTPUTS_PER_BLOCK) { const Coin& alternate = view.AccessCoin(iter); if (!alternate.IsSpent()) return alternate; ``` ACKs for top commit: practicalswift: ACK 1404c574037da331c233317618b9b90d3329ed33 MarcoFalke: ACK 1404c574037da331c233317618b9b90d3329ed33 jnewbery: utACK 1404c574037da331c233317618b9b90d3329ed33 Tree-SHA512: 418618dd7e08bd5cc8360e3501d0f57e34100e5101ad3b8e0a819923fa860f44c7f2fada0f8447a1af3c2601fd72bfe619b91ff2f26f7133ceaeb0c98b017b12
2021-03-23Merge #21142: fuzz: Add tx_pool fuzz targetMarcoFalke
faa9ef49d18da9223220afcc263ac91a74c291a6 fuzz: Add tx_pool fuzz targets (MarcoFalke) Pull request description: ACKs for top commit: AnthonyRonning: reACK faa9ef49d18da9223220afcc263ac91a74c291a6 practicalswift: Tested ACK faa9ef49d18da9223220afcc263ac91a74c291a6 glozow: code review ACK faa9ef49d18da9223220afcc263ac91a74c291a6, a bunch of comments but non blocking Tree-SHA512: 8d404398faa46d8e7bf93060a2fe9afd5c0c2bd6e549ff6588d2f3dd1b912dff6c5416d5477c18edecc2e85b00db4fdf4790c3e6597a5149b0d40c9d5014d82f
2021-03-23Merge #21487: fuzz: Use ConsumeWeakEnum in addrman for service flagsMarcoFalke
55554463c15e3c75a64d26209dd3f8396e508cc2 fuzz: Use ConsumeWeakEnum in addrman for service flags (MarcoFalke) Pull request description: This has minimally better performance. Reported by me in https://github.com/bitcoin/bitcoin/pull/20228#discussion_r598081787 ACKs for top commit: practicalswift: Tested ACK 55554463c15e3c75a64d26209dd3f8396e508cc2 vasild: ACK 55554463c15e3c75a64d26209dd3f8396e508cc2 Tree-SHA512: 4e5f51fe4f2bd7b2f37d0690e41203341ba45c0c9bc9247449cd26cfb5f77dc2ec61df3e4963276f68694e4b3ca3d0a76367a51c4d775501edeb3224d305a261
2021-03-23Merge #21421: build: don't try and use -fstack-clash-protection on Windowsfanquake
7b3434f8002d1a8cf0dbd0a0caef28e783b1efd8 build: don't try and use -fstack-clash-protection on Windows (fanquake) Pull request description: This has never worked with any of the mingw-w64 compilers we use, and the `-O0` is causing issues for builders applying spectre mitigations (see [IRC logs](http://www.erisian.com.au/bitcoin-core-dev/log-2021-03-12.html#l-15)). Recent discussion on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 would also indicate that this should just not be used on Windows. ACKs for top commit: laanwj: Concept and code review ACK (but untested) 7b3434f8002d1a8cf0dbd0a0caef28e783b1efd8 hebasto: ACK 7b3434f8002d1a8cf0dbd0a0caef28e783b1efd8, I've verified that this change does not affect builds for `HOST=x86_64-w64-mingw32` by comparing sizes of the output `*.exe` files. Tree-SHA512: 72b582321ddff8db3201460fa42a53304e70f141ae078d76a4d4eeb1ca27c8dd567ccb468cc8616179c8df784bd8ca038dcb9a277f9e29f9d98c3cc842916b18
2021-03-22Merge #21418: contrib: Make systemd invoke dependencies only when readyWladimir J. van der Laan
663f6cd9ddadeec30b27ec12f0f5ed49f3146cc9 contrib: Use -daemonwait in systemd init script (Wladimir J. van der Laan) Pull request description: Make systemd invoke dependencies only when ready by using `-daemonwait` in the service file instead of `-daemon`. Closes #21322 by making bitcoind conform to behavior specified for `type=forking`. This may need some tuning of timeouts. ACKs for top commit: darosior: ACK 663f6cd hebasto: re-ACK 663f6cd9ddadeec30b27ec12f0f5ed49f3146cc9 Tree-SHA512: 890005852b632a202caa578e6c796ebdc9da0b2379a9157a4f56f7db9d193c0ffbb78d120bbf112ab2f273855f2a08c3da000b1f7a9fb5222a3b94dcdb16b878
2021-03-22contrib: Use -daemonwait in systemd init scriptWladimir J. van der Laan
Closes #21322 by making bitcoind conform to behavior specified for `type=forking`.
2021-03-22Merge #21317: util: Make Assume() usable as unary expressionMarcoFalke
fa4cebadcffd9112da4b13c7cc7ccf21e2bee887 util: Make Assume() usable as unary expression (MarcoFalke) Pull request description: Assume shouldn't behave different at the call site depending on build flags. Currently compilation fails if it is used as expression. Fix that by using the lambda approach from `Assert()` without the `assert()`. ACKs for top commit: jnewbery: ACK fa4cebadcffd9112da4b13c7cc7ccf21e2bee887 practicalswift: cr ACK fa4cebadcffd9112da4b13c7cc7ccf21e2bee887: patch looks correct and commit hash starts with `fa` Tree-SHA512: 9ec9ac8d410cdaf5e4e28df571a89e3d23d38e05a7027bb726cae3da6e9314734277e5a218e9e090cc17e10db763da71052c229ad642077ca5824ee42022f3ed
2021-03-22Merge #21498: refactor: return std::nullopt instead of {}MarcoFalke
5294f0d5a94cc7beaf692131fba0cad8beec9f13 refactor: return std::nullopt instead of {} (fanquake) Pull request description: In #21415 [we decided](https://github.com/bitcoin/bitcoin/pull/21415#issuecomment-800236640) to return `std::optional` rather than `{}` for uninitialized values. This PR replaces the two remaining usages of `{}` with `std::nullopt`. As a side-effect, this also quells the spurious GCC 10.2.x warning that we've had reported quite a few times. i.e #21318, #21248, #20797. ```bash txmempool.cpp: In member function ‘CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>&) const’: txmempool.cpp:898:13: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized] 898 | return {}; | ^ ``` ACKs for top commit: hebasto: ACK 5294f0d5a94cc7beaf692131fba0cad8beec9f13, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 5b776be79ab26e5a3a5fc2b463b394ea5ce6797ed5558424873fa4ecee2898170eff76d6da9d69394d28f8f98974117fc63b922a3e19c52f5294c83073e79bb0
2021-03-22Merge #21491: test: remove duplicate assertions in util_testsfanquake
7e3444805ed747db819d7bf630feafc31783e5de test: remove duplicate assertions in util_tests (Jon Atack) Pull request description: as noticed by Kiminuo in https://github.com/bitcoin/bitcoin/pull/21488#discussion_r598247676 ACKs for top commit: practicalswift: cr ACK 7e3444805ed747db819d7bf630feafc31783e5de: patch looks correct vasild: ACK 7e3444805ed747db819d7bf630feafc31783e5de Tree-SHA512: ad3d5983ad3a665155d766843dfda7178ced47e82154838331e428ed0828a467c1cf4bf99270aaf191e94156d485fafd0a7d5bc68248c4c1304a00ca5a2a9d2e
2021-03-22refactor: return std::nullopt instead of {}fanquake
In #21415 we decided to return `std::optional` rather than `{}` for uninitialized values. This PR repalces the two remaining usages of `{}` with `std::nullopt`. As a side-effect, this also quells the spurious GCC 10.2.x warning that we've had reported quite a few times. i.e #21318, #21248, #20797. ```bash txmempool.cpp: In member function ‘CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>&) const’: txmempool.cpp:898:13: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized] 898 | return {}; | ^ ```
2021-03-21build: Do not build unused CoreWLAN stuff in depends for macOSHennadii Stepanov
2021-03-21test: remove duplicate assertions in util_testsJon Atack
Co-authored-by: Kiminuo <kiminuo@protonmail.com>
2021-03-21Merge #21488: test: add ParseUInt16() unit test and fuzz coverageMarcoFalke
3d086f42ab58f0f5984101d5285d5a707e3dc8e7 test: add ParseUInt16() test coverage (Jon Atack) Pull request description: `ParseUInt16()` was just added in #21328. ACKs for top commit: practicalswift: cr ACK 3d086f42ab58f0f5984101d5285d5a707e3dc8e7: patch looks correct & more coverage is better than less coverage Tree-SHA512: bf7f96deb7c1531419565907f0ea8a8e32b368d4b823a3e80928b2c118edbf643ea06e357b4b5504a89f855caeed289daa9f823c740231ed6ad1b8ed00285ce8
2021-03-21Merge #21349: build: Fix fuzz-cuckoocache cross-compiling with DEBUG=1MarcoFalke
52a43b0c7dac33bff65dfcefa98cd30169a6b38f build: Fix fuzz-cuckoocache cross-compiling for Windows with DEBUG=1 (Hennadii Stepanov) Pull request description: Fix #21348. ACKs for top commit: practicalswift: Tested ACK 52a43b0c7dac33bff65dfcefa98cd30169a6b38f Tree-SHA512: 6592f829edfb740a1e9d0691acf04b2372e91b0a53ca395b08350cb0b80031d3b55fa7331bdaddf857d450eb30b605af9fe8fe02559cda19374a48f9634fae70
2021-03-21Merge #21040: wallet: Fix already-loading message grammarMarcoFalke
ae9d26a8f0435e2f4b39ad1181473e6575ac67b5 wallet: Fix already-loading error message grammar (Fotis Koutoupas) Pull request description: ACKs for top commit: practicalswift: cr ACK ae9d26a8f0435e2f4b39ad1181473e6575ac67b5 prayank23: ACK https://github.com/bitcoin/bitcoin/pull/21040/commits/ae9d26a8f0435e2f4b39ad1181473e6575ac67b5 Tree-SHA512: 2f58d309dd33954f47e3ed339887b11bfdad4519f89ed3dd9bf3fb0db246d78b89653d553d02350ec84ce68bbb904db9fac00a2aad8d37f48df694d6782f35df
2021-03-20Merge #20921: validation: don't try to invalidate genesis block in ↵MarcoFalke
CChainState::InvalidateBlock 787df19b09babf50dd8124b3ac990b29c33cfe93 validation: don't try to invalidate genesis block (Sebastian Falbesoner) Pull request description: In the block invalidation method (`CChainState::InvalidateBlock`), the code for creating the candidate block map assumes that the passed block's previous block (`pindex->pprev`) is available and otherwise segfaults due to null-pointer deference in `CBlockIndexWorkComparator()` (see analysis by practicalswift in #20914), i.e. it doesn't work with the genesis block. Rather than analyzing all possible code paths and implications for this corner case, simply fail early if the genesis block is passed. Fixes #20914. ACKs for top commit: sipa: ACK 787df19b09babf50dd8124b3ac990b29c33cfe93. Tested invalidation of generic on regtest. practicalswift: Tested ACK 787df19b09babf50dd8124b3ac990b29c33cfe93 Tree-SHA512: 978be7cf2bd1c1faebfe945d191ac77dea72791bea826459abd308f77c74c5991efee495a38817c306e488ecd5208b5c888df7d9d044132dd9a06bbbdb256b6c
2021-03-20fuzz: Use ConsumeWeakEnum in addrman for service flagsMarcoFalke
2021-03-19test: add ParseUInt16() test coverageJon Atack
2021-03-19Merge #18335: bitcoin-cli: print useful error if bitcoind rpc work queue ↵MarcoFalke
exceeded 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a add functional test (Larry Ruane) b5a80fa7e487c37b7ac0e3874a2fabade41b9ca8 util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli (Hennadii Stepanov) Pull request description: If `bitcoind` is processing 16 RPC requests, attempting to submit another request using `bitcoin-cli` produces this less-than-helpful error message: `error: couldn't parse reply from server`. This PR changes the error to: `error: server response: Work queue depth exceeded`. ACKs for top commit: fjahr: tACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a luke-jr: utACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a (no changes since previous utACK) hebasto: re-ACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/18335#pullrequestreview-460621350) review. darosior: ACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a Tree-SHA512: 33e25f6ff05d9b56fae2bdb68b132557bb8e995f5438ac4fbbc53c304c5152a98aa43c43600c31d8a6a2830cbd48bf8ec7d89dce50190b29ec00a43830126913
2021-03-19Merge #21328: net, refactor: pass uint16 CService::port as uint16MarcoFalke
52dd40a9febec1f4e70d777821b6764830bdec61 test: add missing netaddress include headers (Jon Atack) 6f09c0f6b57ac01a473c587a3e51e9d477866bb0 util: add missing braces and apply clang format to SplitHostPort() (Jon Atack) 2875a764f7d8b1503c7bdb2f262964f7a0cb5fc3 util: add ParseUInt16(), use it in SplitHostPort() (Jon Atack) 6423c8175fad3163c10ffdb49e0df48e4e4931f1 p2p, refactor: pass and use uint16_t CService::port as uint16_t (Jon Atack) Pull request description: As noticed during review today in https://github.com/bitcoin/bitcoin/pull/20685#discussion_r584873708 of the upcoming I2P network support, `CService::port` is `uint16_t` but is passed around the codebase and into the ctors as `int`, which causes uneeded conversions and casts. We can avoid these (including in the incoming I2P code without further changes to it) by using ports with the correct type. The remaining conversions are pushed out to the user input boundaries where they can be range-checked and raise with user feedback in the next patch. ACKs for top commit: practicalswift: cr ACK 52dd40a9febec1f4e70d777821b6764830bdec61: patch looks correct MarcoFalke: cr ACK 52dd40a9febec1f4e70d777821b6764830bdec61 vasild: ACK 52dd40a9febec1f4e70d777821b6764830bdec61 Tree-SHA512: 203c1cab3189a206c55ecada77b9548b810281cdc533252b8e3330ae0606b467731c75f730ce9deb07cbaab66facf97e1ffd2051084ff9077cba6750366b0432
2021-03-19Merge #21481: doc: Tell howto install clang-format on Debian/UbuntuMarcoFalke
ea76f4ac7d6e8c268d301d7ae6c8d4d8d804d55f Doc: Tell howto install clang-format on Debian/Ubuntu (wodry) Pull request description: Because only macOS wasy mentioned, I was unsure if this would be a macOS specific tool. I guess Linux is more used than Mac, so Linux guide should be there, too. ACKs for top commit: hebasto: ACK ea76f4ac7d6e8c268d301d7ae6c8d4d8d804d55f, every system upgrade via clean installation I do the same. Tree-SHA512: 75c28540e8815cb41f4cf92784b6349978988b679e4deef9ae77ede951f93516ca13ec7b313ab72865b01273e115b49ed2b67cdcd68015af1b643a6186b190dd
2021-03-19 Fix wrong(1024) divisor for 1000-based prefixeswodry
2021-03-19Doc: Tell howto install clang-format on Debian/Ubuntuwodry
Because only macOS wasy mentioned, I was unsure if this would be a macOS specific tool. I guess Linux is more used than Mac, so Linux guide should be there, too.
2021-03-19Merge #21235: p2p: Clarify disconnect log message in ProcessGetBlockData, ↵MarcoFalke
remove send bool fa8177324392c923c6ce39056cfd870af55ab673 style-only: Remove whitespace (MarcoFalke) fae77b9e6dc9e59b355d56df49c4d9685b6f40a4 net: Simplify ProcessGetBlockData execution by removing send flag. (Patrick Strateman) fae7c0429f96e08bcac944f6fa30264636dfda8c log: Clarify that block request below NODE_NETWORK_LIMITED_MIN_BLOCKS disconnects (MarcoFalke) Pull request description: * Clarify that "ignoring" really means "disconnect" in the log * Revive a refactor I took from #13670 ACKs for top commit: jnewbery: utACK fa8177324392c923c6ce39056cfd870af55ab673 sipa: utACK fa8177324392c923c6ce39056cfd870af55ab673 Tree-SHA512: 0a4fcb979cb82c4e26012881eeaf903c38dfbb85d461476c01e35294760744746a79c48ffad827fe31c1b830f40c6e4240529c71e375146e4d0313c3b7d784ca
2021-03-18fuzz: Add tx_pool fuzz targetsMarcoFalke
2021-03-18style-only: Remove whitespaceMarcoFalke
Can be reviewed with --ignore-all-space
2021-03-18net: Simplify ProcessGetBlockData execution by removing send flag.Patrick Strateman
Setting the send flag to false can be replaced by simply returning.
2021-03-18log: Clarify that block request below NODE_NETWORK_LIMITED_MIN_BLOCKS ↵MarcoFalke
disconnects
2021-03-18Merge #21425: refactor: Pass PeerManagerImpl members only onceMarcoFalke
fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e refactor: Pass PeerManagerImpl members only once (MarcoFalke) Pull request description: Member variables are already passed to methods via `this`, so no need to pass them another time as function parameter. ACKs for top commit: jnewbery: utACK fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e amitiuttarwar: utACK fa2a80bf12d87c1d8a1a98b2faa8eea6731aac0e Tree-SHA512: 1743825c7560cc748235e3db03e4cea02ad1f670f1b898d7757da644f12693ba9bb2d3eb09b64b3d10dd2e68f52dea31e26d5e97bdc013759baa0515d3c7055c
2021-03-18Merge #21162: Net Processing: Move RelayTransaction() into PeerManagerfanquake
680eb56d828ce358b4e000c140f5b247ff5e6179 [net processing] Don't pass CConnman to RelayTransactions (John Newbery) a38a4e8f039dfabfd9435f3a63f1a9b56de086d6 [net processing] Move RelayTransaction into PeerManager (John Newbery) Pull request description: This is the first part of #21160. It moves the RelayTransaction() function to be a member function of the PeerManager class. This is required in order to move the transaction inventory data into the Peer object, since Peer objects are only accessible from within PeerManager. ACKs for top commit: ajtowns: ACK 680eb56d828ce358b4e000c140f5b247ff5e6179 Tree-SHA512: 8c93491a4392b6369bb7f090de326a63cd62a088de59026e202f226f64ded50a0cf1a95ed703328860f02a9d2f64d3a87ca1bca9a6075b978bd111d384766235
2021-03-18Merge #21435: doc: Update dependencies.mdfanquake
bb3f79fbdcd792aff04b2bf111de13219cd9ad56 doc: Update libnatpmp info in dependencies.md (Hennadii Stepanov) 1a01a5dc8dfaed036f66b06c502dd86fe41868af doc: Update zlib info in dependencies.md (Hennadii Stepanov) Pull request description: Update docs according to the recent changes in the code: - #21209 (zlib) - #21376 (libnatpmp) ACKs for top commit: fanquake: ACK bb3f79fbdcd792aff04b2bf111de13219cd9ad56 - thanks for keeping this updated. Tree-SHA512: 48350ad07700aa071ad6c34e4c161aaadc050488fc068cf478e9781d632828187962a4384c1b67c2344145a2c00c3e16cddd09259130af8e9e86cd76cd32900d
2021-03-18Merge #21343: doc: revamp macOS build docfanquake
c180c911b88b2bd2baf2c9c2b24e276787ffb69b doc: revamp macOS build doc (Jarol Rodriguez) Pull request description: This PR makes the macOS build-docs more informative and adds in the following information: - Proper descriptions and delineation of required/optional dependencies - walk-through of optional dependencies - configuration walk-through - various other tidbits of information This is a part of the efforts done in https://github.com/bitcoin/bitcoin/pull/20601 and https://github.com/bitcoin/bitcoin/pull/20610 to update the docs and introduce some consistency between them. This update does not add instructions for arm-based M1 Macbooks as I do not have one to test with. It would be nice to have someone follow up with an update containing instructions for arm-based Macs. **Before/Master:** [render](https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md) **After/PR:** [render](https://github.com/bitcoin/bitcoin/blob/c180c911b88b2bd2baf2c9c2b24e276787ffb69b/doc/build-osx.md) ACKs for top commit: fanquake: ACK c180c911b88b2bd2baf2c9c2b24e276787ffb69b - I still think these are getting too verbose and we're duplicating information all over the place; dependencies, configure options, combinations of options etc. However if people are happy to maintain them, I guess it's fine for now, and this revamping has already happened for some of the other build READMEs. Tree-SHA512: 1440046c723fe80d4158e4a429e3aa8bd93570acb84ad202d5d24c749ab9a89a3aca8b61b49e75e042a4bf4317acd632d3906e1b5808a9052e74209256528b45
2021-03-17Merge #21415: refactor: remove Optional & nulloptWladimir J. van der Laan
ebc4ab721b0371c0ef217c0f5bd7d42613e951e6 refactor: post Optional<> removal cleanups (fanquake) 57e980d13ca488031bde6ef197cf34d493d36796 scripted-diff: remove Optional & nullopt (fanquake) Pull request description: Same rationale & motivation as #21404, which turned out to be quite low in the number of potential conflicts. Lets see what the bot has to say here. ACKs for top commit: practicalswift: cr ACK ebc4ab721b0371c0ef217c0f5bd7d42613e951e6: patch looks correct jnewbery: utACK ebc4ab721b0371c0ef217c0f5bd7d42613e951e6 laanwj: Code review ACK ebc4ab721b0371c0ef217c0f5bd7d42613e951e6 Tree-SHA512: 550fbeef09b9d35ddefaa805d1755c18c8fd499c4b0f77ebfece8c20296a7abd1cf6c699e2261f92fe3552deeb7555ec2a2287ffe3ab9e98bb9f8612a4d43be3
2021-03-17refactor: Pass PeerManagerImpl members only onceMarcoFalke
Can be reviewed with --word-diff-regex=. --ignore-all-space
2021-03-17refactor: post Optional<> removal cleanupsfanquake
2021-03-17Merge #21417: Misc external signer improvement and HWI 2 supportfanquake
57ff5a42ab89c2774387b53248bbf5902de086b4 doc: specify minimum HWI version (Sjors Provoost) 03308b2bfaef5cdf2337a1e8f63edf043d98a7c0 rpc: don't require wallet for enumeratesigners (Sjors Provoost) Pull request description: HWI just released 2.0. See https://github.com/bitcoin-core/HWI/releases/tag/2.0.0 As of #16546 we already rely on features that are in 2.0 and not in the previous 1.* releases: * `--chain` param This shouldn't be a problem, because HWI 2.0 has been released before we release v22. Misc improvements: * document that HWI 2.0 is required * drop wallet requirement for `enumeratesigners` ACKs for top commit: achow101: Code Review ACK 57ff5a42ab89c2774387b53248bbf5902de086b4 Tree-SHA512: 3fb6ba20894e52a116f89525a5f5a1f61d363ccd904e1cffd0e6d095640fc6d2edf0388cd6ae20f83bbc31e5f458255ec090b6e823798d426eba3e45b4336bf9
2021-03-17Merge #21083: wallet: Avoid requesting fee rates multiple times during coin ↵Samuel Dobson
selection f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3 Rename CoinSelectionParams::effective_fee to m_effective_feerate (Andrew Chow) bdd0c2934b7f389ffcfae3b602ee3ecee8581acd wallet: Move discard feerate fetching to CreateTransaction (Andrew Chow) 448d04b931f86941903e855f831249ff5ec77485 wallet: Move long term feerate setting to CreateTransaction (Andrew Chow) e2f429e6bbf7098f278c0247b954ecd3ba53cf37 wallet: Replace nFeeRateNeeded with effective_fee (Andrew Chow) 1a6a0b0dfb90f9ebd4b86d7934c6aa5594974f5f wallet: Use existing feerate instead of getting a new one (Andrew Chow) Pull request description: During coin selection, there are various places where we need to have a feerate. We need the feerate for the transaction itself, the discard fee rate, and long term feerate. Fetching these each time we need them can lead to a race condition where two feerates that should be the same are actually different. One particular instance where this can happen is during the loop in `CreateTransactionInternal`. After inputs are chosen, the expected transaction fee is calculated using a newly fetched feerate. If `pick_new_inputs == false`, the loop will go again with the assumption that the fee for the transaction remains the same. However because the feerate is fetched again, it is possible that it actually isn't and this causes coin selection to fail. Instead of fetching the feerate each time it is needed, we fetch them all at once at the top of `CreateTransactionInternal`, store them in `CoinSelectionParams`, and use them where needed. While some of these fee rates probably don't need this caching, I've done it for consistency and the guarantee that they remain the same. Fixes #19229 ACKs for top commit: glozow: reACK https://github.com/bitcoin/bitcoin/commit/f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3 fjahr: Code review re-ACK f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3 Xekyo: tACK https://github.com/bitcoin/bitcoin/pull/21083/commits/f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3 meshcollider: Code review + test run ACK f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3 Tree-SHA512: be83ff64ba473c3cdd3469c812e214659b6e2a9584c22ed2b1595618fce0d4b35d0901e61068cd1069fc1a8fb911db01dd7312d05c3b8cbafbe2504ab7a3e863
2021-03-16Rename CoinSelectionParams::effective_fee to m_effective_feerateAndrew Chow
It's a feerate, not a fee. Also follow the style guide for member names.
2021-03-16wallet: Move discard feerate fetching to CreateTransactionAndrew Chow
Instead of fetching the discard feerate for each SelectCoinsMinConf iteration, fetch and cache it once during CreateTransaction so that it is shared for each SelectCoinsMinConf through coin_selection_params.m_discard_feerate. Does not change behavior.
2021-03-16wallet: Move long term feerate setting to CreateTransactionAndrew Chow
Instead of setting the long term feerate for each SelectCoinsMinConf iteration, set it once during CreateTransaction and let it be shared with each SelectCoinsMinConf through coin_selection_params.m_long_term_feerate. Does not change behavior.
2021-03-16test: add missing netaddress include headersJon Atack
2021-03-16util: add missing braces and apply clang format to SplitHostPort()Jon Atack
2021-03-16util: add ParseUInt16(), use it in SplitHostPort()Jon Atack
2021-03-16p2p, refactor: pass and use uint16_t CService::port as uint16_tJon Atack
2021-03-16Merge #21410: test: increase rpc_timeout for fundrawtx ↵MarcoFalke
test_transaction_too_large d09120b7d1d5c94ec89f8d2c1d9060e7388be057 test: give fundraw more time for test_transaction_too_large (Jon Atack) Pull request description: to hopefully fix timeouts from a new test added in 48a0319bab of #20536 merged March 8, 2021 seen locally when running via the test runner ``` File "/home/jon/projects/bitcoin/bitcoin/test/functional/rpc_fundrawtransaction.py", line 927, in test_transaction_too_large raise JSONRPCException({ test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30.000000 seconds. Consider using larger timeout for calls that take longer to return. (-344) ``` and in the CI like https://bitcoinbuilds.org/index.php?ansilog=28537952-2c92-46f2-9871-8918e5ba2738.log#l2398 ``` File "/home/ubuntu/src/test/functional/rpc_fundrawtransaction.py", line 927, in test_transaction_too_large test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 240.000000 seconds. Consider using larger timeout for calls that take longer to return. (-344) ``` Top commit has no ACKs. Tree-SHA512: f11c923439014fe12420f986c640fd301a26282eb41516957d73b9c751087cbae3d0e316f9ccb49bcb424f488540266f70d3f97948633e77c62bd7935df90452
2021-03-16doc: Update libnatpmp info in dependencies.mdHennadii Stepanov
2021-03-16wallet: Replace nFeeRateNeeded with effective_feeAndrew Chow
Make sure that all fee calculations use the same feerate. coin_selection_params.effective_fee is the variable we use for all fee calculations, so get rid of remaining nFeeRateNeeded usages and just directly set coin_selection_params.effective_fee. Does not change behavior.
2021-03-16wallet: Use existing feerate instead of getting a new oneAndrew Chow
During each loop of CreateTransaction, instead of constantly getting a new feerate, use the feerate that we have already fetched for all fee calculations. Thix fixes a race condition where the feerate required changes during each iteration of the loop. This commit changes behavior as the "Fee estimation failed" error will now take priority over "Signing transaction failed".