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
This commit is contained in:
@@ -339,6 +339,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
memset(zflags,0,sizeof(zflags));
|
||||
if ( pindexLast != 0 )
|
||||
height = (int32_t)pindexLast->GetHeight() + 1;
|
||||
|
||||
if ( ASSETCHAINS_ADAPTIVEPOW > 0 && pindexFirst != 0 && pblock != 0 && height >= (int32_t)(sizeof(ct)/sizeof(*ct)) )
|
||||
{
|
||||
tipdiff = (pblock->nTime - pindexFirst->nTime);
|
||||
@@ -685,7 +686,10 @@ bool CheckEquihashSolution(const CBlockHeader *pblock, const CChainParams& param
|
||||
return true;
|
||||
}
|
||||
|
||||
// Static objects for CheckRandomXSolution
|
||||
int GetRandomXInterval() { return GetArg("-ac_randomx_interval", 1024); }
|
||||
int GetRandomXBlockLag() { return GetArg("-ac_randomx_lag", 64); }
|
||||
|
||||
// Cached RandomX validation state — reused across calls, protected by mutex
|
||||
static std::mutex cs_randomx_validator;
|
||||
static randomx_cache *s_rxCache = nullptr;
|
||||
static randomx_vm *s_rxVM = nullptr;
|
||||
@@ -862,6 +866,7 @@ bool CheckProofOfWork(const CBlockHeader &blkHeader, uint8_t *pubkey33, int32_t
|
||||
if ( HUSH_LOADINGBLOCKS != 0 )
|
||||
return true;
|
||||
|
||||
/*
|
||||
if ( SMART_CHAIN_SYMBOL[0] != 0 || height > 792000 )
|
||||
{
|
||||
if ( Params().NetworkIDString() != "regtest" )
|
||||
@@ -881,6 +886,7 @@ bool CheckProofOfWork(const CBlockHeader &blkHeader, uint8_t *pubkey33, int32_t
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
/*for (i=31; i>=0; i--)
|
||||
fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
|
||||
|
||||
Reference in New Issue
Block a user