26720 Commits

Author SHA1 Message Date
Bertrand Jacquin
942496a117
Update to Berkeley DB 5.3
Old BerkeleyDB version such as 5.1 are being removed from most Linux
distribution.

See: https://bugs.gentoo.org/792222
See: https://fedoraproject.org/wiki/Changes/Libdb_deprecated
2022-03-24 13:10:57 +01:00
Old Dip Tracker
b37577b710
Merge pull request #2883 from patricklodder/1.21-boost-178-fs
1.21: make wallet/load path compatible with boost 1.78+
2022-03-24 08:09:50 -04:00
Patrick Lodder
88f12bba8a
fs: make wallet/load path compatible with boost 1.78+
Imports the fix for Bitcoin Core for boost 1.78, minus all the
extras, as this is a one-liner. Backport conflict pressure will
remain one line too.

Taken from: dc5d6b0d @ bitcoin/bitcoin
Original author: Andrew Chow <achow101-github@achow101.com>
2022-03-23 12:42:31 +01:00
Ross Nicoll
20b3f31035
Merge pull request #2849 from patricklodder/1.21-sovereign-depends
depends: port dependency location changes to 1.21
2022-02-14 09:05:02 +00:00
Patrick Lodder
eff8c91070
qa: change sdk download source for CI
Cherry-picked from: 556c586 (1.14.6-dev)
2022-02-12 21:29:53 +01:00
Patrick Lodder
bf9e4f6ff0
depends: change fallback to depends.dogecoincore.org
Changes the fallback dependency source repository from Bitcoin's
bitcoincore.org to dogecoincore.org. Both are centrally hosted,
as a fallback. Ideally this would be utilizing a decentralized
protocol like IPFS, but this is harder to integrate with the CI
tooling.

Note: because some dependencies have identical filenames in their
source URLs (currently ds_store and mac_alias) we host the target
filename on the mirror, to prevent conflicts.

Cherry-picked from: 2c7772e90 (1.14.6-dev)
2022-02-12 21:13:35 +01:00
Ross Nicoll
e73ab3f90f consensus: AuxPoW header
Add the AuxPoW header to block storage, without yet adding code to mine or validate mined AuxPoW blocks.
2021-11-26 19:17:55 +00:00
Ross Nicoll
aa61e37d74
Merge pull request #2560 from rnicoll/1.21-chain-id
consensus: Add chain ID to block version
2021-11-15 09:19:36 +00:00
Ross Nicoll
24be0ef4fe
consensus: Add chain ID to block version 2021-11-14 18:39:20 +00:00
Ross Nicoll
e674367344
Merge pull request #2315 from rnicoll/1.21-replace-sha256
Replace HMAC_SHA256 with Bitcoin's version
2021-11-11 22:16:32 +00:00
Ross Nicoll
bad91d661e
Merge pull request #2522 from rnicoll/1.21-merge-1.21.2-rc2
Merge Bitcoin Core 0.21.2-rc2
2021-09-24 22:13:35 +01:00
Ross Nicoll
88a9713030 Convert invalid addresses to Doge 2021-09-21 23:15:24 +01:00
Ross Nicoll
4f00278f29
Fix up functional tests
* Update rpc_signrawtransaction.py with Doge-compatible fee values.
* Replace addresses in rpc_invalid_address_message.py with Dogecoin prefixes.
2021-09-19 20:45:31 +01:00
Patrick Lodder
b262c2b3be
Merge pull request #2556 from rnicoll/1.21-auxpow-test-set-base-version
1.21 auxpow test set base version
2021-09-10 03:41:17 +02:00
Ross Nicoll
320d27a456 Use set_base_version in tests
Use set_base_version in tests in preparation for adding chain IDs to block versions.
2021-09-09 22:25:08 +01:00
Patrick Lodder
dbed8284f2
Merge pull request #2552 from rnicoll/1.21-read-block-from-disk
Introduce ReadBlockOrHeaderFromDisk
2021-09-09 21:29:51 +02:00
Ross Nicoll
1e72191e81
Introduce ReadBlockOrHeaderFromDisk 2021-09-09 19:24:50 +01:00
Patrick Lodder
b4ee1226c3
Merge pull request #2547 from rnicoll/1.21-CPureBlockHeader
Introduce CPureBlockHeader type ahead of AuxPoW support
2021-09-08 00:02:04 +02:00
Malta Micael
7b4867ea2b
CPureBlockHeader 2021-09-07 21:40:10 +01:00
Ross Nicoll
152e7b3633
Merge pull request #2538 from ReverseControl/deepsource-fix-9833b18c
Deepsource Fix: Comprehension not required. Allow evaluation short-circuiting.
2021-09-06 23:59:39 +01:00
Escanor Liones
5e8e6f0b46 [clean] 2021-09-04 23:28:10 -04:00
deepsource-autofix[bot]
c90163c832
Remove unnecessary comprehension 2021-09-05 03:26:46 +00:00
Escanor Liones
bcb587d751
.deepsource.toml 2021-09-04 21:09:14 -04:00
Ross Nicoll
b2554af0df Bitcoin Core 0.21.2 release candidate 2
Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz7FuIclQ9n+pXlWPLuufXMCVJsEFAmEp9EoACgkQLuufXMCV
 JsGvcQ//ZSQOCEFH3e+gBuXHthXG2UZsHagC715ruQquhRt4aOKiFLu/eJGwiKBt
 Frc1wLF21dgtl/2JUtVBpVb54whni1PKgDowtkk4Ge7gWM0awW2OnvdgA21E+syD
 501duaW6ORvo5icmf7uPQ7u/g9Ks1s1chBr1bLnYqqqg2e3/aqC4+drTjd8wziy3
 J+8Bzc+KLAklgv8cIpH1EDuFGrumlMYxW0KHqJeN7Vk8wGX8PINrkEGCyrBDQ7DY
 BEd6txwcivPxqMfj61OP60DU0oG6IVECGMPrANtyK+ba0FHl+GkNQuTaX8zv4Ik9
 dKscJ1OiRX2ER/pEJTwg8PJfOET5D/WRc1xSmrYBOK7cFLtYVqH2yvnHiLlWvH1P
 7TQOAjfzQwa+yUnGRf2dWW+Rngv876JjBUX5vbm4UC5Geo8Bdl3z9U9glaq03fVd
 3Q8uAgljLnXWFiylK9oDYhsFfWSUYgjyhM11LCb5K3y3t7ageclu6RTl574jy5sb
 8qBwQxpJt5UtwIK2SNqq1iDmMW3J65sb3CmTND9ppDA79GfZzwlvGVwO1bN2TC6m
 0dGTPvOPWS9x/PSq8+8o1uCHDzHrW9B5lUikf8kx+zNI7Rd3QLJ0pbdqwrJ3CcOk
 ttV5QXAYD2trfkCKEi69eiIpH21rasqjyI11ZoH4u+0BCpw8hQg=
 =GXjC
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.2rc2' into 1.21-dev

Bitcoin Core 0.21.2 release candidate 2

Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
2021-09-03 13:40:49 +01:00
fanquake
97d3500601
Merge bitcoin/bitcoin#22823: [0.21] Update version and release notes for 0.21.2rc2
b8f5fb7c6bc2aac3b6313ba796f3ed11101caf65 build: bump version to 0.21.2rc2 (fanquake)
82c5208ddcfc51ffcb8b03b5f750bbcebd994599 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 b8f5fb7c6bc2aac3b6313ba796f3ed11101caf65
  hebasto:
    ACK b8f5fb7c6bc2aac3b6313ba796f3ed11101caf65

Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
2021-08-28 16:25:43 +08:00
fanquake
b8f5fb7c6b
build: bump version to 0.21.2rc2 2021-08-28 16:01:20 +08:00
fanquake
82c5208ddc
doc: update release notes for rc2 2021-08-28 15:55:03 +08:00
fanquake
6ebb9d0e46
Merge bitcoin/bitcoin#22808: [0.21] 0.21.2rc2 backports
d9b18c12903e3ed3b06e1452852159e5b713ff28 Fix build with Boost 1.77.0 (Rafael Sadowski)
2d7f2606c193dd14307243816d40180867a0d913 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 d9b18c12903e3ed3b06e1452852159e5b713ff28 - Checked the backports and tested building this branch with system Boost 1.76.0 and depends Boost 1.77.0.

Tree-SHA512: dc3e0a2b3c1e3e80f6570e329a08ebc5103c233c30562f660432891c90bacb4d88d5373e32b9ac34fd143be46b8e63900ce9f52786b04bc799a4d17ba9fd8499
2021-08-28 15:33:34 +08:00
fanquake
55a8a5b2df
Merge bitcoin/bitcoin#22810: [0.21] qt: Pre-0.21.2rc2 translations update
2a7568999cbc7cd09e71c07d0a2871b9a9343ef0 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 2a7568999cbc7cd09e71c07d0a2871b9a9343ef0 - didn't review any specific translations.

Tree-SHA512: fab299a7a3691b38f85812e9302ae3a6fda2b7bd95a824aaf5537f1bc066417f912c042fa4366432ed091244f051cc7d4c57161d8da1e4bd6261a85570f8f12e
2021-08-28 14:44:02 +08:00
Rafael Sadowski
d9b18c1290
Fix build with Boost 1.77.0
BOOST_FILESYSTEM_C_STR changed to accept the path as an argument

Github-Pull: bitcoin/bitcoin#22713
Rebased-From: acb7aad27ec8a184808aa7905887e3b2c5d54e9c
2021-08-27 09:54:05 +03:00
Hennadii Stepanov
2d7f2606c1
ci: Run fuzzer task for the master branch only
Github-Pull: bitcoin/bitcoin#22730
Rebased-From: 5a9e255e5a324e7aa0b63a9634aa3cfda9a300bd
2021-08-27 09:54:04 +03:00
Hennadii Stepanov
2a7568999c
qt: Pre-0.21.2rc2 translations update 2021-08-27 00:29:27 +03:00
W. J. van der Laan
3118a5eedf
Merge bitcoin/bitcoin#22721: doc: add inital PR and author list to 0.21.2 release notes
2873e01c6a257519247267ccbced5973e18ab019 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 2873e01c6a257519247267ccbced5973e18ab019

Tree-SHA512: 57135f64ccfc41ec63aa265eb25978a2afd68b6b8719e79358c52ec7d2dc0cee04b81f720b827263c381529f457667b0b1a8f7d835118dc56bf2a6aa9d321859
2021-08-17 15:42:43 +02:00
fanquake
2873e01c6a
doc: add inital PR and author list to 0.21.2 release notes
Any further updates / version number adjustments can be done prior to
final.
2021-08-17 13:57:17 +08:00
W. J. van der Laan
89d148c8c6
qt: Translations update for 0.21.2rc1
Tree-SHA512: f0a74deb84711645ba112b364fbe958db51992f28d0ec87262dd0a21f1052a270f5fc8c13dfd6dc6f5a8a5580e7f1991b3de2d44e3a44252cd3c315dfc2e00ba
2021-08-11 13:23:05 +02:00
W. J. van der Laan
e94e433762
doc: Update manual pages for 0.21.2
Tree-SHA512: 26870ec4b8423879ccdbe0d74670985bf73f4814d32ff5d2c312acdd766e93e07e6a69bfb58b0288be8ba402d283ce493684420b254f8535936cb061ee11c0d2
2021-08-11 13:20:35 +02:00
W. J. van der Laan
bf672ce25a
build: Bump version to 0.21.2rc1
Tree-SHA512: 73d4df24ad516ca54ab23bcbd686223447a208904bb18a7a34400daab6d4b07322a7f244504547c772ede08b9e8606291df9d101236d8fd6debcb43563d069ac
2021-08-11 12:08:43 +02:00
MarcoFalke
4b523c8f0a
Merge bitcoin/bitcoin#22569: [0.21] Rate limit the processing of rumoured addresses
2a5710805195ca54a02aff3540ceaefb9cb3b3e2 Avoid Appveyor compilation failure (Pieter Wuille)
a653aacbd66a47edd6d14ddc62fec2d4038456b8 Add logging and addr rate limiting statistics (Pieter Wuille)
aaa4833fc9c3d44378e232002f4b9b447a2d18cb Functional tests for addr rate limiting (Pieter Wuille)
8df3e5bd84f2b2b60730034cbd71fe8f3276d434 Randomize the order of addr processing (Pieter Wuille)
83dfe6c65ef6c30ca01348ee5059c3d76e03d1d3 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 2a5710805195ca54a02aff3540ceaefb9cb3b3e2
  GeneFerneau:
    Approach + code review ACK [2a57108](2a57108051)
  jnewbery:
    reACK 2a5710805195ca54a02aff3540ceaefb9cb3b3e2

Tree-SHA512: ecf4891ac6173d732aa40b4d05fc0dce94127a613cb9051bf6188a2f95824f8234b17d386dd0b352ddf3d352202cc2ff07915ae35657d8e64907e3f80703d1d9
2021-08-06 19:46:04 +02:00
Pieter Wuille
2a57108051 Avoid Appveyor compilation failure 2021-08-05 09:48:25 -07:00
Pieter Wuille
a653aacbd6 Add logging and addr rate limiting statistics
Includes logging improvements by Vasil Dimov and John Newbery.

Github-Pull: #22387
Rebased-From: f424d601e1b6870e20bc60f5ccba36d2e210377b
2021-08-05 09:40:04 -07:00
Pieter Wuille
aaa4833fc9 Functional tests for addr rate limiting
Github-Pull: #22387
Rebased-From: b4ece8a1cda69cc268d39d21bba59c51fa2fb9ed
2021-08-05 09:40:04 -07:00
Pieter Wuille
8df3e5bd84 Randomize the order of addr processing
Github-Pull: #22387
Rebased-From: 5648138f5949013331c017c740646e2f4013bc24
2021-08-05 09:40:04 -07:00
Pieter Wuille
83dfe6c65e Rate limit the processing of incoming addr messages
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: 0d64b8f709b4655d8702f810d4876cd8d96ded82
2021-08-05 09:40:00 -07:00
MarcoFalke
068ac69b56
Merge bitcoin/bitcoin#22578: [0.21] Additional backports
55e941f5df18ce6d9b1ee8759f1419c5d1f03a8f test: Fix intermittent feature_taproot issue (MarcoFalke)
681f728a35b800d6f1cc359171b6b40de9ddb9a4 ci: Build with --enable-werror by default, and document exceptions (Hennadii Stepanov)
89426c43fb75fabd72e6e16433dab7f8ee9c860c 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 55e941f5df18ce6d9b1ee8759f1419c5d1f03a8f, I verified changes by backporting locally.

Tree-SHA512: 3ab2c5c73c707d0f5b862264f3a0179cdeee30ae55aae872f3c3e0bb81d71a5027c39ba830210c99a21f98cc86c4167c4f215e24d1a8891ec79ce512debf82df
2021-07-30 09:15:14 +02:00
fanquake
52778f4245
Merge bitcoin/bitcoin#22580: [0.21] Backport: Reset scantxoutset progress before inferring descriptors
080b47d9ce6288e1725857b3026291981ef75e34 rpc: reset scantxoutset progress on finish (Pavol Rusnak)

Pull request description:

  Backport of #19362.

ACKs for top commit:
  achow101:
    Code Review ACK 080b47d9ce6288e1725857b3026291981ef75e34

Tree-SHA512: 1f58965393663bfc0796fc06ef846bc87521d04d79c2a62227acf4d466de649db7d244c8992a32aa1086e6bf0ac92fb8a5aeadf4673441fefa505e40c02d5daf
2021-07-30 10:22:08 +08:00
MarcoFalke
55e941f5df
test: Fix intermittent feature_taproot issue
Github-Pull: #20535
Rebased-From: fa275e1539941b49fe206ff0bf110e3362bec6bb
2021-07-29 20:25:28 +08:00
Hennadii Stepanov
681f728a35
ci: Build with --enable-werror by default, and document exceptions
Github-Pull: #20182
Rebased-From: 2f6fe4e4e9e9e35e713c0a20cf891b023592110a
2021-07-29 20:25:03 +08:00
Hennadii Stepanov
89426c43fb
ci: Fix macOS brew install command
Details: https://github.com/Homebrew/discussions/discussions/691

Github-Pull: #21663
Rebased-From: b7381552cd4f965c45f1560d9cfc2fb09dbfcc1d
2021-07-29 16:52:15 +08:00
Pavol Rusnak
080b47d9ce
rpc: reset scantxoutset progress on finish
Github-Pull: #19362
Rebased-From: 8c4129b4540f4f739413ed9a6fbfc78afc252f42
2021-07-29 16:02:26 +08:00
fanquake
997e528a34
Merge bitcoin/bitcoin#22427: [0.21] gui: Backports for 0.21.2
e3f1da4bf3db120cc691a844d612fbc522f11fb9 qt: Draw "eye" sign at the beginning of watch-only addresses (Hennadii Stepanov)
6ca54ce2ae0808513172c4945e38165e766e1381 qt: Do not extend recent transaction width to address/label string (Hennadii Stepanov)
f220368220abb11040fa944a853cda3d4f1fe84d 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 e3f1da4bf3db120cc691a844d612fbc522f11fb9
  jarolrod:
    ACK e3f1da4bf3db120cc691a844d612fbc522f11fb9

Tree-SHA512: 43cc2ac48f4e5014bfdbe86cc904bb36d2be9fcd257f0fc0800c384bd727bb98466723e450a8909b06708784ad91184be599c49cf60de2e4377202774cb878f6
2021-07-29 11:20:57 +08:00