Commit graph

17345 commits

Author SHA1 Message Date
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 1e72191e81
Introduce ReadBlockOrHeaderFromDisk 2021-09-09 19:24:50 +01:00
Malta Micael 7b4867ea2b
CPureBlockHeader 2021-09-07 21:40:10 +01: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 6ebb9d0e46
Merge bitcoin/bitcoin#22808: [0.21] 0.21.2rc2 backports
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
2021-08-28 15:33:34 +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 2a7568999c
qt: Pre-0.21.2rc2 translations update 2021-08-27 00:29:27 +03: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
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 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
Pavol Rusnak 080b47d9ce
rpc: reset scantxoutset progress on finish
Github-Pull: #19362
Rebased-From: 8c4129b4540f4f739413ed9a6fbfc78afc252f42
2021-07-29 16:02:26 +08:00
Ross Nicoll 37073aeb09
Add warning log message if overriding -blockmintxfee 2021-07-11 23:09:17 +01:00
Hennadii Stepanov e3f1da4bf3
qt: Draw "eye" sign at the beginning of watch-only addresses
Github-Pull: bitcoin-core/gui#365
Rebased-From: cd46c11577a05f3dc9eac94f27a6985f6ba0509e
2021-07-11 12:03:33 +03:00
Hennadii Stepanov 6ca54ce2ae
qt: Do not extend recent transaction width to address/label string
Github-Pull: bitcoin-core/gui#365
Rebased-From: 9ea1da6fc91e17bdaa722001b97aadf576f07f65
2021-07-11 12:03:12 +03:00
Hennadii Stepanov f220368220
qt: Do not use QClipboard::Selection on Windows and macOS.
Windows and macOS do not support the global mouse selection.

Github-Pull: bitcoin-core/gui#277
Rebased-From: 7f3a5980c1d54988a707b961fd2ef647cebb4c5b
2021-07-11 12:03:11 +03:00
Ross Nicoll c93261586d Ignore unsigned overflow warnings
Ignore unsigned overflow warnings in:

* Scrypt hash calculation as this is an intentional part of how they behave.
* Calculating block subsidy as the Mersenne Twister intentionally expects this behaviour.
2021-07-09 22:06:26 +01:00
Ross Nicoll 2b821751fe Replace HMAC_SHA256 with Bitcoin's version 2021-07-09 22:06:26 +01:00
Ross Nicoll 753193e468 Fix compilation error in fuzz code 2021-07-09 22:06:26 +01:00
Ross Nicoll 9fb45926df Correct signedness of expected data in dogecoin_tests 2021-07-09 22:06:26 +01:00
Ross Nicoll 72bc180795 Cap maximum fee
Cap maximum fee at 21 million Dogecoins to ensure there is no overflow in the fee logic.
2021-07-09 22:06:26 +01:00
Ross Nicoll ac6f78e411 Rewrite subsidy limit tests 2021-07-09 22:06:26 +01:00
fanquake bd2f4164c6
Merge bitcoin/bitcoin#22366: [0.21] fuzz: add missing ECCVerifyHandle to base_encode_decode
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
2021-07-08 11:52:07 +08:00
MarcoFalke 4c29b63cfb
Merge bitcoin/bitcoin#22255: [0.21] wallet: Do not iterate a directory if having an error while accessing it
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: 29c9e2c2d2015ade47ed4497926363dea3f9c59b

  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
2021-07-01 08:35:53 +02:00
MarcoFalke da816247f0
util: Properly handle -noincludeconf on command line
This bug was introduced in commit
fad0867d6ab9430070aa7d60bf7617a6508e0586.

Unit test
Co-Authored-By: Russell Yanofsky <russ@yanofsky.org>

Github-Pull: #22137
Rebased-From: fa910b47656d0e69cccb1f31804f2b11aa45d053
2021-06-30 10:39:33 +08:00
MarcoFalke 513613d8a8
Cleanup -includeconf error message
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: fad0867d6ab9430070aa7d60bf7617a6508e0586
2021-06-30 10:23:54 +08:00
MarcoFalke 70eac6fcd0
Fix crash when parsing command line with -noincludeconf=0
Github-Pull: #22002
Rebased-From: fa9f711c3746ca3962f15224285a453744cd45b3
2021-06-30 10:23:51 +08:00
Andrew Poelstra c5357fa415
fuzz: add missing ECCVerifyHandle to base_encode_decode
GitHub Pull: #22279
Rebased-From: 906d7913117c8f10934b37afa27ae8ac565da042
2021-06-29 11:03:27 +08:00
Hennadii Stepanov 7b0b201d10 wallet: Do not iterate a directory if having an error while accessing it
This change prevents infinite looping for, for example, system folders
on Windows.

Github-Pull: #21907
Rebased-From: 29c9e2c2d2015ade47ed4497926363dea3f9c59b
2021-06-15 19:02:45 +00:00
Ross Nicoll 9f3d27833c
Disable generating BECH32 addresses from the UI 2021-06-12 17:13:41 +01:00
Ross Nicoll 261d38e0fe
Generate legacy addresses by default
Generate legacy addresses instead of SegWit by default.
2021-06-12 16:58:46 +01:00
Ross Nicoll efaf5335fd
Merge pull request #2259 from rnicoll/1.21-node-context
Add node context to wallet RPC request object
2021-06-12 16:35:29 +01:00
Ross Nicoll 803923ca58 Remove separate node and wallet contexts 2021-06-09 08:38:00 +01:00
Ross Nicoll 1de71358f7 Directly include NodeContext instead of defining it
Rather than defining that NodeContext is defined fully elsewhere, actually include node/context.h into src/wallet/context.h for details.
2021-06-09 08:14:36 +01:00
Ross Nicoll 39a231053a Add node context to wallet RPC request object
Add node context to wallet RPC request object, as getauxblock needs access to the node to determine if it is in initial block download, and requires access to the wallet to get an address to pay to.
2021-06-09 08:14:36 +01:00
Ross Nicoll 30142014b7
Change count type used by gettxoutsetinfo
changing CAmount (is a int64_t) to arith_uint256 for nTotalAmount in CCoinsStats to prevent overflow
2021-06-08 18:22:11 +01:00
Ross Nicoll d662bd5011 Switch naming of AuxPoW activation to match BIPxxHeight style
Also removes the AllowLegacyBlocks() function, to be replaced by directly
checking height against the value (as per style used elsewhere).
2021-06-08 08:29:43 +01:00
Ross Nicoll 140871623d
Introduce AuxPoW chain parameters
Introduce AuxPoW chain parameters. These are not yet used, splitting these out to make validation easier.
2021-06-05 23:25:30 +01:00
Patrick Lodder 314ae07dcd
Merge pull request #2238 from rnicoll/1.21-dont-send-alert
Don't send a Bitcoin alert to Dogecoin clients
2021-06-03 18:18:56 +02:00
Ross Nicoll 4288f6cee7
Update src/net_processing.cpp 2021-06-03 16:55:08 +01:00
Patrick Lodder cdc0be5999
Merge pull request #2222 from rnicoll/1.21-italian
minor Italian translation backport
2021-06-03 15:44:09 +02:00
Ross Nicoll 5640cc921d Stop sending a Bitcoin alert to Dogecoin clients 2021-06-03 10:06:21 +01:00
Ross Nicoll f090c41555
Apply suggestions from language review 2021-06-03 09:49:46 +01:00
Ross Nicoll 66d40c059a Remove default Signet 2021-06-02 10:37:16 +01:00
Ross Nicoll 3afaf906f1 Replace consensus values with Dogecoin equivalents
* Replace chain parameters with Dogecoin values
* Update maximum coins to match Dogecoin
* Disable version 2 block requirement
* Update coinbase maturity to match Dogecoin
2021-06-02 10:37:16 +01:00
barrystyle aad77c6e3e crypto: Add scrypt N=1024 PoW
Add scrypt pow hashing algorithm as a proof of work function.
Rebased from litecoin-project/litecoin@02961f0 minus strencodings.h macros.
2021-05-30 22:54:48 +01:00
shaolinfry 202871da44 Litecoin: Add scrypt N=1024 PoW 2021-05-30 22:54:48 +01:00
Ross Nicoll 4fea2ce468
Add Dogecoin block subsidies 2021-05-30 22:12:51 +01:00
Marco 82ec66721f Articols matter in Italian 2021-05-30 17:22:29 +01:00