Skip to content

Dobbscoin Core v0.13.4

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Aug 22:19
6198e13

Dobbscoin Core v0.13.4

Startup is dramatically faster

Loading the block index no longer recomputes the scrypt proof-of-work hash for
every block. On a chain of ~1.89M blocks this cut startup from 9-14 minutes to
under 20 seconds
on every machine we measured.

This affects the graphical wallet (dobbscoin-qt) as much as the daemon, so if
opening your wallet has been taking many minutes, this release is the fix.

Node Before After
Server A 13 min 54 s 20 s
Server B 9 min 15 s 15 s
Server C 9 min 17 s 15 s

Upgrading

Replace the binary and restart. No reindex, no resync, no datadir changes.
Your existing block data and wallet are used as-is.

Technical detail

CBlockTreeDB::LoadBlockIndexGuts() called
CheckProofOfWork(pindexNew->GetBlockHeader().GetPoWHash(), ...) once per block
index entry. GetPoWHash() recomputes the memory-hard scrypt hash and nothing
caches it, so the cost scaled linearly with chain length and was paid on every
single start.

Upstream Bitcoin performs this check with the cached block hash, making it
free; this fork substituted the PoW hash, turning a no-op into the dominant
startup cost.

Removing it is safe and does not change consensus: the block index only ever
contains blocks that were already fully validated when first accepted, so the
check could not affect which blocks a node accepts. It guarded only against
local corruption of the index database, which LevelDB already detects with
per-record CRC32 checksums.

Note for future maintainers: do not "restore" this check by passing
GetBlockHash() to match upstream. On a scrypt chain the block hash and the
PoW hash are different values, so that form fails on every block and the
daemon will not start.