14540 Commits

Author SHA1 Message Date
chromatic
8d7fbf2fde
Merge pull request #3724 from patricklodder/1.14.9-cmpctblk-fix
1.14.9: change asserts into handled failures for cmpctblk
2024-11-30 11:23:00 -08:00
Patrick Lodder
b5dec96370
bugfix: change asserts into handled failures for cmpctblk
Replaces assert() calls with if() statements returning functional
failure that can be handled for situations that can be triggered
from outside of compiled code - i.e. peers.

Cherry-picked from: 149be06d
Github Pull Request: #3661
2024-11-30 12:45:32 -05:00
chromatic
cebc99a4ec
Merge pull request #3723 from patricklodder/1.14.9-open
Open 1.14.9
2024-11-30 09:38:26 -08:00
Patrick Lodder
18f141450f
open 1.14.9 2024-11-30 09:10:38 -05:00
Old Dip Tracker
6c063e714f
Merge pull request #3615 from chromatic/1.14.8-fixate
Fixate 1.14.8 for release
v1.14.8
2024-08-02 02:23:20 +02:00
Old Dip Tracker
ed4e868154
Merge pull request #3609 from chromatic/1.14.8-initial-release-notes
1.14.8 Release Notes
2024-08-02 01:20:13 +02:00
chromatic
179d508a4f Fixate 1.14.8 release
Tentative release date is August 3, 2024.
2024-08-01 11:59:55 -07:00
Old Dip Tracker
fe3fd430a6
Merge pull request #3612 from chromatic/1.14.8-update-manpages
Update manpages for 1.14.8 release
2024-08-01 15:35:05 +02:00
chromatic
f08f547285 [squashme] Add release note about SECURITY.md 2024-07-31 09:27:02 -07:00
Old Dip Tracker
8f3db60abf
Merge pull request #3611 from chromatic/1.14.8-add-security-policy
doc: add security policy with contacts
2024-07-31 13:50:28 +02:00
chromatic
d94b38c8bf [squashme] Add more missing information 2024-07-30 18:07:54 -07:00
chromatic
cfef2e04c6 Update manpages for 1.14.8 release 2024-07-30 18:02:29 -07:00
chromatic
a6da578185 Add draft release notes for Dogecoin 1.14.8 2024-07-28 20:37:48 -07:00
Patrick Lodder
3157750e78 doc: add security policy with contacts 2024-07-27 21:36:18 -07:00
chromatic
e95dd47443 doc: archive 1.14.7 release notes 2024-07-25 18:53:20 -07:00
chromatic
2599045f43
Merge pull request #3592 from patricklodder/1.14.8-txtracker
1.14.8: Backport TxRequestTracker
2024-07-25 18:46:29 -07:00
chromatic
25136a56f0
Merge pull request #3591 from patricklodder/1.14.8-bugfixes
1.14.8: Backport bugfixes from 1.15.0-dev
2024-07-25 08:28:35 -07:00
Patrick Lodder
6fe3d55694
cleanup: remove limitedmap
Cherry-picked from: 2180b80d
Github Pull Request: #3577
2024-07-23 22:21:10 -04:00
Patrick Lodder
d285fa7e55
qa: extend and harden p2p-tx-download
- Implements getmocktime instead of time.sleep to prevent races
- Enforce success of all mocktime operations
- Do not increment mocktime with 0 seconds
- Use fresh incoming peers for each test
- Explicitly do test teardown
- Remove TXID_RELAY_DELAY as this no longer exists in the dogecoind
  implementation
- Add the inflight throttling test to replace the removed inflight
  limit test
- Add an expiry fallback test

Cherry-picked from: a5a4e4b6
Github Pull Request: #3577
2024-07-23 22:20:29 -04:00
Patrick Lodder
c9d9486c87
policy: reduce MAX_PEER_TX_ANNOUNCEMENTS
Maintaining up to 100000 INVs per peer is excessive. A Dogecoin
Core node will never send more than 7 invs per second.

Original Author: Pieter Wuille <pieter@wuille.net>

Cherry-picked from: 8eb52142
Github Pull Request: #3577
2024-07-23 22:20:12 -04:00
Patrick Lodder
87f0997757
net: use txrequest for transaction request logic
The major changes are:

* Announcements from outbound (and whitelisted) peers are now
  always preferred over those from inbound peers. This used to be
  the case for the first request (by delaying the first request
  from inbound peers), and a bias after. The 2s delay for requests
  from inbound peers still exists, but after that, if viable
  outbound peers remain for any given transaction, they will
  always be tried first.

* No more hard cap of 100 in flight transactions per peer, as
  there is less need for it (memory usage is linear in the number
  of announcements, but independent from the number in flight,
  and CPU usage isn't affected by it). Furthermore, if only one
  peer announces a transaction, and it has over 100 in flight and
  requestable already, we still want to request it from them. The
  cap is replaced with an additional 2s delay (possibly combined
  with the existing 2s delays for inbound connections).

Original Author: Pieter Wuille <pieter@wuille.net>

Cherry-picked from: 3a700cde
Github Pull Request: #3577
2024-07-23 22:19:29 -04:00
Patrick Lodder
fe52860fe4
Add txrequest module
This adds a new module that defines TxRequestTracker, a data
structure that maintains all information about transaction
requests, and coordinates requests.

Original Author: Pieter Wuille <pieter@wuille.net>

Cherry-picked from: 4bc80997
Github Pull Request: #3577

Conflicts:
- Use the 1.14-specific OpenSSL based random context instead of
  FRC in tests.
- Replace InsecureRand*() calls with their GetRand() equivalent
  for > 31 bits and with insecure_rand() for < 31 bits in tests.
2024-07-23 22:11:56 -04:00
Patrick Lodder
dac9e17a9a
add constant contructors for uint256
Cherry-picked from: 4add9776
Github Pull Request: #3577
2024-07-23 22:09:15 -04:00
Patrick Lodder
7d76139fdd
util: add c++14-style MakeUnique for use with c++11
Original author: practicalswift <practicalswift@users.noreply.github.com>

Cherry-picked from: 38c3f678
Github Pull Request: #3577
2024-07-23 22:08:26 -04:00
chromatic
fcfb6e4084
Merge pull request #3590 from patricklodder/1.14.8-depends
1.14.8: update pinned dependencies
2024-07-23 17:52:21 -07:00
chromatic
7da60e9b66
Merge pull request #3589 from patricklodder/1.14.8-build-fixes
1.14.8: allow compiling with c++17
2024-07-23 17:46:09 -07:00
chromatic
47adef1bae
Merge pull request #3586 from patricklodder/1.14.8-test-fixes
1.14.8: backport test fixes
2024-07-22 17:39:12 -07:00
chromatic
1935b98eee
Merge pull request #3588 from patricklodder/1.14.8-fix-boost
1.14.8: enable compiling against newer boost versions
2024-07-22 17:38:59 -07:00
Patrick Lodder
c4e76a3697
validation: avoid masking of difficulty adjustment errors
Currently difficulty adjustment violations are not reported for
chains that branch off before the last checkpoint. Change this
by moving the checkpoint check after the difficulty check.

Original Author: Pieter Wuille <pieter.wuille@gmail.com>

Cherry-picked from: 215fc33d
Github Pull Request: #3576
2024-07-21 17:05:01 -04:00
Pieter Wuille
b961bab134
Interrupt orphan processing after every transaction
This makes orphan processing work like handling getdata messages:
After every actual transaction validation attempt, interrupt
processing to deal with messages arriving from other peers.

Cherry-picked from: 9f2ab9ed
Github Pull Request: #3575
2024-07-21 17:01:27 -04:00
Patrick Lodder
fd72ba4539
p2p: simplify orphan processing
Reduces complexity in processing of orphans when receiving tx
messages over p2p. and isolate the functionality in its own
function ProcessOrphanTx

Original Author: Pieter Wuille <pieter.wuille@gmail.com>

Cherry-picked from: 0e4df473
Github Pull Request: #3575
2024-07-21 17:00:28 -04:00
Patrick Lodder
e9128ec212
p2p: enforce cs_main lock when requesting headers
Cherry-picked from: cedbbeba
Github Pull Request: #3568
2024-07-21 17:00:17 -04:00
Patrick Lodder
6e74282e22
p2p: Only send a getheaders for one block in an INV
Headers-first is the primary method of announcement on the network.
If a node fell back sending blocks by inv, it's probably for a
re-org. The final block hash provided should be the highest, so
send a getheaders and then fetch the blocks we need to catch up.

Original Author: John Newbery <john@johnnewbery.com>

Cherry-picked from: 3e64e6f2
Github Pull Request: #3568
2024-07-21 16:58:05 -04:00
Patrick Lodder
cc8e0c4fc6
cleanup: remove BOOST_FOREACH from timedata.cpp
Cherry-picked from: 846812cd
Github Pull Request: #3567
2024-07-21 16:57:13 -04:00
Pieter Wuille
0cc85e45fb
Avoid the use of abs64 in timedata
Cherry-picked from: f88f9dde
Github Pull Request: #3567
2024-07-21 16:57:02 -04:00
Twinky-kms
966bbb0d00
bump expat to 2.6.2
2.5.0 version of expat has a vulnerability in it and it is
recommended to use 2.6.2 as seen in the file names on the
download page.

Cherry-picked from: 7f089c62
Github Pull Request: #3481
2024-07-21 14:48:23 -04:00
Ed Tubbs
eef734f92a
depends: updated to freetype 2.11.0
Cherry-picked from: 97c64ffd
Github Pull Request: #3362
2024-07-21 14:47:11 -04:00
chromatic
6559eb8dbe
Merge pull request #3585 from patricklodder/1.14.8-open
open 1.14.8
2024-07-21 10:15:39 -07:00
Patrick Lodder
2422a4b4d5
build: allow c++17 standard to be used for compilation
This will allow compiling with the c++17 standard, which on some
distributions (macOS, FreeBSD) is required when using system
dependencies.

The ./configure script will now allow specifying --enable-c++17 to
enable c++17. The default remains c++11, and c++14 also remains
available.

Cherry-picked from: 4196748d
Github Pull Request: #3561
2024-07-21 12:45:32 -04:00
Patrick Lodder
d43f318fda
build: update AX_CXX_COMPILE_STDCXX to serial 18
Downloaded the latest version available from
https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
at the time of writing. This allows configuring for up to c++20.

Cherry-picked from: 6c3a24b2
Github Pull Request: #3494
2024-07-21 12:45:32 -04:00
Patrick Lodder
f865cc1c27
random: use std::shuffle instead of std::random_shuffle
random_shuffle is deprecated since c++11 and removed in c++17. Use
the shuffle function instead, now that we have a standardized
interface available on FastRandomContext.

This enables c++17 compilation

Cherry-picked from: caa79bd1
Github Pull Request: #3560

Conflicts resolved:
- use the 1.14-specific OpenSSL context instead of FRC in:
  src/net_processing.cpp
  src/wallet/wallet.cpp
2024-07-21 12:45:32 -04:00
Patrick Lodder
42e2779c70
1.14-only: OpenSSL randomizer with c++11 interface
Expose the well-tested but slower OpenSSL based legacy random
functions using the c++ standard RNG interface, to avoid
introducing unfinished and potentially unstable randomizer code
from 1.15.0-dev, while enabling the use of std::shuffle.

Replaces Github Pull Request: #3521
2024-07-21 12:45:32 -04:00
Patrick Lodder
aab97f88df
net: make IteratorComparator's operator const
Although this is okay to be sloppy on c++11, it is not okay when
using c++17. See: https://cplusplus.github.io/LWG/issue2542

Cherry-picked from: bcdcf24f
Github Pull Request: #3490
2024-07-21 12:45:32 -04:00
Patrick Lodder
416c09d24c
ci: run experimental CIs with c++14
Cherry-picked from: 9134d9e0
Github Pull Request: #3492
2024-07-21 12:45:31 -04:00
Patrick Lodder
938ae84bd8
build: allow c++14 standard to be used for compilation
This will allow testing the codebase against newer standards and
increase compatibility with newer dependencies.

Cherry-picked from: b99be149
Github Pull Request: #3458
2024-07-21 12:45:31 -04:00
Russell Yanofsky
ad3a9b800c
Add unit test for DEBUG_LOCKORDER code
Cherry-picked from: 11f5dd6e
Github Pull Request: #3313
2024-07-21 12:42:28 -04:00
Patrick Lodder
caefcf1c1c
cleanup: remove unneccesary boost dependencies from sync.cpp
Removes boost dependencies in sync.cpp in favor of standard c++
for-loops, improving readability.

Cherry-picked from: a9129315
Github Pull Request: #3313
2024-07-21 11:53:59 -04:00
Patrick Lodder
447919565b
refactor: remove DEBUG_LOCKORDER undefined behavior
Removes undefined behavior by refactoring the way we destruct
objects that track mutexes when debugging.

1. Prevent UB from LockData custom destructor by making it implicit
2. Replace the thread_specific_ptr holding the lock stack with a
   static map that stores it per thread.

Also cleans up the aliasing to make the code better readable.

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>

Cherry-picked from: 06e40407
Github Pull Request: #3313
2024-07-21 11:52:19 -04:00
Patrick Lodder
1fb943f2ef
add missing <list> include in validation.h
This omission was masked by including boost/unordered_map.hpp prior
to boost 1.85.0.

Cherry-picked from: d021d75f
Github Pull Request: #3558
2024-07-21 11:13:45 -04:00
Patrick Lodder
aa568d45d3
fs: for boost 1.74 and up, use c++17 compatible copy_options
In boost 1.74.0, boost::filesystem adapted path::copy_option enum
to be the same as the enum in the fs::path from c++17, which is
now called copy_options, and its member "overwrite_if_exists"
is now called "overwrite_existing". In boost 1.85, the deprecated
copy_option enum is fully removed.

Because Dogecoin Core currently supports boost 1.60 and up,
conditionally implement the new enum based on the boost version
that is built against.

Cherry-picked from: 95554c3e
Github Pull Request: #3558

Conflicts resolved:
  - boost fs prefix added in src/wallet/wallet.cpp
2024-07-21 11:12:07 -04:00