Page MenuHomePhabricator

validation: don't clear cache on periodic flush
ClosedPublic

Authored by PiRK on Sep 9 2025, 11:08.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC02e5b148b44f: validation: don't clear cache on periodic flush
Summary

Since core#17487 (D16162) we no longer need to clear the coins cache when syncing to disk. A warm coins cache significantly speeds up block connection, and only needs to be fully flushed when nearing the dbcache limit.

Periodic flushes occur every 24 hours, which empties the cache and causes block connection to slow down. By keeping the cache through periodic flushes a node can run for several days with an increasingly hotter cache and connect blocks much more quickly. Now not only can setting a higher dbcache value be beneficial for IBD, it can also be beneficial for connecting blocks faster.

This is a backport of core#28233

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable