{
    "version": "https://jsonfeed.org/version/1.1",
    "title": "Scott Kaleita",
    "home_page_url": "http://13.140.41.106",
    "feed_url": "http://13.140.41.106/feed.json",
    "description": "",
    "authors": [
        {
            "name": "Scott Kaleita",
            "url": "http://13.140.41.106"
        }
    ],
    "language": "en",
    "items": [
        {
            "id": "http://13.140.41.106/blog/building-a-cryptocurrency-from-scratch",
            "url": "http://13.140.41.106/blog/building-a-cryptocurrency-from-scratch",
            "title": "Building a cryptocurrency from scratch",
            "content_html": "<p>Building a proof-of-work coin from scratch teaches you something no tutorial does: how much of a currency is <em>not</em> the cryptography.</p>\n<h2 id=\"where-the-work-actually-goes\">Where the work actually goes <a class=\"anchor\" href=\"#where-the-work-actually-goes\" aria-label=\"Link to this section\">#</a></h2>\n<p>The hashing is the easy part. SHA-256 is a library call. What took months was everything around it.</p>\n<h3 id=\"consensus-and-difficulty\">Consensus and difficulty <a class=\"anchor\" href=\"#consensus-and-difficulty\" aria-label=\"Link to this section\">#</a></h3>\n<p>A chain has to agree with itself. Difficulty adjustment is a feedback loop, and feedback loops overshoot.</p>\n<ul>\n<li>Retarget too often and the difficulty oscillates.</li>\n<li>Retarget too rarely and a hash-rate spike empties the schedule early.</li>\n<li>Clamp the adjustment and you get stability at the cost of responsiveness.</li>\n</ul>\n<h3 id=\"peer-discovery\">Peer discovery <a class=\"anchor\" href=\"#peer-discovery\" aria-label=\"Link to this section\">#</a></h3>\n<p>Nodes have to find each other before they can disagree productively. Seed nodes first, then gossip:</p>\n<pre><code>addr -&gt; version -&gt; verack -&gt; getblocks\n</code></pre>\n<h2 id=\"what-i-would-do-differently\">What I would do differently <a class=\"anchor\" href=\"#what-i-would-do-differently\" aria-label=\"Link to this section\">#</a></h2>\n<p>Start with the network layer, not the block format. The block format is a data structure you can change in an afternoon; the network is a distributed system you will be debugging for weeks.</p>\n<blockquote>\n<p>The chain is not the hard part. The agreement is.</p>\n</blockquote>\n<p>Anyone building one of these should expect the split to be roughly 20% cryptography and 80% distributed-systems plumbing.</p>\n",
            "summary": "What I learned writing XcelR: a proof-of-work chain, its mining and its economics \u2014 and why the cryptography was the easy part.",
            "image": null,
            "date_published": "2026-09-06T01:46:26+00:00",
            "date_modified": "2026-09-13T04:20:38+00:00",
            "tags": [
                "Cryptography",
                "Blockchain",
                "C++"
            ]
        }
    ]
}