Commit Graph

24603 Commits

Author SHA1 Message Date
85c8d7f7dd Rebrand hush3 to DragonX and share RandomX dataset across mining threads
Minimal rebrand (see compliant-rebrand branch for full rebrand):
- Rename binaries: hushd/hush-cli/hush-tx → dragonxd/dragonx-cli/dragonx-tx
- Default to DRAGONX chain params without -ac_* flags (randomx, blocktime=36, private=1)
- Update configure.ac: AC_INIT([DragonX],[1.0.0])
- Update client version string and user-agent to /DragonX:1.0.0/
- Add chainparams.cpp with DRAGONX network parameters
- Update build.sh, miner.cpp, pow.cpp for DragonX
- Add bootstrap-dragonx.sh utility script
- Update .gitignore for release directory

Share single RandomX dataset across all mining threads:
- Add RandomXDatasetManager with readers-writer lock, reducing RAM from
  ~2GB per thread to ~2GB total plus ~2MB per thread for the VM scratchpad
- Add LogProcessMemory() diagnostic helper for Linux and Windows
2026-03-04 18:42:42 -06:00
d6ba1aed4e Fix RandomX validation exploit: verify nSolution contains valid RandomX hash
- Add CheckRandomXSolution() to validate RandomX PoW in nSolution field
- Add ASSETCHAINS_RANDOMX_VALIDATION activation height per chain
  (DRAGONX: 2838976, TUMIN: 1200, others: height 1)
- Add CRandomXInput serializer for deterministic RandomX hash input
- Fix CheckProofOfWork() to properly reject invalid PoW (was missing
  SMART_CHAIN_SYMBOL check, allowing bypass)
- Call CheckRandomXSolution() in hush_checkPOW and CheckBlockHeader

Without this fix, attackers could submit blocks with invalid RandomX
hashes that passed validation, as CheckProofOfWork returned early
during block loading and the nSolution field was never verified.
2026-03-03 17:28:49 -06:00
Duke
f8136f5839 DragonX has left the nest 2026-02-28 12:12:45 -05:00
Duke
8e6cf9759d Revert "Bump protocol version"
This reverts commit bdb197278d.
2026-02-18 09:13:48 -05:00
Duke
bdb197278d Bump protocol version 2026-02-17 20:40:03 -05:00
duke
f26f27656a Set a mainnet donation zaddr for z_shieldcoinbase 2026-02-11 11:11:50 -05:00
fekt
cf9bacf4e7 Update Hush checkpoints to 2493000 2026-02-11 02:13:27 +00:00
fekt
008f80bbd9 Bump version and protocol version 2026-02-11 01:28:06 +00:00
Duke
3a8ffe4cff Reject proofs of work that do not match claimed amount 2026-02-02 18:52:43 -05:00
Duke
82cad1f90b Remove unused code 2026-01-01 15:24:57 -05:00
Duke
1001fa2e5d Remove some sprout-specific tests 2026-01-01 15:24:57 -05:00
Duke
38c1251ab6 Remove unused code 2025-12-30 23:11:12 -05:00
Duke
523444f934 Remove unused code 2025-12-30 22:40:34 -05:00
Duke
ffa1378725 We do not need to check for sprout-related bugs in sodium since we do not use these functions #480 2025-12-30 16:43:13 -05:00
Duke
7a029528b7 Remove unused sprout test code that uses libsodium functions that we no longer use 2025-12-30 16:38:42 -05:00
Duke
2b8c68a7aa Remove unused code 2025-12-30 16:15:24 -05:00
Duke
44f096fd79 Merge remote-tracking branch 'origin/danger' into dev
Conflicts:
	util/build.sh
2025-12-30 03:46:08 -05:00
Duke
c1c5da11bd CXXFLAGS 2025-12-30 02:59:40 -05:00
Duke
efbaff9d89 Wolfssl uses a typedef called 'byte' which is no longer allowed in gcc15 2025-12-30 02:37:40 -05:00
Duke
79230c41ab CFLAGS 2025-12-30 01:54:09 -05:00
Duke
8dc516e82f Use -std=gnu17 to compile wolfssl and use all cores to compile 2025-12-29 22:35:22 -05:00
Duke
09f61c2959 Remove unnecessary code that gcc 15 complains about 2025-12-29 19:47:20 -05:00
Duke
e9b185f702 Allow custom compiler via environment variable for src/cc
The build system supports using CC to control the C compiler
and CXX to control the c++ compiler used but src/cc was hardcoded
to use the binary "gcc". Now it respects the custom value of
$CC environment variable if it exists.
2025-12-29 19:19:18 -05:00
Duke
874e89e4f0 Only validate donation zaddrs if donating 2025-12-25 12:08:06 -05:00
Duke
2fd88b65e3 Be clear that 0 and 10 are included as valid donation percentages 2025-12-25 12:07:59 -05:00
duke
529e76d01c Merge pull request 'Sync danger to dev' (#479) from danger into dev
Reviewed-on: https://git.hush.is/hush/hush3/pulls/479
2025-12-25 12:02:58 -05:00
Duke
867ba4159b Avoid ASMap Health Checks if ac_clearnet=0 #475 2025-10-26 09:13:44 -04:00
Duke
5ecd7629ec Make error message more general for any chain 2025-10-26 09:11:07 -04:00
Duke
9177a51b6d Remove getbalance64 #473 2025-10-16 11:14:01 -04:00
Duke
d206f28ae1 Update z_shieldcoinbase rpc docs 2025-10-16 01:10:46 -04:00
Duke
6435cd51a6 Use static_cast when calculating donation and add some debugging 2025-10-15 13:24:08 -04:00
Duke
42a676d277 Make the shieldcoinbase donation test pass 2025-10-14 12:20:35 -04:00
Duke
ebde772ada WIP donation test 2025-10-14 11:52:05 -04:00
Duke
606b28d6ca Improve rpc errors and docs 2025-10-14 11:00:08 -04:00
Duke
caf7178ffd Allow donation=0 2025-10-14 10:57:40 -04:00
Duke
c3b9b09144 Make rpc error correct for all chains 2025-10-14 03:58:00 -04:00
Duke
23ef00cfd7 WIP donation test 2025-10-13 18:21:51 -04:00
Duke
1f50e635a0 WIP donation 2025-10-13 15:27:30 -04:00
Duke
c078d1606d Merge remote-tracking branch 'origin/dev' into danger 2025-10-13 15:08:19 -04:00
Duke
02a26751bb WIP donation 2025-10-13 15:06:42 -04:00
duke
f43b0f3270 Merge pull request 'Lock sapling input notes (zins) in z_sendmany' (#465) from lockzins into dev
Reviewed-on: https://git.hush.is/hush/hush3/pulls/465
2025-10-13 14:19:21 -04:00
Duke
cb81fc3b95 Less noise unless -debug is used 2025-09-24 09:30:33 -04:00
Duke
e421dfc6a5 Improve rpc docs of z_listlockunspent 2025-08-23 06:17:32 -04:00
Duke
aa69b87505 These are unrelated to ztxs and should be -debug 2025-08-22 21:21:15 -04:00
Duke
04ec2be8c8 Add fullyNotified to getblockchaininfo and use it in tests 2025-08-22 13:17:36 -04:00
Duke
34829af017 Avoid coredump if witness index does not exist 2025-08-22 07:34:11 -04:00
Duke
fb7d669f14 Remove commented out code 2025-08-22 07:09:15 -04:00
Duke
7e3ce02d87 Bring back sorting notes descending by value which was in find_unspent_notes() 2025-08-22 06:16:25 -04:00
Duke
ae170e9899 Spendable notes are now locked and 1159 seems to be an irrelevant upstream issue 2025-08-22 05:43:21 -04:00
Duke
90f00ac8a4 cleanup 2025-08-21 17:05:16 -04:00