Remove assumeutxo / UTXO-snapshot feature
Removes the dumptxoutset RPC, -loadutxosnapshot / -loadutxosnapshotunsafe, the CCoinsViewDB Dump/LoadSnapshot machinery + CUTXOSnapshotHeader, the AssumeutxoData chainparams anchor, the LoadSnapshotChainstate activation + reorg-below-H guard, the persisted assumeutxo-height flag, and the gtest. Rationale: it duplicated the existing bootstrap (same skip-the-genesis-grind fast-sync, no speed advantage), its only real edge was a trust model we don't need for this chain, and it was inert anyway (no published snapshot hash in chainparams). The -loadutxosnapshot load path adopted an external UTXO set and bypassed genesis validation, so removing it also drops that attack surface. Builds clean (no dangling references); the kept IBD speedups (RandomX pre-verify, adaptive dbcache, tlsmanager) are untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,17 +69,6 @@ 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,
|
||||
@@ -116,7 +105,6 @@ 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;
|
||||
@@ -156,7 +144,6 @@ 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