IBD/sync speedups: parallel RandomX pre-verify, adaptive dbcache, P2P download fixes
- Parallel RandomX PoW pre-verification pool (CCheckQueue) run ahead of the serial connect; consensus-neutral (inline CheckRandomXSolution fallback still verifies anything not pre-verified). New -randomxverifythreads (default = -par). - Adaptive dbcache: default sizes the UTXO/coins cache to most of RAM and shrinks under memory pressure, always leaving a reserve free; -dbcache pins a fixed value. - P2P block download: bounded socket recv-drain loop (tlsmanager); frontier-block reassignment to break head-of-line stalls (-blockreassigntimeout); ProcessGetData serves a bounded batch of blocks per pass instead of one (fixes the serve-side one-block-per-tick throttle that caps download network-wide). - assumeutxo: dumptxoutset RPC + LoadSnapshot machinery + AssumeutxoData chainparams. - Signed bootstrap verification (util/bootstrap-dragonx.sh, util/sign-bootstrap.md). - gtest: RandomX pre-verify consensus-equivalence test + UTXO-snapshot round-trip; revived the gtest harness (Makefile.am include fix, Makefile.gtest.include). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,17 @@ public:
|
||||
double fTransactionsPerDay;
|
||||
};
|
||||
|
||||
/** Trusted UTXO-snapshot (assumeutxo-style) anchor. When `hash` is set, a node loading a
|
||||
* snapshot via -loadutxosnapshot must produce exactly this content hash at this height,
|
||||
* otherwise the snapshot is refused. Null hash = not configured (loading requires the
|
||||
* explicit -loadutxosnapshotunsafe override, e.g. for regtest/testing). Mirrors the
|
||||
* hardcoded-checkpoint trust model. */
|
||||
struct AssumeutxoData {
|
||||
int height;
|
||||
uint256 hash;
|
||||
bool IsNull() const { return hash.IsNull(); }
|
||||
};
|
||||
|
||||
enum Bech32Type {
|
||||
SAPLING_PAYMENT_ADDRESS,
|
||||
SAPLING_FULL_VIEWING_KEY,
|
||||
@@ -105,6 +116,7 @@ public:
|
||||
const std::string& Bech32HRP(Bech32Type type) const { return bech32HRPs[type]; }
|
||||
const std::vector<uint8_t>& FixedSeeds() const { return vFixedSeeds; }
|
||||
const CCheckpointData& Checkpoints() const { return checkpointData; }
|
||||
const AssumeutxoData& Assumeutxo() const { return assumeutxoData; }
|
||||
/** Return the founder's reward address and script for a given block height */
|
||||
std::string GetFoundersRewardAddressAtHeight(int height) const;
|
||||
CScript GetFoundersRewardScriptAtHeight(int height) const;
|
||||
@@ -144,6 +156,7 @@ protected:
|
||||
bool fMineBlocksOnDemand = false;
|
||||
bool fTestnetToBeDeprecatedFieldRPC = false;
|
||||
CCheckpointData checkpointData;
|
||||
AssumeutxoData assumeutxoData; // null by default; set per-network in chainparams.cpp once a snapshot hash is published
|
||||
std::vector<std::string> vFoundersRewardAddress;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user