
Bitcoin Core 28.0rc1: Troubleshooting Slow…
Bitcoin Core developers and users have recently encountered a significant issue with the latest release candidate, version 28.0rc1. When synchronizing the blockchain, users on Windows 10 have observed a drastic slowdown beyond block 120,000. This differs markedly from the stable version 27.0, leading to widespread curiosity and concern.
Performance Disparity: Version 27.0 vs. 28.0rc1
To quantify the performance differences, ten separate runs were conducted, alternating between versions 27.0 and 28.0rc1. The results were eye-opening:
- Version 27.0: Time to synchronize to block 300,000: 695 seconds
- Version 28.0rc1: Time to synchronize to block 300,000: 2760 seconds
The stark contrast in performance raises questions about what changes could be responsible for this disparity and why the new release candidate is struggling on Windows 10.
Default Settings and Exclusion Criteria
Both versions were tested using the default settings:
- dbcache: 450
- pruning: disabled
Additionally, the performance issue does not appear when running the pre-built Linux binary in Windows Subsystem for Linux (WSL), suggesting the slowdown is specifically tied to the Windows environment.
Investigative Threads and Potential Culprits
Exploring #28280
One of the early hypotheses considered Pull Request #28280 as a potential culprit. This PR was scrutinized carefully. Prior benchmarks on #28280 did not indicate a significant performance impact. As commented:
“From the results, it definitely seems that PR is not to blame and the regression happened later.”
The #30326 Suspect
Attention then shifted to Pull Request #30326. This PR involved try_emplace, a function that seems to do additional work compared to a simple find. Here’s the rationale for its suspicion:
“try_emplace must be doing more work than just find and is only called after blocks stop being full because previous coins are now being looked up to be spent.”
A relevant StackOverflow discussion further supports this hypothesis, noting that performance of emplace could be inferior to performing a check followed by emplace (read more here). However, as sipa commented:
“@andrewtoth, I cannot imagine that causing a 5x slowdown, though.”
Bisection and Further Steps
To conclusively identify the performance regression, a systematic bisecting method will be employed. While bisecting between hundreds of commits will be time-intensive, it remains the best approach to pinpoint the exact change causing this performance issue.
Users and contributors suspecting other commits or PRs that could contribute to the slowdown are encouraged to share their insights. This collaborative effort could expedite resolving this critical bug, ensuring that Bitcoin Core remains a robust and efficient implementation.
Conclusion
While Bitcoin Core 28.0rc1 brings many advancements and features, it currently suffers from a significant synchronization slowdown on Windows 10 beyond block 120,000. Linux versions running under WSL do not exhibit this issue, suggesting a platform-specific problem. Through collaborative efforts and systematic investigation, the broader Bitcoin community can look forward to a resolution, ensuring the smooth operation of Bitcoin nodes across all supported platforms.
Category: Bitcoin