From bf41c3cb1f366615116e3e2663f5fce433fe678f Mon Sep 17 00:00:00 2001 From: DigiSwarm <13957390+JaredTate@users.noreply.github.com> Date: Thu, 23 Jul 2026 15:18:49 -0600 Subject: [PATCH 01/59] version: bump to v9.26.6 and update wallet image --- configure.ac | 2 +- src/qt/res/icons/digibyte_wallet.png | Bin 18747 -> 18606 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2632ff681d3..5aab6de54d8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 9) define(_CLIENT_VERSION_MINOR, 26) -define(_CLIENT_VERSION_BUILD, 5) +define(_CLIENT_VERSION_BUILD, 6) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_SUFFIX, []) define(_CLIENT_VERSION_IS_RELEASE, true) diff --git a/src/qt/res/icons/digibyte_wallet.png b/src/qt/res/icons/digibyte_wallet.png index e26e14db464eab5325110451328e13509fb175d4..98947dadb280f485630f8c3a074bb164fcee1ee8 100644 GIT binary patch literal 18606 zcmb??WkZ|K(>3ny?gS`S9Ev*>YoWNi1b26LE3U;#aSQGgDems>!5!}W{?Au<-XzzH zWOsIEcCOj8=R|!|mPJP)L4ksTLYJ45QiXzoHiSI?K|+9hqU0*(LqW;8$xDg<@XR^S z_3-_n{@jw!#dQpaxB8j6suAv5o8=!?f_`s)+27) z>ksM{Y&olweXUTb&y-5EEzHqA+|=_oW8PbBQd_Pjp;d zBGA;?-U29LJ4;iqp_g+d#078IBlFxtchU*!a!+{roEye%Q(4{|C}A{h+?3nA*4CC} z69IuOh2`lp1C;}SOCyep00lsGQ~EQ>(62>POn#nVX+X5{3MARwUa#qtSFYHXq1}_VqkunvpPP zE36$Et<~k4zrHb6ZZDyVtjBEY7hH1Ww?kK9{J{vmVVqkCY#_;L+Ny*u4-&>8<1k8? z4V--a)`puh`!=8es0VJyxB~Q%W$*iXaenhdsUzNg zBv8N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p>aK5ke?CEb#S}a;&>)K!O_y@lXyhdJGhSv;-$j{hHUfK8PH-US|EBggqAm`yZ!1_Mm9MBWE3H@-W zDf?aHghE&H%KD?*jIY9TFj$T53Ky9CjQ!-5Ee1|Q-zhwd?xQ;b-HZ|m=IhDNs3ouL zzv%COIC*7L(S_r1JU09l(RJxWbPtF( znzXtVD0cmO8;{_96Mtbh0sRL$j=ZvT^2*LaKkaX1Jg}XgfG!|G_jV|9%^Qa}mgu^Va$Dfg( z(bO-q2Hhl3k1j+$1+F1K<3{o`npWL-)z$t3@-r&%ga@0GpRoo#g!UEJJoV^5@_zv5 zlAqCNH*Goxp(A* z_wWJw0aqEiO?C~sXF!pwMI^Ro^Y!Fs>_T_zdLBIoL_PXJ=-cQ4E1}xuy~nIaKal+f z-Mq9P_z>M|Lw7qnjBfYcgnsZh z)GJAjLZMJ76bgkxp-?Ck3WY+UP$(1%g+ifFC=?2XLZMJ76bgkxp-?Ck3WY*(?DGEs X+9QO(MxNll00000NkvXXu0mjf(dX(L From 15b5ebcd8ea8a81300e532296471bddb2d242332 Mon Sep 17 00:00:00 2001 From: Shen Date: Sat, 1 Aug 2026 02:26:19 +0200 Subject: [PATCH 02/59] build: improve MSVC and static Qt support --- build_msvc/README.md | 21 +- build_msvc/common.init.vcxproj | 23 +- build_msvc/common.init.vcxproj.in | 4 +- build_msvc/common.qt.init.vcxproj | 4 +- .../digibyte-wallet/digibyte-wallet.vcxproj | 6 + build_msvc/digibyte_config.h | 206 +----------------- build_msvc/digibyte_config.h.in | 3 + .../libdigibyte_consensus.vcxproj | 108 +++++++-- .../libdigibyte_consensus.vcxproj.in | 16 ++ .../libdigibyte_qt/libdigibyte_qt.vcxproj | 24 ++ build_msvc/libsecp256k1/libsecp256k1.vcxproj | 4 +- .../libsecp256k1/libsecp256k1.vcxproj.in | 26 +++ build_msvc/msvc-autogen.py | 136 ++++++++++++ .../test_digibyte-qt/test_digibyte-qt.vcxproj | 6 + .../test_digibyte/test_digibyte.vcxproj | 5 + build_msvc/vcpkg.json | 12 + configure.ac | 2 +- depends/packages/qt.mk | 2 + .../qt/zlib-prefix-crc32-combine.patch | 24 ++ src/compressor.cpp | 16 +- src/consensus/dca.cpp | 23 +- src/consensus/err.cpp | 11 +- src/consensus/volatility.cpp | 29 +-- src/crypto/luffa.cpp | 4 +- src/digidollar/health.cpp | 19 +- src/oracle/exchange.cpp | 33 ++- src/oracle/exchange.h | 1 + src/oracle/node.cpp | 17 ++ src/util/int128.h | 25 +++ 29 files changed, 519 insertions(+), 291 deletions(-) create mode 100644 build_msvc/libdigibyte_consensus/libdigibyte_consensus.vcxproj.in create mode 100644 build_msvc/libsecp256k1/libsecp256k1.vcxproj.in create mode 100644 depends/patches/qt/zlib-prefix-crc32-combine.patch create mode 100644 src/util/int128.h diff --git a/build_msvc/README.md b/build_msvc/README.md index 93ed64f0fe4..5e6793a9dac 100644 --- a/build_msvc/README.md +++ b/build_msvc/README.md @@ -34,7 +34,22 @@ To build DigiByte Core with the GUI, a static build of Qt is required. 1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.10.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`. -2. Open "x64 Native Tools Command Prompt for VS 2022", and input the following commands: +2. Qt 5.15.10's bundled zlib needs the repository's `Z_PREFIX` backport so it +can be linked together with the zlib used by vcpkg's static libcurl. Apply the +patch from the root of the extracted Qt source tree (the directory containing +`qtbase`). Replace `C:\dev\digibyte` with the path to this repository: + +```cmd +cd C:\dev\qt-source +git apply --check C:\dev\digibyte\depends\patches\qt\zlib-prefix-crc32-combine.patch +git apply C:\dev\digibyte\depends\patches\qt\zlib-prefix-crc32-combine.patch +``` + +The patch gives Qt's three `crc32_combine_*` helpers the same private zlib +prefix as its other bundled zlib symbols. Do not replace it with +`/FORCE:MULTIPLE` or by omitting vcpkg's `zlib.lib`. + +3. Open "x64 Native Tools Command Prompt for VS 2022", and input the following commands: ```cmd cd C:\dev\qt-source mkdir build @@ -44,6 +59,10 @@ nmake nmake install ``` +For an existing configured Qt 5.15.10 build, apply the patch to its source tree +and rerun `nmake` followed by `nmake install` in the existing build directory. +Reconfiguration is not required. + One could speed up building with [`jom`](https://wiki.qt.io/Jom), a replacement for `nmake` which makes use of all CPU cores. To build DigiByte Core without Qt, unload or disable the `digibyte-qt`, `libdigibyte_qt` and `test_digibyte-qt` projects. diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj index 6ea018d8463..1f8fbe3fad8 100644 --- a/build_msvc/common.init.vcxproj +++ b/build_msvc/common.init.vcxproj @@ -14,7 +14,6 @@ true true $(Configuration) - x86-windows-static x64-windows-static @@ -35,20 +34,12 @@ Debug x64 - - Release - Win32 - - - Debug - Win32 - false false - v142 + v143 Unicode No $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ @@ -58,7 +49,7 @@ true true - v142 + v143 Unicode $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ $(Platform)\$(Configuration)\$(ProjectName)\ @@ -96,15 +87,15 @@ Level3 NotUsing - /utf-8 /Zc:__cplusplus /std:c++17 %(AdditionalOptions) - 4018;4244;4267;4334;4715;4805;4834 + /utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions) + 4018;4244;4267;4715;4805 true - _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) - ..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories) + _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;ZMQ_STATIC;CURL_STATICLIB;HAVE_LIBCURL;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + ..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories) Console - Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;bcrypt.lib;crypt32.lib;secur32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) true diff --git a/build_msvc/common.init.vcxproj.in b/build_msvc/common.init.vcxproj.in index 9cce546268e..ad0c06178fe 100644 --- a/build_msvc/common.init.vcxproj.in +++ b/build_msvc/common.init.vcxproj.in @@ -90,12 +90,12 @@ /utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions) 4018;4244;4267;4715;4805 true - _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;ZMQ_STATIC;CURL_STATICLIB;HAVE_LIBCURL;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) ..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories) Console - Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;bcrypt.lib;crypt32.lib;secur32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) true diff --git a/build_msvc/common.qt.init.vcxproj b/build_msvc/common.qt.init.vcxproj index cc8063e545b..78f54284f48 100644 --- a/build_msvc/common.qt.init.vcxproj +++ b/build_msvc/common.qt.init.vcxproj @@ -9,8 +9,8 @@ $(QtIncludeDir);$(QtIncludeDir)\QtNetwork;$(QtIncludeDir)\QtCore;$(QtIncludeDir)\QtWidgets;$(QtIncludeDir)\QtGui; .\QtGeneratedFiles\qt $(QtBaseDir)\bin - $(QtPluginsLibraryDir)\platforms\qminimal.lib;$(QtPluginsLibraryDir)\platforms\qwindows.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyle.lib;$(QtLibraryDir)\Qt5WindowsUIAutomationSupport.lib;$(QtLibraryDir)\qtfreetype.lib;$(QtLibraryDir)\qtharfbuzz.lib;$(QtLibraryDir)\qtlibpng.lib;$(QtLibraryDir)\qtpcre2.lib;$(QtLibraryDir)\Qt5AccessibilitySupport.lib;$(QtLibraryDir)\Qt5Core.lib;$(QtLibraryDir)\Qt5Concurrent.lib;$(QtLibraryDir)\Qt5EventDispatcherSupport.lib;$(QtLibraryDir)\Qt5FontDatabaseSupport.lib;$(QtLibraryDir)\Qt5Gui.lib;$(QtLibraryDir)\Qt5Network.lib;$(QtLibraryDir)\Qt5PlatformCompositorSupport.lib;$(QtLibraryDir)\Qt5ThemeSupport.lib;$(QtLibraryDir)\Qt5Widgets.lib;$(QtLibraryDir)\Qt5WinExtras.lib;$(QtLibraryDir)\qtmain.lib;Wtsapi32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib - $(QtPluginsLibraryDir)\platforms\qwindowsd.lib;$(QtPluginsLibraryDir)\platforms\qminimald.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyled.lib;$(QtLibraryDir)\*d.lib;Wtsapi32.lib;crypt32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib + $(QtPluginsLibraryDir)\platforms\qminimal.lib;$(QtPluginsLibraryDir)\platforms\qwindows.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyle.lib;$(QtLibraryDir)\Qt5WindowsUIAutomationSupport.lib;$(QtLibraryDir)\qtfreetype.lib;$(QtLibraryDir)\qtharfbuzz.lib;$(QtLibraryDir)\qtlibpng.lib;$(QtLibraryDir)\qtpcre2.lib;$(QtLibraryDir)\Qt5AccessibilitySupport.lib;$(QtLibraryDir)\Qt5Core.lib;$(QtLibraryDir)\Qt5Concurrent.lib;$(QtLibraryDir)\Qt5EventDispatcherSupport.lib;$(QtLibraryDir)\Qt5FontDatabaseSupport.lib;$(QtLibraryDir)\Qt5Gui.lib;$(QtLibraryDir)\Qt5Network.lib;$(QtLibraryDir)\Qt5PlatformCompositorSupport.lib;$(QtLibraryDir)\Qt5ThemeSupport.lib;$(QtLibraryDir)\Qt5Widgets.lib;$(QtLibraryDir)\Qt5WinExtras.lib;$(QtLibraryDir)\qtmain.lib;qrencode.lib;Wtsapi32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib + $(QtPluginsLibraryDir)\platforms\qwindowsd.lib;$(QtPluginsLibraryDir)\platforms\qminimald.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyled.lib;$(QtLibraryDir)\*d.lib;qrencoded.lib;Wtsapi32.lib;crypt32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib diff --git a/build_msvc/digibyte-wallet/digibyte-wallet.vcxproj b/build_msvc/digibyte-wallet/digibyte-wallet.vcxproj index 39329ac1af3..1d1a1ab30e1 100644 --- a/build_msvc/digibyte-wallet/digibyte-wallet.vcxproj +++ b/build_msvc/digibyte-wallet/digibyte-wallet.vcxproj @@ -24,6 +24,9 @@ {6190199c-6cf4-4dad-bfbd-93fa72a760c1} + + {460fee33-1fe1-483f-b3bf-931ff8e969a5} + {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} @@ -39,6 +42,9 @@ {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} + + {18430fef-6b61-4c53-b396-718e02850f1b} + diff --git a/build_msvc/digibyte_config.h b/build_msvc/digibyte_config.h index 3ddbc969cf7..fe8856e22dd 100644 --- a/build_msvc/digibyte_config.h +++ b/build_msvc/digibyte_config.h @@ -5,20 +5,17 @@ #ifndef DIGIBYTE_DIGIBYTE_CONFIG_H #define DIGIBYTE_DIGIBYTE_CONFIG_H -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - /* Version Build */ -#define CLIENT_VERSION_BUILD 0 +#define CLIENT_VERSION_BUILD 5 /* Version is release */ #define CLIENT_VERSION_IS_RELEASE true /* Major version */ -#define CLIENT_VERSION_MAJOR 22 +#define CLIENT_VERSION_MAJOR 9 /* Minor version */ -#define CLIENT_VERSION_MINOR 0 +#define CLIENT_VERSION_MINOR 26 /* Copyright holder(s) before %s replacement */ #define COPYRIGHT_HOLDERS "The %s developers" @@ -41,33 +38,12 @@ /* Define to 1 to enable SQLite wallet */ #define USE_SQLITE 1 -/* Define to 1 to enable ZMQ functions */ +/* Define this symbol to enable ZMQ functions */ #define ENABLE_ZMQ 1 -/* define if the Boost library is available */ -#define HAVE_BOOST /**/ - -/* define if the Boost::Filesystem library is available */ -#define HAVE_BOOST_FILESYSTEM /**/ - /* define if external signer support is enabled (requires Boost::Process) */ #define ENABLE_EXTERNAL_SIGNER /**/ -/* define if the Boost::System library is available */ -#define HAVE_BOOST_SYSTEM /**/ - -/* define if the Boost::Unit_Test_Framework library is available */ -#define HAVE_BOOST_UNIT_TEST_FRAMEWORK /**/ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BYTESWAP_H */ - -/* Define this symbol if the consensus lib has been built */ -#define HAVE_CONSENSUS_LIB 1 - -/* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 - /* Define to 1 if you have the declaration of `be16toh', and to 0 if you don't. */ #define HAVE_DECL_BE16TOH 0 @@ -136,141 +112,23 @@ */ #define HAVE_DECL_SETSID 0 -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ENDIAN_H */ - -/* Define to 1 if the system has the `dllexport' function attribute */ -#define HAVE_FUNC_ATTRIBUTE_DLLEXPORT 1 - -/* Define to 1 if the system has the `dllimport' function attribute */ -#define HAVE_FUNC_ATTRIBUTE_DLLIMPORT 1 - -/* Define to 1 if the system has the `visibility' function attribute */ -#define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1 - -/* Define this symbol if the BSD getentropy system call is available */ -/* #undef HAVE_GETENTROPY */ - -/* Define this symbol if the BSD getentropy system call is available with - sys/random.h */ -/* #undef HAVE_GETENTROPY_RAND */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define this symbol if you have malloc_info */ -/* #undef HAVE_MALLOC_INFO */ - -/* Define this symbol if you have mallopt with M_ARENA_MAX */ -/* #undef HAVE_MALLOPT_ARENA_MAX */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MINIUPNPC_MINIUPNPC_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MINIUPNPC_UPNPCOMMANDS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MINIUPNPC_UPNPERRORS_H 1 - -/* Define this symbol if you have MSG_DONTWAIT */ -/* #undef HAVE_MSG_DONTWAIT */ - -/* Define this symbol if you have MSG_NOSIGNAL */ -/* #undef HAVE_MSG_NOSIGNAL */ - -/* Define if you have POSIX threads libraries and header files. */ -//#define HAVE_PTHREAD 1 - -/* Have PTHREAD_PRIO_INHERIT. */ -//#define HAVE_PTHREAD_PRIO_INHERIT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define this symbol if the BSD sysctl(KERN_ARND) is available */ -/* #undef HAVE_SYSCTL_ARND */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ENDIAN_H */ - -/* Define this symbol if the Linux getrandom system call is available */ -/* #undef HAVE_SYS_GETRANDOM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PRCTL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_UNISTD_H 1 - -/* Define if the visibility attribute is supported. */ -#define HAVE_VISIBILITY_ATTRIBUTE 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" +/* Define if the dllexport attribute is supported. */ +#define HAVE_DLLEXPORT_ATTRIBUTE 1 /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://github.com/DigiByte-Core/digibyte/issues" +#define PACKAGE_BUGREPORT "https://github.com/digibyte/digibyte/issues" /* Define to the full name of this package. */ #define PACKAGE_NAME "DigiByte Core" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "DigiByte Core 22.0.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "digibyte" +#define PACKAGE_STRING "DigiByte Core 9.26.5" /* Define to the home page for this package. */ -#define PACKAGE_URL "https://digibyte.org/" +#define PACKAGE_URL "https://digibytecore.org/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "22.0.0" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -/* #undef PTHREAD_CREATE_JOINABLE */ - -/* Define this symbol if the qt platform is cocoa */ -/* #undef QT_QPA_PLATFORM_COCOA */ +#define PACKAGE_VERSION "9.26.5" /* Define this symbol if the minimal qt platform exists */ #define QT_QPA_PLATFORM_MINIMAL 1 @@ -278,53 +136,11 @@ /* Define this symbol if the qt platform is windows */ #define QT_QPA_PLATFORM_WINDOWS 1 -/* Define this symbol if the qt platform is xcb */ -/* #undef QT_QPA_PLATFORM_XCB */ - /* Define this symbol if qt plugins are static */ #define QT_STATICPLUGIN 1 -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define this symbol to build in assembly routines */ -//#define USE_ASM 1 - -/* Define if dbus support should be compiled in */ -/* #undef USE_DBUS */ - /* Define if QR support should be compiled in */ -//#define USE_QRCODE 1 - -/* UPnP support not compiled if undefined, otherwise value (0 or 1) determines - default state */ -//#define USE_UPNP 0 - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ +#define USE_QRCODE 1 /* Windows Universal Platform constraints */ #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) diff --git a/build_msvc/digibyte_config.h.in b/build_msvc/digibyte_config.h.in index 62894b15500..8723381627b 100644 --- a/build_msvc/digibyte_config.h.in +++ b/build_msvc/digibyte_config.h.in @@ -139,6 +139,9 @@ /* Define this symbol if qt plugins are static */ #define QT_STATICPLUGIN 1 +/* Define if QR support should be compiled in */ +#define USE_QRCODE 1 + /* Windows Universal Platform constraints */ #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) /* Either a desktop application without API restrictions, or and older system diff --git a/build_msvc/libdigibyte_consensus/libdigibyte_consensus.vcxproj b/build_msvc/libdigibyte_consensus/libdigibyte_consensus.vcxproj index 1c52e4c4357..aa0c8d404bd 100644 --- a/build_msvc/libdigibyte_consensus/libdigibyte_consensus.vcxproj +++ b/build_msvc/libdigibyte_consensus/libdigibyte_consensus.vcxproj @@ -8,21 +8,101 @@ StaticLibrary - - - - - - - - - - - - - + + $(IntDir)arith_uint256.obj + + + $(IntDir)consensus_digidollar.obj + + + $(IntDir)consensus_digidollar_transaction_validation.obj + + + $(IntDir)consensus_digidollar_tx.obj + + + $(IntDir)consensus_merkle.obj + + + $(IntDir)consensus_tx_check.obj + + + $(IntDir)crypto_blake.obj + + + $(IntDir)crypto_bmw.obj + + + $(IntDir)crypto_cubehash.obj + + + $(IntDir)crypto_echo.obj + + + $(IntDir)crypto_groestl.obj + + + $(IntDir)crypto_jh.obj + + + $(IntDir)crypto_keccak.obj + + + $(IntDir)crypto_luffa.obj + + + $(IntDir)crypto_shavite.obj + + + $(IntDir)crypto_simd.obj + + + $(IntDir)crypto_skein.obj + + + $(IntDir)crypto_odocrypt.obj + + + $(IntDir)crypto_KeccakP-800-reference.obj + + + $(IntDir)crypto_scrypt.obj + + + $(IntDir)crypto_scrypt-sse2.obj + + + $(IntDir)hash.obj + + + $(IntDir)primitives_block.obj + + + $(IntDir)primitives_transaction.obj + + + $(IntDir)pubkey.obj + + + $(IntDir)script_digibyteconsensus.obj + + + $(IntDir)script_interpreter.obj + + + $(IntDir)script_script.obj + + + $(IntDir)script_script_error.obj + + + $(IntDir)uint256.obj + + + $(IntDir)util_strencodings.obj + - \ No newline at end of file + diff --git a/build_msvc/libdigibyte_consensus/libdigibyte_consensus.vcxproj.in b/build_msvc/libdigibyte_consensus/libdigibyte_consensus.vcxproj.in new file mode 100644 index 00000000000..af330723d72 --- /dev/null +++ b/build_msvc/libdigibyte_consensus/libdigibyte_consensus.vcxproj.in @@ -0,0 +1,16 @@ + + + + + {2B384FA8-9EE1-4544-93CB-0D733C25E8CE} + + + StaticLibrary + + +@SOURCE_FILES@ + + + + + diff --git a/build_msvc/libdigibyte_qt/libdigibyte_qt.vcxproj b/build_msvc/libdigibyte_qt/libdigibyte_qt.vcxproj index e0b6980ec4e..8560ec3a301 100644 --- a/build_msvc/libdigibyte_qt/libdigibyte_qt.vcxproj +++ b/build_msvc/libdigibyte_qt/libdigibyte_qt.vcxproj @@ -64,6 +64,17 @@ + + + + + + + + + + + @@ -120,6 +131,19 @@ + + + + + + + + + + + + + diff --git a/build_msvc/libsecp256k1/libsecp256k1.vcxproj b/build_msvc/libsecp256k1/libsecp256k1.vcxproj index 777515aa3af..aece77014bc 100644 --- a/build_msvc/libsecp256k1/libsecp256k1.vcxproj +++ b/build_msvc/libsecp256k1/libsecp256k1.vcxproj @@ -2,7 +2,7 @@ - {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6} + {BB493552-3B8C-4A8C-BFBD-93FA72A760C1} StaticLibrary @@ -14,7 +14,7 @@ - ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;ENABLE_MODULE_ELLSWIFT;%(PreprocessorDefinitions) + ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;ENABLE_MODULE_ELLSWIFT;ENABLE_MODULE_MUSIG;%(PreprocessorDefinitions) USE_ASM_X86_64;%(UndefinePreprocessorDefinitions) ..\..\src\secp256k1;%(AdditionalIncludeDirectories) 4146;4244;4267;4334 diff --git a/build_msvc/libsecp256k1/libsecp256k1.vcxproj.in b/build_msvc/libsecp256k1/libsecp256k1.vcxproj.in new file mode 100644 index 00000000000..19da8940c40 --- /dev/null +++ b/build_msvc/libsecp256k1/libsecp256k1.vcxproj.in @@ -0,0 +1,26 @@ + + + + + {BB493552-3B8C-4A8C-BFBD-93FA72A760C1} + + + StaticLibrary + + + + + + + + + @SECP256K1_MODULES@;%(PreprocessorDefinitions) + USE_ASM_X86_64;%(UndefinePreprocessorDefinitions) + ..\..\src\secp256k1;%(AdditionalIncludeDirectories) + 4146;4244;4267;4334 + + + + + + diff --git a/build_msvc/msvc-autogen.py b/build_msvc/msvc-autogen.py index cf431969b8a..e07d13873fe 100755 --- a/build_msvc/msvc-autogen.py +++ b/build_msvc/msvc-autogen.py @@ -14,6 +14,7 @@ libs = [ 'libdigibyte_cli', 'libdigibyte_common', + 'libdigibyte_consensus', 'libdigibyte_crypto', 'libdigibyte_node', 'libdigibyte_util', @@ -24,6 +25,14 @@ 'libtest_util', ] +secp256k1_modules = [ + 'RECOVERY', + 'EXTRAKEYS', + 'SCHNORRSIG', + 'ELLSWIFT', + 'MUSIG', +] + ignore_list = [ ] @@ -90,6 +99,126 @@ def set_properties(vcxproj_filename, placeholder, content): with open(vcxproj_filename, 'w', encoding='utf-8') as vcxproj_file: vcxproj_file.write(vcxproj_in_file.read().replace(placeholder, content)) + +def parse_makefile_variable(makefile, variable): + """Return literal entries from all assignments to one make variable.""" + entries = [] + collecting = False + with open(makefile, 'r', encoding='utf-8') as file: + for raw_line in file.read().splitlines(): + line = raw_line.strip() + if not collecting: + match = re.match(r'^' + re.escape(variable) + r'\s*\+?=\s*(.*)$', line) + if not match: + continue + line = match.group(1).strip() + continued = line.endswith('\\') + if continued: + line = line[:-1].rstrip() + if line and not line.startswith('$'): + entries.extend(entry for entry in line.split() if not entry.startswith('$')) + collecting = continued + return entries + + +def add_missing_items(content, marker, items): + missing = [item for item in items if item not in content] + if missing: + if marker not in content: + raise RuntimeError('Unexpected MSVC project layout') + content = content.replace(marker, '\n'.join(missing) + '\n' + marker, 1) + return content + + +def sync_qt_test_project(): + makefile = os.path.join(SOURCE_DIR, 'Makefile.qttest.include') + project = os.path.join(SOURCE_DIR, '../build_msvc/test_digibyte-qt/test_digibyte-qt.vcxproj') + source_entries = parse_makefile_variable( + makefile, 'qt_test_test_digibyte_qt_SOURCES') + moc_entries = parse_makefile_variable(makefile, 'TEST_QT_MOC_CPP') + + with open(project, 'r', encoding='utf-8') as file: + content = file.read() + + generated_marker = ' ' + source_items = [] + for source in source_entries: + if source.endswith('.cpp'): + include = '..\\..\\src\\' + source.replace('/', '\\') + item = f' ' + # Preserve hand-authored object-name metadata and remove an older + # simple duplicate if a previous generator run added one. + if f'\n' in content: + content = content.replace(item + '\n', '') + if f'Include="{include}"' not in content: + source_items.append(item) + content = add_missing_items(content, generated_marker, source_items) + + generated_items = [] + moc_header_items = [] + for source in moc_entries: + if not source.endswith('.cpp'): + continue + filename = os.path.basename(source.replace('\\', '/')) + generated_items.append( + f' ') + header = filename.removeprefix('moc_').removesuffix('.cpp') + '.h' + moc_header_items.append( + f' ') + generated_end_marker = ' \n \n ' + source_items.append(item) + content = add_missing_items(content, generated_marker, source_items) + + moc_items = [] + for source in moc_entries: + if not source.endswith('.cpp'): + continue + filename = os.path.basename(source.replace('\\', '/')) + item = f' ' + moc_items.append(item) + content = add_missing_items(content, resource_marker, moc_items) + + with open(project, 'w', encoding='utf-8') as file: + file.write(content) + def main(): parser = argparse.ArgumentParser(description='DigiByte-core msbuild configuration initialiser.') parser.add_argument('-toolset', nargs='?', default=DEFAULT_PLATFORM_TOOLSET, @@ -97,6 +226,11 @@ def main(): ' default is %s.'%DEFAULT_PLATFORM_TOOLSET) args = parser.parse_args() set_properties(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), '@TOOLSET@', args.toolset) + set_properties( + os.path.join(SOURCE_DIR, '../build_msvc/libsecp256k1/libsecp256k1.vcxproj'), + '@SECP256K1_MODULES@', + ';'.join(f'ENABLE_MODULE_{module}' for module in secp256k1_modules), + ) for makefile_name in os.listdir(SOURCE_DIR): if 'Makefile' in makefile_name: @@ -109,6 +243,8 @@ def main(): content += ' $(IntDir)' + object_filename + '\n' content += ' \n' set_properties(vcxproj_filename, '@SOURCE_FILES@\n', content) + sync_qt_project() + sync_qt_test_project() parse_config_into_dgb_config() copyfile(os.path.join(SOURCE_DIR,'../build_msvc/digibyte_config.h'), os.path.join(SOURCE_DIR, 'config/digibyte-config.h')) diff --git a/build_msvc/test_digibyte-qt/test_digibyte-qt.vcxproj b/build_msvc/test_digibyte-qt/test_digibyte-qt.vcxproj index 3133bcf773f..8bf573b3671 100644 --- a/build_msvc/test_digibyte-qt/test_digibyte-qt.vcxproj +++ b/build_msvc/test_digibyte-qt/test_digibyte-qt.vcxproj @@ -24,12 +24,16 @@ + + + + @@ -101,6 +105,8 @@ + + diff --git a/build_msvc/test_digibyte/test_digibyte.vcxproj b/build_msvc/test_digibyte/test_digibyte.vcxproj index 6ca6f531478..30113fbbd05 100644 --- a/build_msvc/test_digibyte/test_digibyte.vcxproj +++ b/build_msvc/test_digibyte/test_digibyte.vcxproj @@ -8,6 +8,11 @@ Application $(SolutionDir)$(Platform)\$(Configuration)\ + + + /bigobj %(AdditionalOptions) + + diff --git a/build_msvc/vcpkg.json b/build_msvc/vcpkg.json index bfd6dff6911..e161779a8fc 100644 --- a/build_msvc/vcpkg.json +++ b/build_msvc/vcpkg.json @@ -4,19 +4,31 @@ "dependencies": [ "berkeleydb", "boost-multi-index", + "boost-multiprecision", "boost-process", "boost-signals2", "boost-test", "boost-thread", + { + "name": "curl", + "default-features": false, + "features": ["ssl"] + }, "sqlite3", { "name": "libevent", "features": ["thread"] }, + "libqrencode", "zeromq" ], "builtin-baseline": "f14984af3738e69f197bf0e647a8dca12de92996", "overrides": [ + { + "name": "curl", + "version": "8.21.0", + "port-version": 1 + }, { "name": "libevent", "version": "2.1.12#7" diff --git a/configure.ac b/configure.ac index 2632ff681d3..ca2bbfd09f3 100644 --- a/configure.ac +++ b/configure.ac @@ -1626,7 +1626,7 @@ PKG_CHECK_MODULES([LIBCURL], [libcurl >= 7.50.0], if test "$TARGET_OS" = "darwin"; then LIBCURL_LIBS="$LIBCURL_LIBS -framework CoreFoundation -framework SystemConfiguration" fi], - [AC_MSG_WARN([libcurl not found, oracle will use mock exchange data])]) + [AC_MSG_WARN([libcurl not found, live oracle exchange fetching will be unavailable])]) AM_CONDITIONAL([HAVE_LIBCURL], [test "$use_libcurl" = "yes"]) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 060406efc55..2a2cc35cbf6 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -24,6 +24,7 @@ $(package)_patches += fix-macos-linker.patch $(package)_patches += memory_resource.patch $(package)_patches += windows_lto.patch $(package)_patches += zlib-timebits64.patch +$(package)_patches += zlib-prefix-crc32-combine.patch $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) $(package)_qttranslations_sha256_hash=38b942bc7e62794dd072945c8a92bb9dfffed24070aea300327a3bb42f855609 @@ -258,6 +259,7 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \ patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \ patch -p1 -i $($(package)_patch_dir)/zlib-timebits64.patch && \ + patch -p1 -i $($(package)_patch_dir)/zlib-prefix-crc32-combine.patch && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ diff --git a/depends/patches/qt/zlib-prefix-crc32-combine.patch b/depends/patches/qt/zlib-prefix-crc32-combine.patch new file mode 100644 index 00000000000..8fb2bf1087b --- /dev/null +++ b/depends/patches/qt/zlib-prefix-crc32-combine.patch @@ -0,0 +1,24 @@ +Backport the missing Z_PREFIX mappings added upstream after Qt 5.15.10. + +Qt builds its bundled zlib with Z_PREFIX so that it can coexist with another +zlib in the same process. zlib 1.2.12 added three public crc32-combine helper +symbols, but Qt 5.15.10's bundled zconf.h does not prefix them. This makes a +static Qt5Core.lib collide with the zlib.lib used by libcurl. + +Upstream Qt commit: 54ea62756a +Qt bug: QTBUG-116236 + +diff --git a/qtbase/src/3rdparty/zlib/src/zconf.h b/qtbase/src/3rdparty/zlib/src/zconf.h +--- a/qtbase/src/3rdparty/zlib/src/zconf.h ++++ b/qtbase/src/3rdparty/zlib/src/zconf.h +@@ -40,7 +40,10 @@ + # endif + # define crc32 z_crc32 + # define crc32_combine z_crc32_combine + # define crc32_combine64 z_crc32_combine64 ++# define crc32_combine_gen z_crc32_combine_gen ++# define crc32_combine_gen64 z_crc32_combine_gen64 ++# define crc32_combine_op z_crc32_combine_op + # define crc32_z z_crc32_z + # define deflate z_deflate + # define deflateBound z_deflateBound diff --git a/src/compressor.cpp b/src/compressor.cpp index a0fa46dfb21..9401f18b818 100644 --- a/src/compressor.cpp +++ b/src/compressor.cpp @@ -180,19 +180,19 @@ bool LegacyCompressAmount(uint64_t n, uint64_t& compressed) n /= 10; e++; } - __uint128_t result; + const uint64_t max = std::numeric_limits::max(); if (e < 9) { - int d = (n % 10); + const uint64_t d = n % 10; assert(d >= 1 && d <= 9); n /= 10; - result = 1 + ((__uint128_t{n} * 9 + d - 1) * 10) + e; + if (n > (max - (d - 1)) / 9) return false; + const uint64_t mantissa = n * 9 + d - 1; + if (mantissa > (max - 1 - e) / 10) return false; + compressed = 1 + mantissa * 10 + e; } else { - result = 1 + ((__uint128_t{n} - 1) * 10) + 9; - } - if (result > std::numeric_limits::max()) { - return false; + if (n > max / 10) return false; + compressed = n * 10; } - compressed = static_cast(result); return true; } diff --git a/src/consensus/dca.cpp b/src/consensus/dca.cpp index 20d5197dba2..d5b0c80a98f 100644 --- a/src/consensus/dca.cpp +++ b/src/consensus/dca.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -34,14 +35,14 @@ int ResolveCanonicalHealthForDCA(int requestedHealth, bool& staleHealth) return requestedHealth; } -bool TryMultiplyInt128(__int128 a, __int128 b, __int128& result) +bool TryMultiplyInt128(util::int128_t a, util::int128_t b, util::int128_t& result) { if (a < 0 || b < 0) return false; if (a == 0 || b == 0) { result = 0; return true; } - if (a > std::numeric_limits<__int128>::max() / b) { + if (a > std::numeric_limits::max() / b) { return false; } result = a * b; @@ -87,18 +88,18 @@ int DynamicCollateralAdjustment::CalculateSystemHealth(CAmount totalCollateral, // totalCollateral is in satoshis, oraclePrice is in milli-cents per DGB // (100,000 = $1.00), and totalDD is in cents. Floor the final ratio so // health never rounds up across a DCA boundary. - __int128 numerator = 0; - if (!TryMultiplyInt128(static_cast<__int128>(totalCollateral), - static_cast<__int128>(oraclePrice), + util::int128_t numerator = 0; + if (!TryMultiplyInt128(static_cast(totalCollateral), + static_cast(oraclePrice), numerator) || !TryMultiplyInt128(numerator, 100, numerator)) { LogPrintf("DCA: Cannot calculate system health - collateral/price multiplication overflow\n"); return 0; } - __int128 denominator = static_cast<__int128>(COIN) * 1000 * - static_cast<__int128>(totalDD); - __int128 healthCalculation = numerator / denominator; + util::int128_t denominator = static_cast(COIN) * 1000 * + static_cast(totalDD); + util::int128_t healthCalculation = numerator / denominator; if (healthCalculation <= 0) { LogPrint(BCLog::DIGIDOLLAR, "DCA: Zero collateral value, system health is 0%%\n"); @@ -159,9 +160,9 @@ int DynamicCollateralAdjustment::ApplyDCA(int baseRatio, int systemHealth) int multiplierBps = GetDCAMultiplierBps(resolvedHealth); - __int128 adjustedRatio = static_cast<__int128>(baseRatio) * - static_cast<__int128>(multiplierBps); - __int128 finalRatio128 = (adjustedRatio + DCA_BPS_SCALE - 1) / DCA_BPS_SCALE; + util::int128_t adjustedRatio = static_cast(baseRatio) * + static_cast(multiplierBps); + util::int128_t finalRatio128 = (adjustedRatio + DCA_BPS_SCALE - 1) / DCA_BPS_SCALE; int finalRatio = finalRatio128 > std::numeric_limits::max() ? std::numeric_limits::max() : static_cast(finalRatio128); diff --git a/src/consensus/err.cpp b/src/consensus/err.cpp index 2c432ee817c..297ca3aedd1 100644 --- a/src/consensus/err.cpp +++ b/src/consensus/err.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -119,14 +120,14 @@ CAmount EmergencyRedemptionRatio::GetRequiredDDBurn(CAmount originalDDMinted, in // Consensus-visible burn math: ceil(originalDD * 10000 / ratioBps). // Use signed 128-bit arithmetic so large valid CAmount values cannot overflow. - const __int128 numerator = static_cast<__int128>(originalDDMinted) * ERR_RATIO_NORMAL_BPS; - const __int128 required = (numerator + ratioBps - 1) / ratioBps; - const __int128 max_amount = std::numeric_limits::max(); + const util::int128_t numerator = static_cast(originalDDMinted) * ERR_RATIO_NORMAL_BPS; + const util::int128_t required = (numerator + ratioBps - 1) / ratioBps; + const util::int128_t max_amount = std::numeric_limits::max(); const CAmount requiredDD = required > max_amount ? std::numeric_limits::max() : static_cast(required); - const __int128 increaseBps = (static_cast<__int128>(requiredDD - originalDDMinted) * 10000) / originalDDMinted; + const util::int128_t increaseBps = (static_cast(requiredDD - originalDDMinted) * 10000) / originalDDMinted; LogPrint(BCLog::DIGIDOLLAR, "ERR: GetRequiredDDBurn - original: %lld, health: %d%%, ratio_bps: %d, required: %lld (%lld.%02lld%% increase)\n", static_cast(originalDDMinted), systemHealth, ratioBps, static_cast(requiredDD), @@ -377,7 +378,7 @@ bool EmergencyRedemptionRatio::ValidateERRRedemption(const CTransaction& tx, CAm return false; } - const __int128 inferredInputs = static_cast<__int128>(originalDDMinted) * tx.vin.size(); + const util::int128_t inferredInputs = static_cast(originalDDMinted) * tx.vin.size(); ddInputs = inferredInputs > std::numeric_limits::max() ? std::numeric_limits::max() : static_cast(inferredInputs); diff --git a/src/consensus/volatility.cpp b/src/consensus/volatility.cpp index 2ef87466f06..9bf9c3c8bc5 100644 --- a/src/consensus/volatility.cpp +++ b/src/consensus/volatility.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -25,24 +26,24 @@ namespace Volatility { namespace { -int64_t SaturatingInt64(__int128 value) +int64_t SaturatingInt64(util::int128_t value) { - if (value > static_cast<__int128>(std::numeric_limits::max())) { + if (value > static_cast(std::numeric_limits::max())) { return std::numeric_limits::max(); } - if (value < static_cast<__int128>(std::numeric_limits::min())) { + if (value < static_cast(std::numeric_limits::min())) { return std::numeric_limits::min(); } return static_cast(value); } -uint64_t IntegerSqrtFloor(unsigned __int128 value) +uint64_t IntegerSqrtFloor(util::uint128_t value) { uint64_t low = 0; uint64_t high = std::numeric_limits::max(); while (low < high) { const uint64_t mid = low + (high - low) / 2 + 1; - const unsigned __int128 square = static_cast(mid) * mid; + const util::uint128_t square = static_cast(mid) * mid; if (square <= value) { low = mid; } else { @@ -638,20 +639,20 @@ int64_t VolatilityMonitor::CalculateStandardDeviationBps(const std::vector(value) * value; + sumSquares += static_cast(value) * value; } - const __int128 count = values.size(); - __int128 numerator = count * sumSquares - sum * sum; + const util::int128_t count = values.size(); + util::int128_t numerator = count * sumSquares - sum * sum; if (numerator <= 0) { return 0; } - const __int128 denominator = count * (count - 1); // Sample variance - const unsigned __int128 variance = static_cast(numerator / denominator); + const util::int128_t denominator = count * (count - 1); // Sample variance + const util::uint128_t variance = static_cast(numerator / denominator); const uint64_t sqrt = IntegerSqrtFloor(variance); if (sqrt > static_cast(std::numeric_limits::max())) { return std::numeric_limits::max(); @@ -686,8 +687,8 @@ int64_t CalculatePercentageChangeBps(CAmount oldPrice, CAmount newPrice) return 0; } - const __int128 delta = static_cast<__int128>(newPrice) - oldPrice; - const __int128 scaled = delta * 10000; + const util::int128_t delta = static_cast(newPrice) - oldPrice; + const util::int128_t scaled = delta * 10000; return SaturatingInt64(scaled / oldPrice); } diff --git a/src/crypto/luffa.cpp b/src/crypto/luffa.cpp index 4c7b4ceb5fe..3d891e1f4a3 100644 --- a/src/crypto/luffa.cpp +++ b/src/crypto/luffa.cpp @@ -30,7 +30,9 @@ * @author Thomas Pornin */ +#if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunused-const-variable" +#endif #include #include @@ -1425,4 +1427,4 @@ sph_luffa512_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) #ifdef __cplusplus } -#endif \ No newline at end of file +#endif diff --git a/src/digidollar/health.cpp b/src/digidollar/health.cpp index 2c221bd2d3e..ad8deac7cb0 100644 --- a/src/digidollar/health.cpp +++ b/src/digidollar/health.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -811,11 +812,9 @@ int SystemHealthMonitor::CalculateSystemHealth(CAmount ddSupply, CAmount collate return 0; // Cannot calculate without valid price } - __int128 numerator = static_cast<__int128>(collateral) * - static_cast<__int128>(price) * 100; - __int128 denominator = static_cast<__int128>(COIN) * - static_cast<__int128>(ddSupply); - __int128 health = numerator / denominator; + const util::int128_t numerator = util::int128_t{collateral} * util::int128_t{price} * 100; + const util::int128_t denominator = util::int128_t{COIN} * util::int128_t{ddSupply}; + const util::int128_t health = numerator / denominator; if (health < 0) return 0; if (health > 300) return 300; @@ -965,21 +964,21 @@ int CalculateHealthRatio(CAmount ddAmount, CAmount dgbAmount, CAmount dgbPrice) return 0; // Cannot calculate without valid price/amount } - // Calculate DGB value in cents using __int128 to prevent overflow. + // Calculate DGB value in cents using a fixed 128-bit integer to prevent overflow. // dgbPrice is in cents (100 = $1.00 DGB price) // dgbAmount is in satoshis // Formula: (satoshis * price_cents) / COIN = value_in_cents // Then health = (value_in_cents * 100) / ddAmount // - // Using __int128 is safe here because this is a monitoring/display + // Using a fixed 128-bit integer is safe here because this is a monitoring/display // function, not consensus-critical code. The consensus equivalent - // (CalculateSystemHealth) uses a divide-first pattern, but __int128 + // (CalculateSystemHealth) uses a divide-first pattern, but 128-bit arithmetic // is simpler and handles all edge cases without precision loss. - __int128 dgbValue128 = static_cast<__int128>(dgbAmount) * static_cast<__int128>(dgbPrice); + util::int128_t dgbValue128 = util::int128_t{dgbAmount} * util::int128_t{dgbPrice}; dgbValue128 /= COIN; // Health = (Collateral Value / DD Value) * 100 - __int128 health128 = (dgbValue128 * 100) / static_cast<__int128>(ddAmount); + const util::int128_t health128 = (dgbValue128 * 100) / util::int128_t{ddAmount}; // Clamp to [0, 300] if (health128 < 0) return 0; diff --git a/src/oracle/exchange.cpp b/src/oracle/exchange.cpp index 196828cdb58..28d3f97d9b0 100644 --- a/src/oracle/exchange.cpp +++ b/src/oracle/exchange.cpp @@ -10,9 +10,11 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -47,11 +49,11 @@ CAmount ConvertBinancePairPricesToMicroUSD(const std::string& dgb_btc_str, const if (dgb_btc_scaled <= 0 || btc_usdt_scaled <= 0) return 0; if (dgb_btc_scaled > PRICE_PARSE_SCALE) return 0; // DGB/BTC > 1 is outside sane fallback bounds. - const __int128 numerator = static_cast<__int128>(dgb_btc_scaled) * - static_cast<__int128>(btc_usdt_scaled) * 1000000; - const __int128 denominator = static_cast<__int128>(PRICE_PARSE_SCALE) * - static_cast<__int128>(PRICE_PARSE_SCALE); - const __int128 price_micro_usd = numerator / denominator; + const util::int128_t numerator = static_cast(dgb_btc_scaled) * + static_cast(btc_usdt_scaled) * 1000000; + const util::int128_t denominator = static_cast(PRICE_PARSE_SCALE) * + static_cast(PRICE_PARSE_SCALE); + const util::int128_t price_micro_usd = numerator / denominator; if (price_micro_usd <= 0 || price_micro_usd > MAX_REASONABLE_PRICE_MICRO_USD) { return 0; } @@ -191,6 +193,7 @@ std::string BaseExchangeFetcher::HttpGet(const std::string& url) curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); #endif +#ifndef WIN32 static const char* ca_bundle_paths[] = { "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu "/etc/pki/tls/certs/ca-bundle.crt", // RHEL/CentOS @@ -208,10 +211,6 @@ std::string BaseExchangeFetcher::HttpGet(const std::string& url) }; bool ca_set = false; -#ifdef WIN32 - // Windows native cert store handles CA — skip Linux file search - ca_set = true; -#endif // Try CA bundle files first for (int i = 0; ca_bundle_paths[i] != nullptr; ++i) { struct stat st; @@ -232,6 +231,11 @@ std::string BaseExchangeFetcher::HttpGet(const std::string& url) break; } } +#else + // The Schannel backend uses the native Windows certificate store; the + // POSIX CA-file discovery above is neither needed nor available here. + const bool ca_set = true; +#endif if (!ca_set) { LogPrintf("HttpGet: SECURITY - No CA bundle found, refusing to make unverified request to %s\n", url); #ifndef WIN32 @@ -1060,6 +1064,17 @@ MultiExchangeAggregator::MultiExchangeAggregator() InitializeFetchers(); } +MultiExchangeAggregator::MultiExchangeAggregator( + std::vector> custom_fetchers) + : fetchers(std::move(custom_fetchers)) +{ + for (const auto& fetcher : fetchers) { + if (!fetcher) { + throw std::invalid_argument("MultiExchangeAggregator requires non-null fetchers"); + } + } +} + MultiExchangeAggregator::~MultiExchangeAggregator() { } diff --git a/src/oracle/exchange.h b/src/oracle/exchange.h index 3d2c838d42d..99c17363d47 100644 --- a/src/oracle/exchange.h +++ b/src/oracle/exchange.h @@ -239,6 +239,7 @@ class MultiExchangeAggregator public: MultiExchangeAggregator(); + explicit MultiExchangeAggregator(std::vector> custom_fetchers); ~MultiExchangeAggregator(); //! Configuration diff --git a/src/oracle/node.cpp b/src/oracle/node.cpp index 8fe56d4ed4e..57fc0a1c859 100644 --- a/src/oracle/node.cpp +++ b/src/oracle/node.cpp @@ -411,6 +411,14 @@ void OracleNode::PriceThreadFunc() void OracleNode::FetchAndUpdatePrice() { + // Regtest price data is supplied by MockOracleManager. Keeping the real + // OracleNode lifecycle running is useful for start/stop coverage, but an + // intentionally skipped public fetch is not an exchange failure. + if (Params().GetChainType() == ChainType::REGTEST) { + LogPrint(BCLog::DIGIDOLLAR, "Oracle: Public exchange fetching is disabled on regtest\n"); + return; + } + CAmount median_price = FetchMedianPrice(); if (median_price > 0) { @@ -444,6 +452,15 @@ void OracleNode::FetchAndUpdatePrice() CAmount OracleNode::FetchMedianPrice() { + // Regtest has a dedicated in-process MockOracleManager and must remain + // deterministic. Never contact public exchanges merely because a regtest + // test starts the oracle lifecycle; the opt-in exchange smoke test covers + // the real HTTPS path directly. + if (Params().GetChainType() == ChainType::REGTEST) { + LogPrint(BCLog::DIGIDOLLAR, "Oracle: Skipping public exchange fetch on regtest\n"); + return 0; + } + // Use the real MultiExchangeAggregator from exchange.cpp // This fetches from the active exchange set and returns median with outlier filtering. ExchangeAPI::MultiExchangeAggregator aggregator; diff --git a/src/util/int128.h b/src/util/int128.h new file mode 100644 index 00000000000..a7b12feca52 --- /dev/null +++ b/src/util/int128.h @@ -0,0 +1,25 @@ +// Copyright (c) 2026 The DigiByte Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef DIGIBYTE_UTIL_INT128_H +#define DIGIBYTE_UTIL_INT128_H + +#if defined(__SIZEOF_INT128__) +namespace util { +using int128_t = __int128; +using uint128_t = unsigned __int128; +} // namespace util +#elif defined(_MSC_VER) +#include +namespace util { +using int128_t = boost::multiprecision::number>; +using uint128_t = boost::multiprecision::uint128_t; +} // namespace util +#else +#error "DigiByte requires a fixed-width 128-bit integer implementation" +#endif + +#endif // DIGIBYTE_UTIL_INT128_H From 3883c3a7ca2c3ca58664ea3abf0d79d7bffbf1ec Mon Sep 17 00:00:00 2001 From: Shen Date: Sat, 1 Aug 2026 02:26:55 +0200 Subject: [PATCH 03/59] paymaster: add protocol and peer services --- src/Makefile.am | 39 + src/chainparamsbase.h | 1 + src/digidollar/scripts.cpp | 4 +- src/digidollar/txbuilder.cpp | 57 +- src/digidollar/validation.cpp | 49 +- src/digidollar/validation.h | 8 + src/init.cpp | 20 +- src/net.cpp | 62 +- src/net.h | 15 +- src/net_processing.cpp | 298 ++++- src/net_processing.h | 4 + src/node/connection_types.cpp | 2 + src/node/connection_types.h | 5 + src/node/context.cpp | 1 + src/node/context.h | 4 + src/node/interface_ui.h | 1 + src/paymaster/client.cpp | 304 ++++++ src/paymaster/client.h | 116 ++ src/paymaster/directory.cpp | 190 ++++ src/paymaster/directory.h | 124 +++ src/paymaster/manager.cpp | 1618 +++++++++++++++++++++++++++ src/paymaster/manager.h | 483 ++++++++ src/paymaster/protocol.cpp | 676 ++++++++++++ src/paymaster/protocol.h | 305 ++++++ src/paymaster/provider.cpp | 1934 +++++++++++++++++++++++++++++++++ src/paymaster/provider.h | 774 +++++++++++++ src/paymaster/psbt.cpp | 1128 +++++++++++++++++++ src/paymaster/psbt.h | 191 ++++ src/paymaster/recovery.cpp | 1076 ++++++++++++++++++ src/paymaster/recovery.h | 596 ++++++++++ src/paymaster/reputation.cpp | 180 +++ src/paymaster/reputation.h | 168 +++ src/paymaster/reservation.cpp | 152 +++ src/paymaster/reservation.h | 557 ++++++++++ src/paymaster/sponsorship.cpp | 216 ++++ src/paymaster/sponsorship.h | 140 +++ src/paymaster/txbuilder.cpp | 310 ++++++ src/paymaster/txbuilder.h | 109 ++ src/paymaster/types.cpp | 92 ++ src/paymaster/types.h | 130 +++ src/paymaster/validation.cpp | 621 +++++++++++ src/paymaster/validation.h | 221 ++++ src/paymaster/wire.cpp | 471 ++++++++ src/paymaster/wire.h | 264 +++++ src/protocol.cpp | 26 + src/protocol.h | 15 + 46 files changed, 13668 insertions(+), 89 deletions(-) create mode 100644 src/paymaster/client.cpp create mode 100644 src/paymaster/client.h create mode 100644 src/paymaster/directory.cpp create mode 100644 src/paymaster/directory.h create mode 100644 src/paymaster/manager.cpp create mode 100644 src/paymaster/manager.h create mode 100644 src/paymaster/protocol.cpp create mode 100644 src/paymaster/protocol.h create mode 100644 src/paymaster/provider.cpp create mode 100644 src/paymaster/provider.h create mode 100644 src/paymaster/psbt.cpp create mode 100644 src/paymaster/psbt.h create mode 100644 src/paymaster/recovery.cpp create mode 100644 src/paymaster/recovery.h create mode 100644 src/paymaster/reputation.cpp create mode 100644 src/paymaster/reputation.h create mode 100644 src/paymaster/reservation.cpp create mode 100644 src/paymaster/reservation.h create mode 100644 src/paymaster/sponsorship.cpp create mode 100644 src/paymaster/sponsorship.h create mode 100644 src/paymaster/txbuilder.cpp create mode 100644 src/paymaster/txbuilder.h create mode 100644 src/paymaster/types.cpp create mode 100644 src/paymaster/types.h create mode 100644 src/paymaster/validation.cpp create mode 100644 src/paymaster/validation.h create mode 100644 src/paymaster/wire.cpp create mode 100644 src/paymaster/wire.h diff --git a/src/Makefile.am b/src/Makefile.am index 5366cd55674..188ab7fe4fa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -163,6 +163,20 @@ DIGIBYTE_CORE_H = \ digidollar/scripts.h \ digidollar/txbuilder.h \ digidollar/validation.h \ + paymaster/txbuilder.h \ + paymaster/client.h \ + paymaster/types.h \ + paymaster/reservation.h \ + paymaster/directory.h \ + paymaster/manager.h \ + paymaster/psbt.h \ + paymaster/recovery.h \ + paymaster/provider.h \ + paymaster/protocol.h \ + paymaster/reputation.h \ + paymaster/sponsorship.h \ + paymaster/wire.h \ + paymaster/validation.h \ external_signer.h \ flatfile.h \ headerssync.h \ @@ -316,6 +330,7 @@ DIGIBYTE_CORE_H = \ util/hash_type.h \ util/hasher.h \ util/insert.h \ + util/int128.h \ util/macros.h \ util/message.h \ util/moneystr.h \ @@ -359,6 +374,7 @@ DIGIBYTE_CORE_H = \ wallet/receive.h \ wallet/rpc/util.h \ wallet/rpc/wallet.h \ + wallet/rpc/paymaster.h \ wallet/salvage.h \ wallet/scriptpubkeyman.h \ wallet/spend.h \ @@ -367,6 +383,10 @@ DIGIBYTE_CORE_H = \ wallet/types.h \ wallet/wallet.h \ wallet/walletdb.h \ + wallet/paymasterpsbt.h \ + wallet/paymasteridentity.h \ + wallet/paymasterprovider.h \ + wallet/paymasterstore.h \ wallet/wallettool.h \ wallet/walletutil.h \ walletinitinterface.h \ @@ -531,11 +551,16 @@ libdigibyte_wallet_a_SOURCES = \ wallet/rpc/transactions.cpp \ wallet/rpc/util.cpp \ wallet/rpc/wallet.cpp \ + wallet/rpc/paymaster.cpp \ wallet/scriptpubkeyman.cpp \ wallet/spend.cpp \ wallet/transaction.cpp \ wallet/wallet.cpp \ wallet/walletdb.cpp \ + wallet/paymasterpsbt.cpp \ + wallet/paymasteridentity.cpp \ + wallet/paymasterprovider.cpp \ + wallet/paymasterstore.cpp \ wallet/walletutil.cpp \ wallet/coinselection.cpp \ $(DIGIBYTE_CORE_H) @@ -748,6 +773,20 @@ libdigibyte_common_a_SOURCES = \ digidollar/scripts.cpp \ digidollar/txbuilder.cpp \ digidollar/validation.cpp \ + paymaster/txbuilder.cpp \ + paymaster/client.cpp \ + paymaster/types.cpp \ + paymaster/reservation.cpp \ + paymaster/directory.cpp \ + paymaster/manager.cpp \ + paymaster/psbt.cpp \ + paymaster/recovery.cpp \ + paymaster/provider.cpp \ + paymaster/protocol.cpp \ + paymaster/reputation.cpp \ + paymaster/sponsorship.cpp \ + paymaster/wire.cpp \ + paymaster/validation.cpp \ external_signer.cpp \ init/common.cpp \ kernel/chainparams.cpp \ diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h index 4c23e41fceb..e0f2b2a752c 100644 --- a/src/chainparamsbase.h +++ b/src/chainparamsbase.h @@ -7,6 +7,7 @@ #include +#include #include #include diff --git a/src/digidollar/scripts.cpp b/src/digidollar/scripts.cpp index 23b4e302a93..768097cbb18 100644 --- a/src/digidollar/scripts.cpp +++ b/src/digidollar/scripts.cpp @@ -170,7 +170,7 @@ CScript CreateCollateralP2TR(const MintParams& params) return scriptPubKey; - } catch (const std::exception& e) { + } catch (const std::exception&) { // LogPrintf("DigiDollar: Exception creating P2TR script: %s\n", e.what()); return CScript(); } @@ -209,7 +209,7 @@ CScript CreateDigiDollarP2TR(const XOnlyPubKey& owner, CAmount ddAmount) return scriptPubKey; - } catch (const std::exception& e) { + } catch (const std::exception&) { // LogPrintf("DigiDollar: Exception creating DD P2TR script: %s\n", e.what()); return CScript(); } diff --git a/src/digidollar/txbuilder.cpp b/src/digidollar/txbuilder.cpp index 40727d39b31..61e42a3d218 100644 --- a/src/digidollar/txbuilder.cpp +++ b/src/digidollar/txbuilder.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -42,8 +43,8 @@ CAmount ApplyCollateralSafetyMargin(CAmount requiredCollateral) return 0; } - __int128 padded128 = (static_cast<__int128>(requiredCollateral) * 101) / 100; - if (padded128 > static_cast<__int128>(MAX_MONEY)) { + util::int128_t padded128 = (static_cast(requiredCollateral) * 101) / 100; + if (padded128 > static_cast(MAX_MONEY)) { return 0; } return static_cast(padded128); @@ -55,8 +56,8 @@ int CalculatePositionCollateralRatio(CAmount dgbLocked, CAmount ddMinted, CAmoun return 0; } - const __int128 dgbValueCents = (static_cast<__int128>(dgbLocked) * price) / COIN; - const __int128 ratio = (dgbValueCents * 100) / ddMinted; + const util::int128_t dgbValueCents = (static_cast(dgbLocked) * price) / COIN; + const util::int128_t ratio = (dgbValueCents * 100) / ddMinted; if (ratio > std::numeric_limits::max()) { return std::numeric_limits::max(); } @@ -205,17 +206,17 @@ CAmount MintTxBuilder::CalculateRequiredCollateral(CAmount ddAmount, int lockDay // = 15,000,000,000,000,000 / 6310 // = 2,377,179,080,509 sats = ~23,772 DGB // - // NOTE: Using __int128 to avoid uint64 overflow. Without this, minting >$18K DD + // NOTE: Using util::int128_t to avoid uint64 overflow. Without this, minting >$18K DD // at 1000% ratio (or >$36K at 500%) causes silent overflow, producing a tiny // collateral requirement and allowing massively under-collateralized positions. - __int128 numerator = static_cast<__int128>(usdValue) * static_cast<__int128>(COIN) * - static_cast<__int128>(effectiveRatio) * 100; - __int128 denominator = static_cast<__int128>(oraclePrice); - __int128 result128 = (numerator + denominator - 1) / denominator; + util::int128_t numerator = static_cast(usdValue) * static_cast(COIN) * + static_cast(effectiveRatio) * 100; + util::int128_t denominator = static_cast(oraclePrice); + util::int128_t result128 = (numerator + denominator - 1) / denominator; // Overflow guard: cap at MAX_MONEY before casting to uint64_t. // Without this, extreme values could silently truncate to near-zero. - if (result128 > static_cast<__int128>(MAX_MONEY)) { + if (result128 > static_cast(MAX_MONEY)) { return 0; // Amount too large } uint64_t requiredCollateral = static_cast(result128); @@ -524,24 +525,24 @@ bool TransferTxBuilder::ValidateTransferParams(const TxBuilderTransferParams& pa for (const auto& [address, amount] : params.recipients) { // Validate address format if (!ValidateDDAddress(address)) { - LogPrintf("DigiDollar: ValidateTransferParams FAILED - Invalid address: %s\n", address); + LogPrintf("DigiDollar: ValidateTransferParams FAILED - Invalid address\n"); return false; } // Validate amount ranges if (amount <= 0) { - LogPrintf("DigiDollar: ValidateTransferParams FAILED - Non-positive amount: %d\n", amount); + LogPrintf("DigiDollar: ValidateTransferParams FAILED - Non-positive amount\n"); return false; // No zero or negative amounts } if (amount < minOutput) { - LogPrintf("DigiDollar: ValidateTransferParams FAILED - Below dust threshold: %d < %d\n", amount, minOutput); + LogPrintf("DigiDollar: ValidateTransferParams FAILED - Below dust threshold\n"); return false; // Below dust threshold } // Check maximum single transfer limit ($100,000) if (amount > 10000000) { // $100,000.00 in cents - LogPrintf("DigiDollar: ValidateTransferParams FAILED - Exceeds max transfer: %d > 10000000\n", amount); + LogPrintf("DigiDollar: ValidateTransferParams FAILED - Exceeds max transfer\n"); return false; } @@ -562,7 +563,7 @@ bool TransferTxBuilder::ValidateTransferParams(const TxBuilderTransferParams& pa // Validate fee rate if (!ValidateFeeRate(params.feeRate)) { - LogPrintf("DigiDollar: ValidateTransferParams FAILED - Invalid fee rate: %d\n", params.feeRate); + LogPrintf("DigiDollar: ValidateTransferParams FAILED - Invalid fee rate\n"); return false; } @@ -687,8 +688,7 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans // Add DGB fee inputs (after DD inputs) // Note: Phase 2.1 already selected these UTXOs, so we just add them directly - LogPrintf("DigiDollar: TxBuilder - feeUtxos.size=%d, feeAmounts.size=%d\n", - params.feeUtxos.size(), params.feeAmounts.size()); + LogPrintf("DigiDollar: TxBuilder - adding fee inputs\n"); CAmount totalFeeIn = 0; for (size_t i = 0; i < params.feeUtxos.size(); ++i) { @@ -696,17 +696,12 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans tx.vin.push_back(CTxIn(utxo)); // Get actual fee UTXO amount from feeAmounts CAmount feeAmount = (i < params.feeAmounts.size()) ? params.feeAmounts[i] : GetDGBFromUTXO(utxo); - LogPrintf("DigiDollar: Fee input %d - using %s: %d sats\n", - i, (i < params.feeAmounts.size()) ? "feeAmounts[i]" : "GetDGBFromUTXO()", feeAmount); totalFeeIn += feeAmount; - LogPrintf("DigiDollar: Added fee input %s:%d (%d sats)\n", - utxo.hash.ToString(), utxo.n, feeAmount); } // Add DD outputs for recipients (all with 0 DGB value) - LogPrintf("DigiDollar: TxBuilder - recipients.size=%d\n", params.recipients.size()); + LogPrintf("DigiDollar: TxBuilder - adding recipient outputs\n"); for (const auto& [address, amount] : params.recipients) { - LogPrintf("DigiDollar: Creating DD output - address=%s, amount=%d cents\n", address, amount); CTxDestination dest = DecodeDigiDollarAddress(address); const auto* taproot = std::get_if(&dest); if (!taproot) { @@ -725,7 +720,6 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans // can extract the DD amount when spending this output RegisterScriptMetadata(ddScript, ScriptType::DD_TOKEN_OUTPUT, amount, 0); - LogPrintf("DigiDollar: Added DD output for %s: %d cents (registered)\n", address, amount); } // Add DD change output if needed — EVERY cent of DD must be accounted for. @@ -756,7 +750,7 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans // because ExtractDDAmount can't find the amount. RegisterScriptMetadata(changeScript, ScriptType::DD_TOKEN_OUTPUT, ddChange, 0); - LogPrintf("DigiDollar: Added DD change output: %d cents (tweaked key, registered)\n", ddChange); + LogPrintf("DigiDollar: Added DD change output\n"); } else if (ddChange < 0) { // This should never happen - SelectDDCoins should ensure enough DD result.error = strprintf("Insufficient DD: need %d cents, have %d cents", totalDDOut, totalDDIn); @@ -768,8 +762,7 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans CAmount calculatedFee = CalculateFee(tx, params.feeRate); CAmount actualFee = std::max(calculatedFee, MIN_DD_TX_FEE); - LogPrintf("DigiDollar: Fee calculation - calculated: %d sats, minimum: %d sats, actual: %d sats\n", - calculatedFee, MIN_DD_TX_FEE, actualFee); + LogPrintf("DigiDollar: Fee calculation completed\n"); if (totalFeeIn <= 0) { result.error = "Insufficient DGB fee input: no fee inputs selected"; @@ -800,7 +793,7 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans LogPrintf("DigiDollar: WARNING - Using spenderKey for DGB change (wallet may not recognize!)\n"); } tx.vout.push_back(CTxOut(dgbChange, dgbChangeScript)); - LogPrintf("DigiDollar: Added DGB change output: %d sats\n", dgbChange); + LogPrintf("DigiDollar: Added DGB change output\n"); } } @@ -825,7 +818,7 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans } tx.vout.push_back(CTxOut(0, metadataScript)); - LogPrintf("DigiDollar: Added OP_RETURN with %d DD output amounts\n", ddOutputAmounts.size()); + LogPrintf("DigiDollar: Added DD transfer metadata\n"); // Final validation - ensure DD conservation // DD amounts are now stored in OP_RETURN, so sum up ddOutputAmounts instead @@ -834,8 +827,7 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans finalDDOut += amt; } - LogPrintf("DigiDollar: Conservation check - Input: %d cents, Output: %d cents\n", - totalDDIn, finalDDOut); + LogPrintf("DigiDollar: Conservation check completed\n"); // DD conservation is absolute — every cent in must equal every cent out. // DD change outputs are always created (no dust exception), so strict equality holds. @@ -906,8 +898,7 @@ TxBuilderResult TransferTxBuilder::BuildTransferTransaction(const TxBuilderTrans result.tx = tx; result.success = true; - LogPrintf("DigiDollar: Transaction finalized - %d inputs, %d outputs, version=%d, locktime=%d\n", - tx.vin.size(), tx.vout.size(), tx.nVersion, tx.nLockTime); + LogPrintf("DigiDollar: Transaction finalized\n"); return result; } diff --git a/src/digidollar/validation.cpp b/src/digidollar/validation.cpp index 7af40cd80b5..3b7ad6b62a0 100644 --- a/src/digidollar/validation.cpp +++ b/src/digidollar/validation.cpp @@ -22,6 +22,7 @@ using DigiDollar::GetScriptMetadata; #include #include #include +#include #include #include @@ -283,16 +284,18 @@ int FindDDOpReturn(const CTransaction& tx) { * Parses the OP_RETURN in the transaction to find DD amounts, then matches * the output index to the correct amount. Shared by txindex and block-db lookups. */ -static bool ExtractDDAmountFromTxRef(const CTransactionRef& prev_tx, const COutPoint& prevout, CAmount& amount) { +bool ExtractDDAmountFromTransaction(const CTransaction& prev_tx, const COutPoint& prevout, CAmount& amount) { amount = 0; + if (prev_tx.GetHash() != prevout.hash) return false; + // SECURITY [T5-02]: Reject coinbase transactions as DD sources. // A malicious miner could craft a coinbase with DD nVersion + zero-value P2TR // outputs + DD OP_RETURN. ConnectBlock's DD validation is inside `if (!IsCoinBase())` // so the coinbase would skip all DD checks. If we then extract DD amounts from the // coinbase here, a later DD TRANSFER would pass conservation — creating DD from nothing. // This is defense-in-depth alongside the ConnectBlock coinbase DD marker rejection. - if (prev_tx->IsCoinBase()) { + if (prev_tx.IsCoinBase()) { LogPrint(BCLog::DIGIDOLLAR, "DigiDollar: ExtractDDAmountFromTxRef - REJECTED coinbase tx %s as DD source (attack vector T5-02)\n", prevout.hash.ToString()); return false; @@ -303,19 +306,19 @@ static bool ExtractDDAmountFromTxRef(const CTransactionRef& prev_tx, const COutP // with a DD-formatted OP_RETURN and zero-value P2TR outputs. A subsequent DD transfer // spending those outputs would pass conservation checks because ExtractDDAmountFromTxRef // would find DD amounts in the non-DD source tx's OP_RETURN — creating DD from nothing. - if (!DigiDollar::HasDigiDollarMarker(*prev_tx)) { + if (!DigiDollar::HasDigiDollarMarker(prev_tx)) { LogPrint(BCLog::DIGIDOLLAR, "DigiDollar: ExtractDDAmountFromTxRef - source tx %s is not a DD transaction (version=0x%08x)\n", - prevout.hash.ToString(), prev_tx->nVersion); + prevout.hash.ToString(), prev_tx.nVersion); return false; } // Parse the OP_RETURN in the previous transaction to get DD amounts. // The transaction version is the authoritative DD type. Reject ambiguous // or mismatched DD metadata so later spends cannot reinterpret outputs. - const DigiDollarTxType versionTxType = DigiDollar::GetDigiDollarTxType(*prev_tx); + const DigiDollarTxType versionTxType = DigiDollar::GetDigiDollarTxType(prev_tx); std::vector dd_amounts; int ddOpReturnCount = 0; - for (const auto& vout : prev_tx->vout) { + for (const auto& vout : prev_tx.vout) { if (vout.scriptPubKey.size() > 0 && vout.scriptPubKey[0] == OP_RETURN) { CScript::const_iterator pc = vout.scriptPubKey.begin(); opcodetype opcode; @@ -395,8 +398,8 @@ static bool ExtractDDAmountFromTxRef(const CTransactionRef& prev_tx, const COutP // Match output index to DD amount // Count P2TR (DD) outputs to find the correct amount index size_t dd_output_idx = 0; - for (uint32_t n = 0; n < prev_tx->vout.size(); ++n) { - const CTxOut& txout = prev_tx->vout[n]; + for (uint32_t n = 0; n < prev_tx.vout.size(); ++n) { + const CTxOut& txout = prev_tx.vout[n]; // Skip non-DD outputs (OP_RETURN, non-zero value) if (txout.scriptPubKey.size() > 0 && txout.scriptPubKey[0] == OP_RETURN) continue; @@ -438,7 +441,7 @@ bool ExtractDDAmountFromPrevTx(const COutPoint& prevout, CAmount& amount) { return false; } - return ExtractDDAmountFromTxRef(prev_tx, prevout, amount); + return ExtractDDAmountFromTransaction(*prev_tx, prevout, amount); } /** @@ -458,7 +461,7 @@ bool ExtractDDAmountFromBlockDb(const COutPoint& prevout, uint32_t coinHeight, return false; } - return ExtractDDAmountFromTxRef(prev_tx, prevout, amount); + return ExtractDDAmountFromTransaction(*prev_tx, prevout, amount); } bool ExtractMintAccountingAmounts(const CTransaction& tx, @@ -874,15 +877,15 @@ CAmount CalculateRequiredCollateral(CAmount ddAmount, int64_t lockTime, // = (10000 * 100000000 * 150 * 100) / 6310 // = 15,000,000,000,000,000 / 6310 // = 2,377,179,080,509 sats = ~23,772 DGB - // Use __int128 to avoid uint64 overflow for large DD amounts (overflows at ~$18K@1000%) - __int128 numerator = static_cast<__int128>(ddAmount) * static_cast<__int128>(COIN) * - static_cast<__int128>(effectiveRatio) * 100; - __int128 denominator = static_cast<__int128>(ctx.oraclePriceMicroUSD); - __int128 result = (numerator + denominator - 1) / denominator; + // Use util::int128_t to avoid uint64 overflow for large DD amounts (overflows at ~$18K@1000%) + util::int128_t numerator = static_cast(ddAmount) * static_cast(COIN) * + static_cast(effectiveRatio) * 100; + util::int128_t denominator = static_cast(ctx.oraclePriceMicroUSD); + util::int128_t result = (numerator + denominator - 1) / denominator; // Fail closed when the economically required collateral is not // representable as a valid DGB amount. Capping at MAX_MONEY would accept // a mint with less collateral than the formula requires. - if (result > static_cast<__int128>(MAX_MONEY)) { + if (result > static_cast(MAX_MONEY)) { return 0; } CAmount requiredDGB = static_cast(result); @@ -941,16 +944,16 @@ bool ValidateCollateralRatio(CAmount dgbLocked, CAmount ddMinted, // Oracle price is in micro-USD (1,000,000 = $1.00), DD is in cents // Convert: (DGB_sats * oracle_micro_usd / COIN) = micro-USD value // Then: micro-USD / 10000 = cents - // Use __int128 to prevent overflow when dgbLocked and oraclePrice are both large - __int128 dgbValueMicroUSD128 = static_cast<__int128>(dgbLocked) * static_cast<__int128>(ctx.oraclePriceMicroUSD); + // Use util::int128_t to prevent overflow when dgbLocked and oraclePrice are both large + util::int128_t dgbValueMicroUSD128 = static_cast(dgbLocked) * static_cast(ctx.oraclePriceMicroUSD); dgbValueMicroUSD128 /= COIN; CAmount dgbValueMicroUSD = (dgbValueMicroUSD128 > std::numeric_limits::max()) ? std::numeric_limits::max() : static_cast(dgbValueMicroUSD128); CAmount dgbValueInCents = dgbValueMicroUSD / 10000; // Convert micro-USD to cents // Clamp before cast to int to avoid overflow with large ratio values - __int128 actualRatio128 = ddMinted > 0 - ? (static_cast<__int128>(dgbValueInCents) * 100) / static_cast<__int128>(ddMinted) + util::int128_t actualRatio128 = ddMinted > 0 + ? (static_cast(dgbValueInCents) * 100) / static_cast(ddMinted) : 0; if (actualRatio128 > 100000) { actualRatio128 = 100000; @@ -2610,14 +2613,14 @@ bool ValidateCollateralReleaseAmount(const CTransaction& tx, // Regular DGB fee inputs are additive funding for fees/change. They must not // reduce the amount of locked collateral the redemption is required to return. - const __int128 maxAllowedDGBOutputs = static_cast<__int128>(allowedRelease) + - static_cast<__int128>(totalFeeInputs); + const util::int128_t maxAllowedDGBOutputs = static_cast(allowedRelease) + + static_cast(totalFeeInputs); LogPrintf("DigiDollar: Collateral release check - totalOutputs: %lld, feeInputs: %lld, allowedCollateral: %lld\n", (long long)totalDGBOutputs, (long long)totalFeeInputs, (long long)allowedRelease); - if (static_cast<__int128>(totalDGBOutputs) > maxAllowedDGBOutputs) { + if (static_cast(totalDGBOutputs) > maxAllowedDGBOutputs) { LogPrintf("DigiDollar: Collateral release too large - outputs: %lld, allowed collateral: %lld, fee inputs: %lld, locked: %lld, ddBurned: %lld, originalDD: %lld\n", (long long)totalDGBOutputs, (long long)allowedRelease, (long long)totalFeeInputs, diff --git a/src/digidollar/validation.h b/src/digidollar/validation.h index c81a22eba9a..2651036256f 100644 --- a/src/digidollar/validation.h +++ b/src/digidollar/validation.h @@ -181,6 +181,14 @@ int FindDDOpReturn(const CTransaction& tx); */ bool ExtractDDAmountFromPrevTx(const COutPoint& prevout, CAmount& amount); +/** Extract the DD amount for an outpoint from an explicitly supplied creating + * transaction. The transaction hash, DD marker, metadata, and output mapping + * are verified; no txindex or local metadata registry is consulted. + */ +bool ExtractDDAmountFromTransaction(const CTransaction& tx, + const COutPoint& prevout, + CAmount& amount); + /** * Extract DD amount from the creating transaction fetched via block database * lookup callback (used when txindex is unavailable). diff --git a/src/init.cpp b/src/init.cpp index de8b10b505c..4ccbe95174e 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -66,7 +66,8 @@ #include #include