intermittent feature_assumeutxo.py failures were a race with -fastprune 64 KiB blockfiles,
the normal chainstate can fill blk00000.dat and roll to blk00002.dat while the snapshot chainstate writes blk00001.dat before -stopatheight trips...The test now only asserts that both chainstates wrote to disk blk00000 and blk00001, tolerates blk00002.dat when it appears, and logs it. Behavior is unchanged; we just stop failing on a benign rollover..
i believe this should fix #33635
test: fix intermittent feature blockfile assertion #34494
pull b-l-u-e wants to merge 1 commits into bitcoin:master from b-l-u-e:test-fix-intermittent-feature-assumeutxo changing 1 files +6 −1-
b-l-u-e commented at 8:20 PM on February 3, 2026: contributor
- DrahtBot added the label Tests on Feb 3, 2026
-
DrahtBot commented at 8:21 PM on February 3, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK Bortlesboat If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
- DrahtBot added the label CI failed on Feb 3, 2026
- DrahtBot removed the label CI failed on Feb 4, 2026
-
b587979e57
test: fix intermittent feature blockfile assertion
Signed-off-by: b-l-u-e <winnie.gitau282@gmail.com>
- b-l-u-e force-pushed on Feb 18, 2026
- b-l-u-e marked this as ready for review on Feb 18, 2026
-
maflcko commented at 5:40 PM on March 3, 2026: member
Was this LLM generated? What are the steps to test this? What is the output before and after the changes here?
-
b-l-u-e commented at 3:30 PM on March 5, 2026: contributor
Was this LLM generated? What are the steps to test this? What is the output before and after the changes here?
I used claude to help with the analysis.
I couldn’t reliably reproduce the error locally each block takes many more milliseconds, so the node hits -stopatheight=359 and stops before the NORMAL chainstate fills blk00000.dat and rolls into blk00002.dat. In CI, blocks are processed much faster, so the NORMAL chainstate can create blk00002.dat before the node shuts down, which triggers the failure.
Log timestamps from CI failure vs local environment:
feature_assumeutxo_265 From node1 debug.log and test_framework.log:
18:56:47.996– stopatheight=359 node starts18:56:48.382– Leaving block file 0 (onto 2) blk00002 is created18:56:48.791– Node stops so blk00002 is created before the node stops roughly ~0.4 s from start to blk00002. When the test checks, it sees 3 blockfiles hence assertion fails.assumeutxo/run_1/test_runner_₿_🏃_20260305_174948/feature_assumeutxo_0/ From node1 debug.log and test_framework.log:
15:12:02.310– stopatheight=359 node starts15:12:17.767– Node stopped -> stopatheight hit; test checks blockfiles here leds to 2 files15:12:28.194– Leaving block file 0 (onto 2) (in node1’s debug.log, after we’ve already restarted node1) so Node stops before blk00002 is created. The roll to blk00002 happens later during the restarted node’s background validation. Test sees only 2 files no assertion fails. -
b-l-u-e commented at 3:37 PM on March 5, 2026: contributor
Not sure if solution is ideal...it’s a bit non-deterministic.
-
Bortlesboat commented at 6:10 PM on March 6, 2026: none
utACK b587979e57
The race between background chainstate and shutdown with -fastprune makes the third blockfile non-deterministic. Replacing the hard assertion with a log message fixes the flake while still verifying both chainstates wrote to disk.
-
sedited commented at 4:52 PM on March 8, 2026: contributor
I don't understand this patch, it seems to just log something instead of actually testing a condition. Maybe this should be closed.
-
b-l-u-e commented at 6:03 PM on March 8, 2026: contributor
I don't understand this patch, it seems to just log something instead of actually testing a condition. Maybe this should be closed.
The patch still tests that both chainstates wrote to disk with assert that blk00000.dat and blk00001.dat exist. The only change is that it no longer assert the absence of blk00002.dat coz with 64 KiB blockfiles the normal chainstate can roll to a third file before -stopatheight triggers and that’s valid so when that happens just logs it.
-
maflcko commented at 2:52 PM on March 18, 2026: member
Yeah, this is ai slop
- maflcko closed this on Mar 18, 2026
-
maflcko commented at 4:10 PM on March 18, 2026: member
@Bortlesboat Are you an LLM bot?
-
Bortlesboat commented at 4:27 PM on March 18, 2026: none
@Bortlesboat Are you an LLM bot?
I am not .... happy to provide my LinkedIn or whatever else to make verify. I apologize if my posting seems spammy or bot like. I do use Claude to help me learn , but I have been using bitcoin since 2014 and genuinely just want to make contributions.
If my posting is breaking rules or a hindrance in anyway , please let me know how to best correct and I'll listen. Hoping to learn and be helpful
-
maflcko commented at 5:30 AM on March 19, 2026: member
I guess you are free to use an LLM agent yourself. In any case, without critical thinking, there is no value in that itself.
If there was any value in creating a pull request with an LLM agent (in this case to effectively removing a test, without removing the code, which is doubly wrong), and then having the same LLM agent approve it, we could just spin up the two LLM agents ourselves.
- b-l-u-e deleted the branch on Mar 20, 2026