bf79f08d97 Swap out hashlib.ripemd160 for own implementation (Pieter Wuille)
6bfa0bef48 Add pure Python RIPEMD-160 (Pieter Wuille)
Pull request description:
Backports #23716 to 0.21. Closes#25534.
Top commit has no ACKs.
Tree-SHA512: d2a175d781b30249b14488b818720554995a71cae1861c7443be120a01fd7828737949ece5fc9c193a154e06f4e37d373e44ec7d9dcd64f8e86c0429abe70bb6
efb9f00f07 build: Restrict check for CRC32C intrinsic to aarch64 (W. J. van der Laan)
cfb08c342e refactor: include a missing <limits> header in fs.cpp (Joan Karadimov)
Pull request description:
There might not be another 0.21.x release, however these are both straight forward changes. If this isn't merged, then the pulls can remain untagged for needing backport.
Backports:
- https://github.com/bitcoin/bitcoin/pull/23045
- https://github.com/bitcoin/bitcoin/pull/23335
ACKs for top commit:
laanwj:
ACK efb9f00f07
LarryRuane:
utACK efb9f00f07
Tree-SHA512: 09be8f8ce90f862e2d408c5707a8387ca828fdd05a9814cfed5236030a3b33012e7d7a557c2ee3989db26922ad45cb8a307bdeba7ac8e34b5f21f0d46eda1955
`crc32c`'s hardware accelerated code doesn't handle ARM 32-bit at all.
Make the check in `configure.ac` check for this architecture explicitly.
For the release binaries, the current `configure.ac` check happens
to work: it enables it on aarch64 but disables it for armhf. However
some combination of compiler version and settings might ostensibly cause
this check to succeed on armhf (as reported on IRC). So make the 64-bit
platform requirement explicit.
Github-Pull: #23045
Rebased-From: f2747d1602
b8f5fb7c6b build: bump version to 0.21.2rc2 (fanquake)
82c5208ddc doc: update release notes for rc2 (fanquake)
Pull request description:
Bump version to `0.21.2rc2` and add the new backports to the release notes.
ACKs for top commit:
MarcoFalke:
ACK b8f5fb7c6b
hebasto:
ACK b8f5fb7c6b
Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
d9b18c1290 Fix build with Boost 1.77.0 (Rafael Sadowski)
2d7f2606c1 ci: Run fuzzer task for the master branch only (Hennadii Stepanov)
Pull request description:
Backported:
1) #22730
1) #22713
ACKs for top commit:
fanquake:
ACK d9b18c1290 - Checked the backports and tested building this branch with system Boost 1.76.0 and depends Boost 1.77.0.
Tree-SHA512: dc3e0a2b3c1e3e80f6570e329a08ebc5103c233c30562f660432891c90bacb4d88d5373e32b9ac34fd143be46b8e63900ce9f52786b04bc799a4d17ba9fd8499
2a7568999c qt: Pre-0.21.2rc2 translations update (Hennadii Stepanov)
Pull request description:
New translations with insignificant amount of translated strings were ignored: `ach`, `cmn`, `gd`, `ig`, `sc`.
ACKs for top commit:
fanquake:
ACK 2a7568999c - didn't review any specific translations.
Tree-SHA512: fab299a7a3691b38f85812e9302ae3a6fda2b7bd95a824aaf5537f1bc066417f912c042fa4366432ed091244f051cc7d4c57161d8da1e4bd6261a85570f8f12e
2873e01c6a doc: add inital PR and author list to 0.21.2 release notes (fanquake)
Pull request description:
Any further updates / version number adjustments can be done prior to final.
ACKs for top commit:
laanwj:
ACK 2873e01c6a
Tree-SHA512: 57135f64ccfc41ec63aa265eb25978a2afd68b6b8719e79358c52ec7d2dc0cee04b81f720b827263c381529f457667b0b1a8f7d835118dc56bf2a6aa9d321859
2a57108051 Avoid Appveyor compilation failure (Pieter Wuille)
a653aacbd6 Add logging and addr rate limiting statistics (Pieter Wuille)
aaa4833fc9 Functional tests for addr rate limiting (Pieter Wuille)
8df3e5bd84 Randomize the order of addr processing (Pieter Wuille)
83dfe6c65e Rate limit the processing of incoming addr messages (Pieter Wuille)
Pull request description:
Backport of #22387.
The rate at which IP addresses are rumoured (through ADDR and ADDRV2 messages) on the network seems to vary from 0 for some non-participating nodes, to 0.005-0.025 addr/s for recent Bitcoin Core nodes. However, the current codebase will happily accept and process an effectively unbounded rate from attackers. There are measures to limit the influence attackers can have on the addrman database (bucket restrictions based on source IPs), but still - there is no need to permit them to feed us addresses at a rate that's orders of magnitude larger than what is common on the network today, especially as it will cause us to spam our peers too.
This PR implements a [token bucket](https://en.wikipedia.org/wiki/Token_bucket) based rate limiter, allowing an average of 0.1 addr/s per connection, with bursts up to 1000 addresses at once. Whitelisted peers as well as responses to GETADDR requests are exempt from the limit. New connections start with 1 token, so as to not interfere with the common practice of peers' self-announcement.
Due to the lack of the `Peer` struct in 0.21, the relevant fields have been added to `CNodeState` instead, necessitating additional locks, and slightly different structure to avoid too much `cs_main` grabbing. The last test-improving commit has also been dropped, as the code has changed too much. Most of the behavior is still tested however, just not the part that compares with RPC statistics.
ACKs for top commit:
achow101:
ACK 2a57108051
GeneFerneau:
Approach + code review ACK [2a57108](2a57108051)
jnewbery:
reACK 2a57108051
Tree-SHA512: ecf4891ac6173d732aa40b4d05fc0dce94127a613cb9051bf6188a2f95824f8234b17d386dd0b352ddf3d352202cc2ff07915ae35657d8e64907e3f80703d1d9
While limitations on the influence of attackers on addrman already
exist (affected buckets are restricted to a subset based on incoming
IP / network group), there is no reason to permit them to let them
feed us addresses at more than a multiple of the normal network
rate.
This commit introduces a "token bucket" rate limiter for the
processing of addresses in incoming ADDR and ADDRV2 messages.
Every connection gets an associated token bucket. Processing an
address in an ADDR or ADDRV2 message from non-whitelisted peers
consumes a token from the bucket. If the bucket is empty, the
address is ignored (it is not forwarded or processed). The token
counter increases at a rate of 0.1 tokens per second, and will
accrue up to a maximum of 1000 tokens (the maximum we accept in a
single ADDR or ADDRV2). When a GETADDR is sent to a peer, it
immediately gets 1000 additional tokens, as we actively desire many
addresses from such peers (this may temporarily cause the token
count to exceed 1000).
The rate limit of 0.1 addr/s was chosen based on observation of
honest nodes on the network. Activity in general from most nodes
is either 0, or up to a maximum around 0.025 addr/s for recent
Bitcoin Core nodes. A few (self-identified, through subver) crawler
nodes occasionally exceed 0.1 addr/s.
Github-Pull: #22387
Rebased-From: 0d64b8f709
55e941f5df test: Fix intermittent feature_taproot issue (MarcoFalke)
681f728a35 ci: Build with --enable-werror by default, and document exceptions (Hennadii Stepanov)
89426c43fb ci: Fix macOS brew install command (Hennadii Stepanov)
Pull request description:
This backports a few changes to fix CI failures we are seeing with the 0.21 branch.
Backports #21663, this might be the easiest way to fix the macOS CI failures we're seeing. i.e in #22569. The underlying issue is that the older CI images are using a version of brew that without running `brew update` first, is trying to download packages like Boost, from bintray (which no-longer works).
This also includes #20182, as by fixing macOS failure, via running `brew upgrade`, we end up using a newer version of miniupnpc, which emits a GNU extension related warning, and causes the build to fail, because we use `-Werror`.
Backporting #20535 should fix#22581.
ACKs for top commit:
hebasto:
ACK 55e941f5df, I verified changes by backporting locally.
Tree-SHA512: 3ab2c5c73c707d0f5b862264f3a0179cdeee30ae55aae872f3c3e0bb81d71a5027c39ba830210c99a21f98cc86c4167c4f215e24d1a8891ec79ce512debf82df
e3f1da4bf3 qt: Draw "eye" sign at the beginning of watch-only addresses (Hennadii Stepanov)
6ca54ce2ae qt: Do not extend recent transaction width to address/label string (Hennadii Stepanov)
f220368220 qt: Do not use QClipboard::Selection on Windows and macOS. (Hennadii Stepanov)
Pull request description:
Backports https://github.com/bitcoin-core/gui/pull/277, https://github.com/bitcoin-core/gui/pull/365.
ACKs for top commit:
fanquake:
ACK e3f1da4bf3
jarolrod:
ACK e3f1da4bf3
Tree-SHA512: 43cc2ac48f4e5014bfdbe86cc904bb36d2be9fcd257f0fc0800c384bd727bb98466723e450a8909b06708784ad91184be599c49cf60de2e4377202774cb878f6
da816247f0 util: Properly handle -noincludeconf on command line (MarcoFalke)
513613d8a8 Cleanup -includeconf error message (MarcoFalke)
70eac6fcd0 Fix crash when parsing command line with -noincludeconf=0 (MarcoFalke)
c5357fa415 fuzz: add missing ECCVerifyHandle to base_encode_decode (Andrew Poelstra)
Pull request description:
Backports #22279, #22002 and #22137 to fix fuzzing issues in the 0.21 branch: https://github.com/bitcoin/bitcoin/runs/2864012729.
ACKs for top commit:
achow101:
ACK da816247f0
Tree-SHA512: ab8751387e42e03ff43594ae34be8ed0dba903d7da1aaecb9f19c08366570d8995abe89ba0c9bafe37662940f3e83bef1e9e50f330e86114cd6a773becd1fd21
7b0b201d10 wallet: Do not iterate a directory if having an error while accessing it (Hennadii Stepanov)
Pull request description:
This change prevents infinite looping for, for example, system folders
on Windows.
Github-Pull: #21907
Rebased-From: 29c9e2c2d2
Note: Trivial backport, but in a differently-named function in another file
ACKs for top commit:
hebasto:
ACK 7b0b201d10, I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: d41ab267250e8bfd9289cacf1fd804cc1a3bb20fc479dc9da5a69ebf26530b552b11b2ee6b11e17a1c146ca792ee65bd64eeb2269fa5e73a70361da8a2a09925
This bug was introduced in commit
fad0867d6a.
Unit test
Co-Authored-By: Russell Yanofsky <russ@yanofsky.org>
Github-Pull: #22137
Rebased-From: fa910b4765
Remove the erroneous trailing newline '\n'. Also, print only the first
value to remove needless redundancy in the error message.
Github-Pull: #22002
Rebased-From: fad0867d6a
0fe60a84ae Use latest signapple commit (Andrew Chow)
5313d6aed2 gitian: Remove codesign_allocate and pagestuff from MacOS build (Andrew Chow)
27d691b6b5 gitian: use signapple to create the MacOS code signature (Andrew Chow)
2f33e339a8 gitian: use signapple to apply the MacOS code signature (Andrew Chow)
65ce833042 gitian: install signapple in gitian-osx-signer.yml (Andrew Chow)
Pull request description:
Backport of #20880 and #22190
ACKs for top commit:
MarcoFalke:
cherry-pick-only ACK 0fe60a84ae🍀
Tree-SHA512: e864048fab02a1857161602dd53abba552ca3f859c133a47a5e62c28d3e4de9cd099bce86123a1b5892042b09f51cc1ddd2ed1b0c71bfba162710eaee3f5bf91