Commit Graph

31880 Commits

Author SHA1 Message Date
dan_s
20aeebb83f Fix 7 stale references in docs and comments after codebase restructuring
- doc/DEVELOPING.md: src/main.cpp → src/tx_validation.cpp / block_processing.cpp
- doc/CHANGELOG-randomx-validation.md: src/main.cpp → src/block_processing.cpp (×2)
- doc/release-process.md: checkpoint instructions now reference
  src/chainparams_checkpoints_hush3.h instead of src/chainparams.cpp
- src/hush_defs.h: ./contrib/block_time.pl → ./contrib/scripts/block_time.pl (×3)
- src/cc/dapps/dappstd.c: commented hush_cJSON.c → hush_cJSON.cpp
2026-02-27 14:19:08 -06:00
dan_s
a2647b106f Move 15 loose scripts from contrib/ root to contrib/scripts/
Consolidate all standalone utility scripts into contrib/scripts/:
- Perl: avg_blocktime.pl, block_time.pl, gen-zaddrs.pl, sda_checkpoints.pl,
  sdl_checkpoints.pl, hush_block_subsidy_per_halving, hush_halvings,
  hush_scanner, hush_supply, hush_supply_old
- Shell: fresh_clone_compile_and_run.sh, tidy_datadir.sh, dragonx_scanner
- Python: convert_address.py
- BAT: hush-uri.bat

Update path references in contrib/README.md, doc/OLD_WALLETS.md,
doc/relnotes/README.md, and sdl_checkpoints.pl.
2026-02-27 12:00:46 -06:00
dan_s
ab6a3a05d7 Deduplicate cJSON: consolidate 4 copies into a single canonical pair
- Compile cJSON.c as a standalone C translation unit (added stdbool.h)
- Rename hush_cJSON.c → hush_cJSON.cpp and compile as standalone C++ unit
  with forward declarations for external deps (_stripwhite, clonestr, etc.)
- Remove #include "cJSON.c" unity-build from hush_cJSON
- Change hush.h from #include "hush_cJSON.c" to #include "hush_cJSON.h"
- Add both files to libbitcoin_server_a_SOURCES in Makefile.am
- Delete cc/dapps/cJSON.c (old 2009 fork, 1201 lines removed)
- Replace cc/includes/cJSON.h with thin redirect to canonical headers
- Update dapp includes to reference canonical cJSON.c
2026-02-27 09:39:48 -06:00
dan_s
f565b2920d Split wallet.cpp: extract key management into wallet_keys.cpp
Separate key management from transaction logic in wallet.cpp (5,059 lines):
- wallet.cpp: 5,059 → 4,143 lines (transaction tracking, coin selection, balances)
- wallet_keys.cpp: 975 lines (key generation, encryption, HD seed, keypool)

Extracted functions include key generation (GenerateNewKey, GenerateNewSaplingZKey),
cryptographic key storage (AddKeyPubKey, AddCryptedKey, AddCryptedSaplingSpendingKey),
wallet encryption (Unlock, ChangeWalletPassphrase, EncryptWallet), HD seed management,
keypool operations, CReserveKey methods, and shielded key visitor operators.
2026-02-27 01:51:24 -06:00
dan_s
0083cd26bb Split main.cpp (8,217 lines) into four focused translation units
- tx_validation.cpp (1,012 lines): transaction validation functions
  (IsStandardTx, CheckTransaction, ContextualCheckInputs, etc.)
- mempool_accept.cpp (524 lines): mempool acceptance and orphan management
  (AcceptToMemoryPool, AddOrphanTx, GetMinRelayFee, etc.)
- block_processing.cpp (4,064 lines): block processing, chain management,
  and disk I/O (ConnectBlock, DisconnectBlock, ActivateBestChain, CheckBlock,
  LoadBlockIndex, FlushStateToDisk, etc.)
- main_internal.h (83 lines): shared internal state declarations formerly in
  anonymous namespace (CBlockIndexWorkComparator, setBlockIndexCandidates,
  vinfoBlockFile, setDirtyBlockIndex, etc.)

main.cpp retains NET message handling (ProcessMessage, SendMessages),
peer state management, and utility functions (2,821 lines).
2026-02-27 01:51:24 -06:00
dan_s
a918136a7c Split chainparams.cpp and rpcwallet.cpp into smaller files
chainparams.cpp: 5420 -> 593 lines
  - Extract HUSH3 checkpoint data to chainparams_checkpoints_hush3.h
  - Extract DRAGONX checkpoint data to chainparams_checkpoints_dragonx.h

rpcwallet.cpp: 6392 -> 4099 lines
  - Extract z-index query RPCs to rpcwallet_zindex.cpp
  - Extract shielded async operation RPCs to rpcwallet_zops.cpp
  - Create rpcwallet_internal.h for shared declarations
2026-02-27 01:51:24 -06:00
dan_s
3d4e25e429 Split hush unity build: move ~14k lines of implementation from headers into hush_impl.cpp and hush_nSPV_impl.cpp
- Add HUSH_PRIVATE_IMPLEMENTATION guard to hush.h separating implementation from declarations
- Create hush_impl.cpp to compile all hush_*.h implementation as a separate translation unit
- Create hush_nSPV_impl.cpp to compile all hush_nSPV_*.h headers separately
- main.cpp now includes declarations only, no longer a unity build for hush code
- Add both new compilation units to Makefile.am
2026-02-26 20:55:12 -06:00
dan_s
896fa9c107 Reorganize repo: move scripts to contrib/scripts/, clean up .gitignore, untrack backup files 2026-02-26 19:42:28 -06:00
dan_s
10a1b27de1 reorganizing release ouput to cleaner directory structure 2026-02-25 23:50:14 -06:00
dan_s
3cf6c37bf6 updated dragonx checkpoints 2026-02-25 14:41:10 -06:00
dan_s
b25bd2838c fix native linux build script 2026-02-25 14:09:26 -06:00
dan_s
f5c8e02f24 mac build changes 2026-02-25 13:33:52 -06:00
dan_s
4d001ed7de Fix bootstrap download script 2026-02-23 17:34:12 -06:00
dan_s
5f218fdf7f Changed head -4 to head -3 in both scripts so the version picks up only MAJOR.MINOR.REVISION (3.10.5), dropping BUILD (50).
The BUILD number is an internal field, not part of the user-facing release version.
2026-02-23 12:59:30 -06:00
dan_s
e4e22abf4c Fix Windows shutdown hang and register console ctrl handler
- Remove GenerateBitcoins(false) from stop RPC handler because it calls
  minerThreads->join_all() which blocks the RPC thread, preventing the
  response from being sent back to the client. Miners are already stopped
  in Shutdown() so this was redundant.
- Add ShutdownRequested() checks in miner peer-wait and nonce loops
- Register SetConsoleCtrlHandler on Windows for clean Ctrl+C/close
- Add check_and_clean_target for --linux-release builds
2026-02-23 12:11:55 -06:00
dan_s
70d97d887b fix docker permissions 2026-02-23 08:27:19 -06:00
dan_s
aca38e6636 Fix CheckProofOfWork always returning true, fix hashrate display for RandomX, fix Docker root ownership 2026-02-22 18:10:53 -06:00
dan_s
64e7498942 Add Docker-based Linux release build for Ubuntu 20.04 compatibility 2026-02-22 12:43:30 -06:00
dan_s
e399d62140 change client and min protocol version 2026-02-22 10:01:59 -06:00
dan_s
59be9a4cc0 fixed windows dataset not being shared across threads 2026-02-21 17:46:23 -06:00
dan_s
8a0eb77692 Fix RandomX validation exploit with difficulty reset, improve build system
- One-time difficulty reset to minimum for 17 blocks at activation height
- Separate RandomX build dirs for linux/win64 cross-compilation
- Add build target tracking to auto-clean on target switch
- Automated win64 release packaging to release-win64/
- Add build artifacts to .gitignore
- Miner memory diagnostics and large-page dataset fallback
2026-02-19 22:07:38 -06:00
dan_s
16149aed5a wait for mining threads to fully exit before stopping 2026-02-17 21:19:49 -06:00
dan_s
a983a89f9a TUMIN activation height set to 1200 for testing 2026-02-17 17:35:21 -06:00
dan_s
da278163f0 TestBlockValidity() triggers CheckRandomXSolution() which allocates ~256MB of cache to recompute hash which is redundant since local mining thread would be checking it's own work against itself.
Rather than miner allocating its own dataset, a single shared dataset is allocated and shared accross all threads. This is explicitly supported by RandomX.
2026-02-17 16:43:41 -06:00
dan_s
45dff7fb1b key mismatch between miner and valdiator 2026-02-17 16:43:41 -06:00
dan_s
0da68ebbc7 randomx validation enforcement with activation height 2026-02-17 16:43:41 -06:00
Duke
74d66d8bf2 Merge branch 'dev' 2025-07-06 09:48:13 -04:00
Duke
4def0caf55 Merge branch 'master' into dev 2025-07-06 09:46:04 -04:00
Duke
1faf679a50 Update man pages via ./util/gen-manpages.sh 2025-07-03 12:57:20 -04:00
Duke
3caf605976 -ac_minopreturnfee is in puposhis 2025-06-27 10:46:42 -04:00
Duke
9042a24711 Update relnotes 2025-06-27 10:44:17 -04:00
Duke
a07b38b615 Hush 3.10.4 "Hazy Hākuturi" 2025-06-27 10:20:53 -04:00
Duke
7927965650 Update relnotes 2025-06-27 08:50:18 -04:00
Duke
97470e385d Disallow using -mineraddress and -clearnet=0 at the same time 2025-06-27 05:45:24 -04:00
Duke
7e63e2f013 We call them HACs now 2025-06-27 05:32:12 -04:00
Duke
3b105c0245 Update Dragonx checkpoints to 2241000 2025-06-26 13:42:03 -04:00
Duke
76c97a3bce Update Hush checkpoint to 2241000 2025-06-26 10:21:35 -04:00
Duke
af1ea27eb0 Remove Hush onions from drgx seed list and add fixed seeds to hush list 2025-06-25 10:21:52 -04:00
Duke
13749ab2b7 Add another .onion seed 2025-06-25 06:13:08 -04:00
Duke
2fa83f816d Add some seeds from chainparamsseeds.h to hush_utils.h 2025-06-25 06:09:59 -04:00
Duke
9772ad8e6f Add help doc that documents fixing database corruption 2025-06-09 12:51:25 -04:00
onryo
0d1b5fc83b make seeds 2025-06-08 19:11:04 +02:00
Duke
0a42eb3c1a Don't warn about no nodes to relay to when -testnode=1 2025-05-30 13:50:52 -04:00
duke
70672d02a3 Merge pull request 'z_sendmany_opreturn' (#467) from z_sendmany_opreturn into dev
Reviewed-on: https://git.hush.is/hush/hush3/pulls/467
2025-05-30 08:33:47 -04:00
duke
f220091f16 Fix relnotes formatting 2025-05-29 17:19:40 -04:00
Duke
a520a3e655 Support using non-hex utf8 strings with z_sendmany memo 2025-05-29 15:40:07 -04:00
Duke
cc1c0b30b0 There is now only one opreturn possible in z_sendmany so pull the assignment to opret out of the loop 2025-05-29 15:31:47 -04:00
Duke
38901a073b opreturn is no longer a valid json key in z_sendmany 2025-05-29 15:24:17 -04:00
Duke
a710dd2099 Allow an optional opreturn param 2025-05-29 15:08:40 -04:00
Duke
1a70e754ce Revert "Add new opreturn param for z_sendmany to conversion list"
This reverts commit d6b7fc633f.
2025-05-29 15:08:27 -04:00