<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Crashproofing bitcoind, the easy and the not-so-easy</title>
	<atom:link href="http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/feed/" rel="self" type="application/rss+xml" />
	<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/</link>
	<description>The search for invariants</description>
	<pubDate>Mon, 13 Apr 2026 18:54:56 +0000</pubDate>
	<generator>http://polimedia.us</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: On the fact that bitcoind fails to implement the Bitcoin protocol &#171; Fixpoint</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-2609</link>
		<dc:creator>On the fact that bitcoind fails to implement the Bitcoin protocol &#171; Fixpoint</dc:creator>
		<pubDate>Sun, 17 Mar 2024 18:24:18 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-2609</guid>
		<description>[...] to be a long completed block collection file,(ii) then the node passed a full readback test using -checkblocks=0 and proceeded with its [...]</description>
		<content:encoded><![CDATA[<p>[...] to be a long completed block collection file,(ii) then the node passed a full readback test using -checkblocks=0 and proceeded with its [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Smartening up gbw-node &#171; Fixpoint</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-2358</link>
		<dc:creator>Smartening up gbw-node &#171; Fixpoint</dc:creator>
		<pubDate>Wed, 05 Apr 2023 01:39:10 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-2358</guid>
		<description>[...] initially recording the genesis block. It's the same for CBlock::AddToBlockIndex. WriteToDisk can now be relied on to commit before returning, and its call comes immediately before the AddToBlockIndex. [...]</description>
		<content:encoded><![CDATA[<p>[...] initially recording the genesis block. It's the same for CBlock::AddToBlockIndex. WriteToDisk can now be relied on to commit before returning, and its call comes immediately before the AddToBlockIndex. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mapping the bitcoind block acceptance code, with bonus patch for index access &#171; Fixpoint</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-2008</link>
		<dc:creator>Mapping the bitcoind block acceptance code, with bonus patch for index access &#171; Fixpoint</dc:creator>
		<pubDate>Tue, 22 Mar 2022 04:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-2008</guid>
		<description>[...] plot thickened when a full run of bitcoind -checkblocks=0 returned successfully. Based on recent work I was under the impression that this was a fairly thorough if not quite exhaustive check of the [...]</description>
		<content:encoded><![CDATA[<p>[...] plot thickened when a full run of bitcoind -checkblocks=0 returned successfully. Based on recent work I was under the impression that this was a fairly thorough if not quite exhaustive check of the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Welsh</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-1915</link>
		<dc:creator>Jacob Welsh</dc:creator>
		<pubDate>Thu, 20 Jan 2022 17:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-1915</guid>
		<description>Cool. 7.4h / 2.3h ~~ 3.2x slowdown for apu1 vs thinkpad; about as expected.</description>
		<content:encoded><![CDATA[<p>Cool. 7.4h / 2.3h ~~ 3.2x slowdown for apu1 vs thinkpad; about as expected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robinson Dorion</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-1914</link>
		<dc:creator>Robinson Dorion</dc:creator>
		<pubDate>Wed, 19 Jan 2022 22:16:27 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-1914</guid>
		<description>I applied the bitcoin_fsync_all_blocks by hand shortly after this was published and the node has been running smoothly since.

For a datapoint, it took about 2.25 hours at current height to check all the blocks. I think the status update every 1k blocks is nice.

&lt;blockquote&gt;
01/18/22 20:51:57 Loading block index...        
01/18/22 20:52:22 LoadBlockIndex(): hashBestChain=0000000000000000000880d32fd1321a69593493cd2b18d654350741bfbd6a55  height=719329
01/18/22 20:52:22  CheckDiskBlocks() at height=719329 ...
01/18/22 20:52:40  CheckDiskBlocks() at height=718329 ...
01/18/22 20:53:00  CheckDiskBlocks() at height=717329 ...
01/18/22 20:53:18  CheckDiskBlocks() at height=716329 ...
01/18/22 20:53:39  CheckDiskBlocks() at height=715329 ...        
01/18/22 20:53:59  CheckDiskBlocks() at height=714329 ... 
01/18/22 20:54:18  CheckDiskBlocks() at height=713329 ...
01/18/22 20:54:36  CheckDiskBlocks() at height=712329 ...
01/18/22 20:54:57  CheckDiskBlocks() at height=711329 ...
01/18/22 20:55:17  CheckDiskBlocks() at height=710329 ...
01/18/22 20:55:37  CheckDiskBlocks() at height=709329 ...

...
          
01/18/22 23:09:27  CheckDiskBlocks() at height=10329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=9329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=8329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=7329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=6329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=5329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=4329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=3329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=2329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=1329 ...
01/18/22 23:09:27  CheckDiskBlocks() at height=329 ...
01/18/22 23:09:27  block index         8249728ms
01/18/22 23:09:27 Loading wallet...
&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>I applied the bitcoin_fsync_all_blocks by hand shortly after this was published and the node has been running smoothly since.</p>
<p>For a datapoint, it took about 2.25 hours at current height to check all the blocks. I think the status update every 1k blocks is nice.</p>
<blockquote><p>
01/18/22 20:51:57 Loading block index...<br />
01/18/22 20:52:22 LoadBlockIndex(): hashBestChain=0000000000000000000880d32fd1321a69593493cd2b18d654350741bfbd6a55  height=719329<br />
01/18/22 20:52:22  CheckDiskBlocks() at height=719329 ...<br />
01/18/22 20:52:40  CheckDiskBlocks() at height=718329 ...<br />
01/18/22 20:53:00  CheckDiskBlocks() at height=717329 ...<br />
01/18/22 20:53:18  CheckDiskBlocks() at height=716329 ...<br />
01/18/22 20:53:39  CheckDiskBlocks() at height=715329 ...<br />
01/18/22 20:53:59  CheckDiskBlocks() at height=714329 ...<br />
01/18/22 20:54:18  CheckDiskBlocks() at height=713329 ...<br />
01/18/22 20:54:36  CheckDiskBlocks() at height=712329 ...<br />
01/18/22 20:54:57  CheckDiskBlocks() at height=711329 ...<br />
01/18/22 20:55:17  CheckDiskBlocks() at height=710329 ...<br />
01/18/22 20:55:37  CheckDiskBlocks() at height=709329 ...</p>
<p>...</p>
<p>01/18/22 23:09:27  CheckDiskBlocks() at height=10329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=9329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=8329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=7329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=6329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=5329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=4329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=3329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=2329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=1329 ...<br />
01/18/22 23:09:27  CheckDiskBlocks() at height=329 ...<br />
01/18/22 23:09:27  block index         8249728ms<br />
01/18/22 23:09:27 Loading wallet...
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Welsh</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-1908</link>
		<dc:creator>Jacob Welsh</dc:creator>
		<pubDate>Tue, 18 Jan 2022 19:27:24 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-1908</guid>
		<description>Updated. Meanwhile I've replaced the flaky apu1 by falling back to what still works for now, refurbing another Thinkpad.</description>
		<content:encoded><![CDATA[<p>Updated. Meanwhile I've replaced the flaky apu1 by falling back to what still works for now, refurbing another Thinkpad.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Welsh</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-1759</link>
		<dc:creator>Jacob Welsh</dc:creator>
		<pubDate>Thu, 09 Dec 2021 02:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-1759</guid>
		<description>&lt;blockquote&gt;Is it something like, checkblocks=0 checks from genesis and checkblocks=600000 checks starting 600k blocks deep ?&lt;/blockquote&gt;

More or less. Technically they did the 'from genesis' part as (brace yourself...)

&lt;blockquote&gt;&lt;pre&gt;
if (nCheckDepth &#60;= 0)
    nCheckDepth = 1000000000; // suffices until the year 19000
&lt;/pre&gt;&lt;/blockquote&gt;

and it works from the most recent block backwards (and still has the off-by-one I noted).

Come to think of it, for the default I'm liking my original 144 if only to emphasize that it's our decision and they aren't the reference or basis for anything. Only reason I checked was so that we don't end up loading the same option with such different behavior that it creates pointless confusion for people switching.</description>
		<content:encoded><![CDATA[<blockquote><p>Is it something like, checkblocks=0 checks from genesis and checkblocks=600000 checks starting 600k blocks deep ?</p></blockquote>
<p>More or less. Technically they did the 'from genesis' part as (brace yourself...)</p>
<blockquote><pre>
if (nCheckDepth &lt;= 0)
    nCheckDepth = 1000000000; // suffices until the year 19000
</pre>
</blockquote>
<p>and it works from the most recent block backwards (and still has the off-by-one I noted).</p>
<p>Come to think of it, for the default I'm liking my original 144 if only to emphasize that it's our decision and they aren't the reference or basis for anything. Only reason I checked was so that we don't end up loading the same option with such different behavior that it creates pointless confusion for people switching.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robinson Dorion</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-1758</link>
		<dc:creator>Robinson Dorion</dc:creator>
		<pubDate>Wed, 08 Dec 2021 22:08:41 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-1758</guid>
		<description>&lt;blockquote&gt;
Nitpick perhaps, but checking from genesis is magic-free; and it's a valuable tool to have for when you're dubious of the whole data set rather than just recent parts, as indeed I was with this flaky machine.
&lt;/blockquote&gt;

Ok, and I agree that it's valuable.

&lt;blockquote&gt;
Does it merely come to mind, or do you mean something more by it? I see what's depicted there as a social failure, a rejection of the actual hierarchy with a hallucinated self-serving alt-hierarchy, quite in the "open sores" tradition where if you don't personally code then you're presumed not to have something to say on the subject.
&lt;/blockquote&gt;

Well, you did say, "What extra information does the user have that would allow him to make a better decision here than the developer?" The point is, there could be A LOT of extra information an active and technically informed operator who doesn't code for his bread has that developer doesn't.

&lt;blockquote&gt;
Basically, that we can't figure out a correct choice up front isn't our failing but does indicate an immature project for not having seen enough useful users yet.
&lt;/blockquote&gt;

So that tells me the adding the optionality is worth it.

&lt;blockquote&gt;
There was more packed in there than just the choice of number though
&lt;/blockquote&gt;

Ah, right. So, they did add in the optionality ? Is it something like, checkblocks=0 checks from genesis and checkblocks=600000 checks starting 600k blocks deep ?</description>
		<content:encoded><![CDATA[<blockquote><p>
Nitpick perhaps, but checking from genesis is magic-free; and it's a valuable tool to have for when you're dubious of the whole data set rather than just recent parts, as indeed I was with this flaky machine.
</p></blockquote>
<p>Ok, and I agree that it's valuable.</p>
<blockquote><p>
Does it merely come to mind, or do you mean something more by it? I see what's depicted there as a social failure, a rejection of the actual hierarchy with a hallucinated self-serving alt-hierarchy, quite in the "open sores" tradition where if you don't personally code then you're presumed not to have something to say on the subject.
</p></blockquote>
<p>Well, you did say, "What extra information does the user have that would allow him to make a better decision here than the developer?" The point is, there could be A LOT of extra information an active and technically informed operator who doesn't code for his bread has that developer doesn't.</p>
<blockquote><p>
Basically, that we can't figure out a correct choice up front isn't our failing but does indicate an immature project for not having seen enough useful users yet.
</p></blockquote>
<p>So that tells me the adding the optionality is worth it.</p>
<blockquote><p>
There was more packed in there than just the choice of number though
</p></blockquote>
<p>Ah, right. So, they did add in the optionality ? Is it something like, checkblocks=0 checks from genesis and checkblocks=600000 checks starting 600k blocks deep ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Welsh</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-1753</link>
		<dc:creator>Jacob Welsh</dc:creator>
		<pubDate>Wed, 08 Dec 2021 20:50:36 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-1753</guid>
		<description>&lt;blockquote&gt;but only having 2 magic number options, a recent check and a check from genesis, also carries a cost and the latter will only grow as the chain lengthens&lt;/blockquote&gt;

Nitpick perhaps, but checking from genesis is magic-free; and it's a valuable tool to have for when you're dubious of the whole data set rather than just recent parts, as indeed I was with this flaky machine.

&lt;blockquote&gt;How long is checkblocks taking at present ?&lt;/blockquote&gt;

It took 7.4 hours for 683071 blocks.

&lt;blockquote&gt;It seems to me that the cost of adding the optionality goes under the cost of inheriting shitcode account in the ledger.&lt;/blockquote&gt;

I could see it.

&lt;blockquote&gt;Re better decision than the developer, this quote comes to mind.&lt;/blockquote&gt;

Does it merely come to mind, or do you mean something more by it? I see what's depicted there as a social failure, a rejection of the actual hierarchy with a hallucinated self-serving alt-hierarchy, quite in the "open sores" tradition where if you don't personally code then you're presumed not to have something to say on the subject.

Possibly closer to the point here are the discussions of optionality in the MP-WP context, most prominently &lt;a href="http://trilema.com/2020/forum-logs-for-27-jan-2020/#2575299" rel="nofollow"&gt;here&lt;/a&gt;. Basically, that we can't figure out a correct choice up front isn't our failing but does indicate an immature project for not having seen enough useful users yet.

&lt;blockquote&gt;the default is 288. Perhaps that's the way to go.&lt;/blockquote&gt;

There was more packed in there than just the choice of number though - for instance the 0 meaning "check all", and the break in meaning e.g. where -checkblocks=1 previously meant "all" and now means "minimum". I don't think it's a problem tbh, especially since no prior mention in the help. Just want to confirm we're on the same page tho.</description>
		<content:encoded><![CDATA[<blockquote><p>but only having 2 magic number options, a recent check and a check from genesis, also carries a cost and the latter will only grow as the chain lengthens</p></blockquote>
<p>Nitpick perhaps, but checking from genesis is magic-free; and it's a valuable tool to have for when you're dubious of the whole data set rather than just recent parts, as indeed I was with this flaky machine.</p>
<blockquote><p>How long is checkblocks taking at present ?</p></blockquote>
<p>It took 7.4 hours for 683071 blocks.</p>
<blockquote><p>It seems to me that the cost of adding the optionality goes under the cost of inheriting shitcode account in the ledger.</p></blockquote>
<p>I could see it.</p>
<blockquote><p>Re better decision than the developer, this quote comes to mind.</p></blockquote>
<p>Does it merely come to mind, or do you mean something more by it? I see what's depicted there as a social failure, a rejection of the actual hierarchy with a hallucinated self-serving alt-hierarchy, quite in the "open sores" tradition where if you don't personally code then you're presumed not to have something to say on the subject.</p>
<p>Possibly closer to the point here are the discussions of optionality in the MP-WP context, most prominently <a href="http://trilema.com/2020/forum-logs-for-27-jan-2020/#2575299" rel="nofollow">here</a>. Basically, that we can't figure out a correct choice up front isn't our failing but does indicate an immature project for not having seen enough useful users yet.</p>
<blockquote><p>the default is 288. Perhaps that's the way to go.</p></blockquote>
<p>There was more packed in there than just the choice of number though - for instance the 0 meaning "check all", and the break in meaning e.g. where -checkblocks=1 previously meant "all" and now means "minimum". I don't think it's a problem tbh, especially since no prior mention in the help. Just want to confirm we're on the same page tho.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robinson Dorion</title>
		<link>http://jfxpt.com/2021/crashproofing-bitcoind-the-easy-and-the-not-so-easy/#comment-1747</link>
		<dc:creator>Robinson Dorion</dc:creator>
		<pubDate>Wed, 08 Dec 2021 18:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://fixpoint.welshcomputing.com/?p=164#comment-1747</guid>
		<description>&lt;blockquote&gt;
Well, if there's a case to be made against it I'm certainly open to hearing, though I can't imagine what it would be in light of the consequences illustrated here, and I wasn't asking for one.
&lt;/blockquote&gt;

Alright, I don't have a case against.

&lt;blockquote&gt;
Indeed I'd say instead that the "every 500 blocks" was a (defective) software solution for a hardware performance problem.
&lt;/blockquote&gt;

Yeah, I can see it.

&lt;blockquote&gt;
Possible future events have the pesky property of not being constrained by past observations, but I don't think that's a concern here.
&lt;/blockquote&gt;

True.

&lt;blockquote&gt;
The question is "how many blocks deep might some data have gotten corrupted without our noticing the first time for whatever reason"; my argument for keeping it something greater than one is the unknown of what those reasons might be.
&lt;/blockquote&gt;

Right, I follow that.

Alright, I wasn't aware of the implementation details on checkblocks, thanks for clarifying. I agree that adding optionality isn't free, but only having 2 magic number options, a recent check and a check from genesis, also carries a cost and the latter will only grow as the chain lengthens. How long is checkblocks taking at present ? It seems to me that the cost of adding the optionality goes under the cost of inheriting shitcode account in the ledger.

&lt;blockquote&gt;
In this case it seems possibly more of a deflection of responsibility. What extra information does the user have that would allow him to make a better decision here than the developer? "His level of tolerance for this narrow species of unknown risks" I suppose. There's some kind of balancing act here.
&lt;/blockquote&gt;

Re better decision than the developer, &lt;a href="http://trilema.com/2013/people-bitcoin-is-not-worth-100-dollars-per-stop-buying/?b=First%20off,&#38;e=but%20let%20us%20indulge#select" rel="nofollow"&gt;this quote&lt;/a&gt; comes to mind. 

The questions are, is boxing the operator into check recent or check from genesis a legitmate responsibility of the developer ? Or is it the responsibility of the developer to slowly chip away at removing magic numbers from the code ?

That's how I'm seeing it at least.

&lt;blockquote&gt;
the default is 288. Perhaps that's the way to go.
&lt;/blockquote&gt;

Ok.</description>
		<content:encoded><![CDATA[<blockquote><p>
Well, if there's a case to be made against it I'm certainly open to hearing, though I can't imagine what it would be in light of the consequences illustrated here, and I wasn't asking for one.
</p></blockquote>
<p>Alright, I don't have a case against.</p>
<blockquote><p>
Indeed I'd say instead that the "every 500 blocks" was a (defective) software solution for a hardware performance problem.
</p></blockquote>
<p>Yeah, I can see it.</p>
<blockquote><p>
Possible future events have the pesky property of not being constrained by past observations, but I don't think that's a concern here.
</p></blockquote>
<p>True.</p>
<blockquote><p>
The question is "how many blocks deep might some data have gotten corrupted without our noticing the first time for whatever reason"; my argument for keeping it something greater than one is the unknown of what those reasons might be.
</p></blockquote>
<p>Right, I follow that.</p>
<p>Alright, I wasn't aware of the implementation details on checkblocks, thanks for clarifying. I agree that adding optionality isn't free, but only having 2 magic number options, a recent check and a check from genesis, also carries a cost and the latter will only grow as the chain lengthens. How long is checkblocks taking at present ? It seems to me that the cost of adding the optionality goes under the cost of inheriting shitcode account in the ledger.</p>
<blockquote><p>
In this case it seems possibly more of a deflection of responsibility. What extra information does the user have that would allow him to make a better decision here than the developer? "His level of tolerance for this narrow species of unknown risks" I suppose. There's some kind of balancing act here.
</p></blockquote>
<p>Re better decision than the developer, <a href="http://trilema.com/2013/people-bitcoin-is-not-worth-100-dollars-per-stop-buying/?b=First%20off,&amp;e=but%20let%20us%20indulge#select" rel="nofollow">this quote</a> comes to mind. </p>
<p>The questions are, is boxing the operator into check recent or check from genesis a legitmate responsibility of the developer ? Or is it the responsibility of the developer to slowly chip away at removing magic numbers from the code ?</p>
<p>That's how I'm seeing it at least.</p>
<blockquote><p>
the default is 288. Perhaps that's the way to go.
</p></blockquote>
<p>Ok.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
