305 Commits

Author SHA1 Message Date
Patrick Lodder
a949e0505e
build: remove additional "ok" in configure 2026-01-19 11:14:20 -05:00
Patrick Lodder
07b45cad8e
build: remove check for boost < 1.49 2026-01-19 11:14:18 -05:00
Patrick Lodder
2ec6a4833d
build: do not link boost_system if boost >= 1.69.0 2025-10-26 10:47:51 -04:00
Old Dip Tracker
293a476151
Merge pull request #3795 from chromatic/chromatic/enable-null-warnings
Add configure option to warn on NULL/0 usage
2025-03-25 16:50:57 +01:00
chromatic
da223ce563 Add configure option to warn on NULL/0 usage
This will help us migrate from checking for NULL to checking for NULLPTR.
Enable this at configuration time with:

    ./configure --enable-null-warnings
2025-03-01 09:54:51 -08:00
Patrick Lodder
22ce2b2f9f
build: remove protobuf requirement
Protobuf was only needed for BIP70 payment requests
2025-02-24 15:17:53 -05:00
Patrick Lodder
a8c94c18df
update version info to 1.14.99 for master
the .99 makes sure that code in master is never mistaken for
release code, and is always a higher version than the last minor
release

Also set the last release date to match 1.14.8 instead of 1.14.7
2024-08-08 20:37:34 -04:00
Patrick Lodder
4196748d27
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.
2024-06-23 17:51:52 -04:00
xanimo
d693d4a008
random: getentropy on macOS does not need unistd.h
change sys/random.h to random.h in AC_MSG_CHECK
remove definitions that are applicable to macos which include unistd.h
additionally change comparator argument from NULL to nullptr when evaluating &getentropy

Inspired by: c13c97dbf846cf0e6a5581ac414ef96a215b0dc6
2024-06-13 11:44:33 -07:00
James Hilliard
743c3acd3d
Check if sys/random.h is required for getentropy on OSX.
Cherry-picked from: ee2d10ad0c0e04d0b9da4535a6fff265ac2501e5
2024-06-13 11:42:50 -07:00
Pieter Wuille
3f511675be
Add a FastRandomContext::randrange and use it
Cherry-picked from: 4fd2d2fc97e21efceab849576e544160fd5e3e3d
2024-06-13 11:42:46 -07:00
Wladimir J. van der Laan
f75d5ea728
util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD
These are available in sandboxes without access to files or
devices. Also [they are safer and more straightforward](https://en.wikipedia.org/wiki/Entropy-supplying_system_calls)
to use than `/dev/urandom` as reading from a file has quite a few edge
cases:

- Linux: `getrandom(buf, buflen, 0)`. [getrandom(2)](http://man7.org/linux/man-pages/man2/getrandom.2.html)
  was introduced in version 3.17 of the Linux kernel.
- OpenBSD: `getentropy(buf, buflen)`. The [getentropy(2)](http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2)
  function appeared in OpenBSD 5.6.
- FreeBSD and NetBSD: `sysctl(KERN_ARND)`. Not sure when this was added
  but it has existed for quite a while.

Alternatives:

- Linux has sysctl `CTL_KERN` / `KERN_RANDOM` / `RANDOM_UUID`
  which gives 16 bytes of randomness. This may be available
  on older kernels, however [sysctl is deprecated on Linux](https://lwn.net/Articles/605392/)
  and even removed in some distros so we shouldn't use it.

Add tests for `GetOSRand()`:

- Test that no error happens (otherwise `RandFailure()` which aborts)
- Test that all 32 bytes are overwritten (initialize with zeros, try multiple times)

Discussion:

- When to use these? Currently they are always used when available.
  Another option would be to use them only when `/dev/urandom` is not
  available. But this would mean these code paths receive less testing,
  and I'm not sure there is any reason to prefer `/dev/urandom`.

Closes: #9676

Cherry-picked from: 224e6eb089a0f4977d22f3803fc27e44b5e7eea5

Contains squashed commit of aa09ccbb74ea9febd83ce3362238ac5339069909 squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightly
2024-06-13 11:42:45 -07:00
chromatic
bab1bfc398
Merge pull request #3458 from patricklodder/1.15.0-choose-std
build: allow c++14 standard to be used for compilation
2024-03-03 18:56:41 -08:00
Patrick Lodder
b99be14963
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.
2024-02-29 10:43:32 -05:00
Patrick Lodder
fc01ebd202
open 1.15.0 for development 2024-02-28 14:04:25 -05:00
Patrick Lodder
2fd8d58ad5
fixate 1.14.7 for release 2024-02-27 11:13:31 -05:00
chromatic
94f5ef4a43
Merge pull request #3214 from patricklodder/1.14.7-fix-avx2-qt-dep
build: constrain -lQt5PlatformSupport check as AVX2 dependency
2023-11-27 17:16:34 -08:00
Patrick Lodder
b09aa70cd8
build: fix bdb detection through brew
Fixes the detection of bdb on brew enabled systems by using
dogecoin_find_bdb53.m4 parametrization and checking if the
brew-located files actually work.

Searches brew installed packages in the order: 5.x, 4.x, default.

The reason for this order is that 4.x is still fully readable by
5.3.27NC that is distributed by default, and therefore prefered
over newer-than 5.x versions.
2023-08-30 19:33:15 -04:00
Patrick Lodder
4fe6972938
build: constrain -lQt5PlatformSupport check as AVX2 dependency
This allows windows binaries to be built with AVX2 but without gui
2023-06-28 17:38:18 -04:00
Patrick Lodder
e1c688dfd2
compat: link librt even if it is not needed on build host
glibc absorbed clock_gettime in 2.17. To retain backward
compatibility with systems that package glibc < 2.17, we need to
include it anyway. Until gcc-7, librt still got included with all
relevant symbols, so there was no issue and we could just use
that instead of gcc-native clock_gettime.

Since gcc-9, we need to explicitly add lrt outside the scope of
"as-needed" packages, because ld finds no reason to add a
DT_NEEDED tag for it, despite our inclusion, as the function
gets pulled from libc.so.6. Therefore, we:

1. disable "as-needed"
2. add librt
3. re-enable "as-needed" again

This way, we both force include librt, but still not link any
other unneeded libraries.

Because this is only valid for backward compatible binaries where
our build system is newer than the oldest supported OS (i.e. when
cross-compiling, running CI or gitian built releases) the -lrt flag
is now part of COMPAT_LDFLAGS instead of global "LIBS" when
configuring with --with-glibc-back-compat.

This explicit link can be removed when we drop support for glibc
versions < 2.17 (i.e. in the next major version)
2023-06-22 09:23:00 -04:00
Dakoda Greaves
4657f98839
compat: wrap fcntl and fcntl64 for 32-bit linux
On 32-bit platforms, glibc wraps fcntl to 64-bit address space
fcntl64, for reading files > 2GB. Since we don't open any files
of that size, we do not need this and can safely wrap to the old
32-bit fcntl.

Co-authored-by: Patrick Lodder <patricklodder@users.noreply.github.com>
2023-05-05 17:54:56 +02:00
Patrick Lodder
99cbe5129a
compat: wrap clock_gettime
wraps librt clock_gettime for backward compatibility with glibc
versions < 2.17.
2023-05-05 17:54:56 +02:00
Dakoda Greaves
87b1dc9300
compat: add interface overrides for libm
wraps pow.3 exp.3 and log.3 to explicitly use backward compatible
glibc symbols. this is needed to stay compatible with old linux
versions with minor releases
2023-05-05 17:54:56 +02:00
Patrick Lodder
167ca801ef
build: clean up security and symbol checks from makefile
Fixes calls to make check-security and make check-symbols
to have better integration with the CI and Gitian

The condition in the check-symbols target requiring the configure
flag --enable-glibc-back-compat is removed because that is
exclusive to Linux. By removing it, we enable the check for all
binaries, including those built for Windows and macOs.

Finally, removes configure.ac lines for readelf and cppfilt. Those
are no longer needed because lief is used in their stead.

squash into:
  build: clean up security and symbol checks from makefile
2023-01-22 03:55:02 +01:00
chromatic
0ddbfd7974 Add release date and duration constants
These constants, when defined at the point of each new release, give us
the ability to detect when a running node may be out of date with
respect to an expected upcoming release.

This is the starting point for adding out-of-date notifications to the
daemon, CLI tool, and Qt binary.
2023-01-07 11:32:29 -08:00
Patrick Lodder
5446a74f08
build: explicitly enable experimental functions
Introduces a configure flag --enable-experimental that controls at
configure time whether or not experimental features can be
enabled. This serves as a circuit breaker to both make sure that
CI jobs are configured properly, and ensures manual compilations
are intentionally configuring experimental / non-production code.

Additionally, experimental features get listed in the summary after
configuration completes if enabled.

Further work can insert compile time checks with static_asserts
against the ALLOW_DOGECOIN_EXPERIMENTAL macro.
2022-10-30 13:20:25 +01:00
Patrick Lodder
c5c0c3ecee
Revert "crypto: added runtime checks for SHA hardware"
This reverts commit e78cfc630dbb712662328eb6c8b401bd3fab8969.

Besides adding runtime checks, this also removes experimental
guards and makes the features leak into release code as we have
no way of disabling them.

Additionally, this breaks on non-gnu systems which currently have
no released binaries, like arm-apple-darwin20 (Apple silicon macs)
2022-10-14 09:26:33 +02:00
Ed Tubbs
e78cfc630d crypto: added runtime checks for SHA hardware 2022-08-07 23:03:10 -05:00
Ed
8cff29b8db
Merge branch '1.14.7-dev' into 1.14.7-dev 2022-07-28 20:16:08 -05:00
Ed Tubbs
7a5358c77b depends: Updated intel-ipsec-mb to 1.2
config: Updated intel-ipsec-mb checks for Win64
ci: Added build with intel-ipsec-mb for Win64
src: Updated intel-ipsec-mb guard for Win64 in SHAs
2022-07-28 20:13:57 -05:00
chromatic
4f00f033f7
Merge pull request #2773 from patricklodder/1.14.6-fix-scrypt-sse2
Fix and enable scrypt sse2 integration
2022-07-26 11:43:04 -07:00
Patrick Lodder
79aa24389f
build: configure scrypt-sse2 through autoconf
- Add --enable/disable-scrypt-sse2 configuration flag
- use bitcoin-config.h instead of CPPFLAGS, like all other
  features
- make the scrypt.h header guard to be similar to everything else
2022-07-21 06:52:47 +02:00
Patrick Lodder
324fe600cf
open 1.14.7-dev for development 2022-07-21 03:38:25 +02:00
Patrick Lodder
43fbdfa9b8
fixate v1.14.6 2022-07-16 23:32:52 +02:00
Ed Tubbs
7f4f3450e1 Added declaration check for vsha512su0q_u64 2022-04-29 05:30:10 +00:00
Michi Lumin
7019ead6a1
Merge pull request #2687 from edtubbs/1.14.6-dev
[feat] Added ARMv8 SHA support
2021-12-11 13:07:22 -07:00
Ed Tubbs
be9df91a4d Updated ARMv8 intrinsics for SHA-512
Updated cross build for ci environment
Updated experimental build to focal
Unified cross and native ARMv8.2 build options
Updated experimental build in ci
2021-12-08 19:24:49 -06:00
sinetek
fd5798d431 doge: we don't support android, so drop autoconf target. 2021-11-29 18:58:59 +01:00
Wladimir J. van der Laan
87946deb94 build: Update build system for new leveldb
Upstream leveldb switched build systems, which means we need to define
a few different values.
2021-11-29 18:35:38 +01:00
Ed Tubbs
54d5954761 Added cross and native variables for experimental build
Updated ci
2021-11-17 22:55:59 +00:00
Ed Tubbs
3a7fef10ca Added ARMv8.2 intrinsics for SHA-512
Added build parameter for ARMv8.2
Added experimental ci build
Updated comments
2021-11-17 22:55:59 +00:00
Patrick Lodder
bd865b061d
build: remove outdated boost checks now that we require 1_60+ 2021-11-11 10:13:19 -05:00
Patrick Lodder
a2587deb83
build: fix minimum boost version for autoconf: 1_60_0 2021-11-10 19:33:44 -05:00
Ed Tubbs
2767f3e8a5 Added --with-armv8-crypto to configure.ac
Added ARMv8 SHA1 and SHA256 intrinsics
2021-11-08 23:08:39 -06:00
Ross Nicoll
3b1376906d
Merge pull request #2680 from patricklodder/1.14.6-cfgac-format
trivial: fix spacing issues in configure.ac
2021-11-08 19:21:43 +00:00
Patrick Lodder
b0edf35ab0
trivial: fix spacing issues in configure.ac 2021-11-08 09:07:27 -05:00
Patrick Lodder
9a237032dd
open 1.14.6 for development 2021-11-08 08:22:02 -05:00
Patrick Lodder
e92aba9190
fixate 1.14.5 2021-11-04 16:54:55 -04:00
Patrick Lodder
8e4ea27962
Merge pull request #2491 from edtubbs/master
[feat] Added AVX2 SHA support
2021-11-01 18:47:05 -04:00
Patrick Lodder
7dae118b0a build: experimental ci build with AVX2 2021-10-03 00:55:55 -05:00