- chainparams.cpp: Correct P2P port from 18030 to 21768
- hush_utils.h: Use CRC-based network magic instead of HUSH_MAGIC shortcut
so new standalone binary matches existing network nodes
- hush_utils.h: Remove DragonX-specific hush_block_subsidy() call, use
generic ASSETCHAINS_HALVING logic consistent with mainnet
- hush_utils.h: Fix P2P port override so -port flag works correctly
- main.cpp: Remove blocktime halving code (150s→75s at z2zheight) that
does not apply to DragonX's fixed 36s blocktime
- pow.cpp: Use params.AveragingWindowTimespan() (17*36=612) instead of
standalone AveragingWindowTimespan() which returns HUSH3's 17*75=1275
- 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.
This replaces the hack that was test.sh with a more extensible and less hackish
test script.
To run the tests just run "./test" . By default it shows all RPCs called via
the "--tracerpc" flag. If you want to set custom test flags you can do
TEST_FLAGS="--elite-test-flag --foo" ./test
Currently we are only running lockzins.py and shieldcoinbase_donation.py tests
which are hardcoded. The plan is to allow custom sets of tests to be run with
this script.
Long ago our code actually used gmp directly but that is no longer the case.
Our dependency secp256k1 has an optional dependency on gmp but the way we
configure and compile secp256k1 does not use it. So there is no reason
to download and compile gmp in our build system. This means we no longer
need to maintain three different forks of GMP (one for Darwin, one for Win and
one for Linux that supports gcc15). This also makes downloading and compiling
Hush faster. Joy to the world.