3 suggestions
Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.
Optional improvements
[suggestion] · testblockvalidity_script_cache misses zero-worker cache publication
testblockvalidity_script_cache uses two workers in ordinary unit runs, so it does not exercise the zero-worker change that prevents caching a valid parent before a later transaction's script failure.
Location: src/test/txvalidationcache_tests.cpp:373 (head).
Details and suggested fix
The fixture inherits worker_threads_num = EnableFuzzDeterminism() ? 0 : 2, with no TestOpts override. Previously, the zero-worker path cached parent immediately, before bad_child failed, whereas the worker path never populated the full-script cache. Thus the negative-cache assertions would already pass in the current two-worker setup; only the valid-block assertions distinguish its old behavior. Add a worker-count option to the fixture and run the existing invalid-then-valid assertions with both 0 and 2 workers.
[suggestion] · CheckInputScripts exposes an unused cacheSigStore=false mode
After removing the block caller, every CheckInputScripts call passes cacheSigStore=true, leaving an unused mode and an unnecessary boolean beside cacheFullScriptStore.
Location: src/validation.cpp:2110 (head).
Details and suggested fix
PolicyScriptChecks passes true, false for signature-cache and full-script-cache storage, while CheckInputsFromMempoolAndCache passes true, true. The test callers also always enable signature caching, and the function only forwards this argument to CScriptCheck. Drop cacheSigStore, use /*cacheIn=*/true internally, and update the cache comment. Leave the constructor's option intact because ConnectBlock still needs retention controlled by fJustCheck.
[suggestion] · Cache-publication assertions arrive after an independent cleanup
e31ae7576483 changes TestBlockValidity cache population, but testblockvalidity_script_cache arrives two commits later, after an independent pvChecks cleanup; the final tree already contains the test.
Location: src/test/txvalidationcache_tests.cpp:373 at 0f4d6fa6aadb (commit) (commit).
Details and suggested fix
Move 0f4d6fa6aadb025c9d63dff258143a7c5f7386f6 (the cache test) immediately after e31ae7576483cb009f5f77011f3b463c37f05a5d (queue unification and the cache-population change), ahead of 03e50c172e640826dba42bcec1a5df8995499083 (the pvChecks cleanup). The test uses GetScriptCacheEntry, TestBlockValidity, GetBlockScriptFlags and fixture helpers already available at the behavior commit, so it does not depend on the cleanup. This places the new publication rule beside its assertions while keeping the test commit separate and leaving the final tree unchanged. Keep it after the behavior change: its valid-block cache assertions would fail with the previous worker-path behavior.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Preserve fail-fast behavior when there are no workers
- [suggestion]: Block validation duplicates script-check construction (earlier report)
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
Historical objections focused on preventing uncommitted validation context from contaminating cached results. Reviewers questioned reliance on mempool-provided coins and the possibility of future script checks using coin height. The author reported adding prevout-data checks and restricting CScriptCheck inputs to scriptPubKey and value.
These discussions explain why sharing results between validation contexts requires identical committed inputs, rather than identical execution schedules. They do not establish a requirement that worker configurations have different cache-population behavior.