<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Erigon Blog]]></title><description><![CDATA[Erigon]]></description><link>https://erigon.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!tCuu!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Ferigon.substack.com%2Fimg%2Fsubstack.png</url><title>Erigon Blog</title><link>https://erigon.substack.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 11 Apr 2026 22:36:51 GMT</lastBuildDate><atom:link href="https://erigon.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Alex Sharp]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[erigon@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[erigon@substack.com]]></itunes:email><itunes:name><![CDATA[Alex Sharp]]></itunes:name></itunes:owner><itunes:author><![CDATA[Alex Sharp]]></itunes:author><googleplay:owner><![CDATA[erigon@substack.com]]></googleplay:owner><googleplay:email><![CDATA[erigon@substack.com]]></googleplay:email><googleplay:author><![CDATA[Alex Sharp]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Erigon 3, Alpha 2: Introducing blazingly fast sync on archive nodes with OtterSync and other improvements]]></title><description><![CDATA[During the past 2 weeks, after the release of the first alpha release of Erigon 3, the team has been hard at work to fix bugs, improve performance and coming up with new ideas to improve user experience for people looking to run Ethereum nodes at home.]]></description><link>https://erigon.substack.com/p/erigon-3-alpha-2-introducing-blazingly</link><guid isPermaLink="false">https://erigon.substack.com/p/erigon-3-alpha-2-introducing-blazingly</guid><dc:creator><![CDATA[Giulio Rebuffo🦦🪱🐛🦈]]></dc:creator><pubDate>Tue, 06 Aug 2024 18:34:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6Wbr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>During the past 2 weeks, after the release of the first alpha release of Erigon 3, the team has been hard at work to fix bugs, improve performance and coming up with new ideas to improve user experience for people looking to run Ethereum nodes at home. And in these two weeks, we made a breakthrough in the department of spinning up nodes quickly from scratch, which we are now releasing in alpha 2 for everyone to try, alongside other improvements to overall perfomance such as:</p><ul><li><p>A slight 25% improvements in chain tip performance</p></li><li><p>Slightly smaller disk footprint </p></li><li><p>A 50% improvement to Caplin&#8217;s chain tip performance</p></li><li><p>A lot of bug fixing</p></li></ul><p>And, as we mentioned before, we developed a new blazingly fast syncing algorithm to spin up archive nodes in mere hours.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://erigon.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Erigon Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>Introducing OtterSync: The fastest sync algorithm for Ethereum nodes ever created.</h2><p>OtterSync is a new sync protocol/algorithm designed to drastically reduce the time required to sync Ethereum nodes (both full and archive nodes). Leveraging Erigon&#8217;s 3.0 static files model, it allows 98% of the computation to be shifted from the CPU to network bandwidth for initial sync.</p><p>In Erigon 3.0, most of the state is designed to be downloadable through a secondary protocol (such as BitTorrent) rather than being retrieved through execution. However, the existing method of serving BitTorrent data was not quickly adaptable and required a release each time to allow for a new set of data to be available for download. This was primarily due to checksum checks and the need to maintain some degree of decentralization.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Wbr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Wbr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png 424w, https://substackcdn.com/image/fetch/$s_!6Wbr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png 848w, https://substackcdn.com/image/fetch/$s_!6Wbr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png 1272w, https://substackcdn.com/image/fetch/$s_!6Wbr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Wbr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png" width="1456" height="1090" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1090,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:229356,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6Wbr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png 424w, https://substackcdn.com/image/fetch/$s_!6Wbr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png 848w, https://substackcdn.com/image/fetch/$s_!6Wbr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png 1272w, https://substackcdn.com/image/fetch/$s_!6Wbr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffee5df77-be4e-45a4-919e-86cd9a416e21_1486x1112.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol><li><p><strong>Dynamic Data Availability</strong>: By refining the way data is distributed and checked, OtterSync eliminates the need for frequent releases, enabling faster and more flexible data availability.</p></li><li><p><strong>Mantained Decentralization</strong>: Despite the improvements in data distribution, OtterSync maintains an high degree of decentralization, ensuring data integrity and security.</p></li><li><p><strong>Integrity</strong>: OtterSync does integrity checks on the data downloaded to assure that users do not end up on neither a malicious nor wrong chain.</p></li></ol><p>In other words, OtterSync is an extension and major improvement over the previous Snapshot downloader that Erigon 3.0 and Erigon 2.0 used to rely on. <br>But how does it actually perform? How good is it?</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Thcr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Thcr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png 424w, https://substackcdn.com/image/fetch/$s_!Thcr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png 848w, https://substackcdn.com/image/fetch/$s_!Thcr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png 1272w, https://substackcdn.com/image/fetch/$s_!Thcr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Thcr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png" width="1448" height="278" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:278,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:134892,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Thcr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png 424w, https://substackcdn.com/image/fetch/$s_!Thcr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png 848w, https://substackcdn.com/image/fetch/$s_!Thcr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png 1272w, https://substackcdn.com/image/fetch/$s_!Thcr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a5abea2-de1b-463a-98a0-33afccde10e0_1448x278.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Database Sizes after first sync</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4AUp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4AUp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png 424w, https://substackcdn.com/image/fetch/$s_!4AUp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png 848w, https://substackcdn.com/image/fetch/$s_!4AUp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png 1272w, https://substackcdn.com/image/fetch/$s_!4AUp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4AUp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png" width="1444" height="276" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:276,&quot;width&quot;:1444,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:157651,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4AUp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png 424w, https://substackcdn.com/image/fetch/$s_!4AUp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png 848w, https://substackcdn.com/image/fetch/$s_!4AUp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png 1272w, https://substackcdn.com/image/fetch/$s_!4AUp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d8cb6b-7bdc-4f04-808a-f6063f3b45b5_1444x276.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Sync times from scratch to the tip of the chain</figcaption></figure></div><p>For reference, on these same machines Geth and Reth takes respectively ~12 hours and ~3.5 days to sync a <strong>Full Node </strong>on Ethereum Mainnet.<strong> </strong></p><p>From the new alpha release onwards, OtterSync will be the default sync on Erigon 3.0, and you can start playing with it with Alpha 2.</p><p>Additionally, this is only the <strong>First iteration</strong> of OtterSync as we are striving (and also have a path forward) to push the boundary of what is possible even more.</p><h2>Alpha 2: Secondary improvements - Chain Tip performance, Disk footprint reductions</h2><p>There were minor improvements in Chain Tip performance across the board, mostly in preparation for a significant optimization expected in the next alpha release. Users can expect an improvement of about 22% in block importing times compared to alpha 1.0. Consequently, this also allowed us to consistently stay in sync with Polygon on Erigon 3.0 for the first time. Moreover, we managed to halve Caplin&#8217;s block importing time with this release, earning us significant time savings on our internal Consensus Layer as well.</p><p>Regarding disk footprint, we managed to reduce it by roughly 2% by fine-tuning our underlying database. Similarly to chain tip sync times, we are also expecting a significant improvement in the near future in terms of disk footprint.</p><p>Aside from all of the above, we have been fixing many bugs that emerged with the first alpha release, and we look forward to fixing even more with the upcoming second alpha release.</p><p>At the current state, we encourage users to run Erigon 3.0 alpha nodes on powerful machines as chain tip performance is not yet optimal.</p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://erigon.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Erigon Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Releasing Caplin's Archival format.]]></title><description><![CDATA[Update on Caplin]]></description><link>https://erigon.substack.com/p/releasing-caplins-archival-format</link><guid isPermaLink="false">https://erigon.substack.com/p/releasing-caplins-archival-format</guid><dc:creator><![CDATA[Giulio Rebuffo🦦🪱🐛🦈]]></dc:creator><pubDate>Tue, 20 Feb 2024 10:28:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!h9hA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We're thrilled to announce the release of the Caplin Archival format. The Caplin Archival format represents a significant milestone designed to improve access efficiency and ensure greater integrity for beacon blockchain data. This enhancement promises to significantly reduce input/output (I/O) operations, deliver better latency, enable more efficient data processing and reduce operational costs across the board.</p><h2>Issue with historical data on the Beacon chain.</h2><p>Modern historical data management on the Ethereum beacon chain has encountered several challenges, making operations cumbersome and inefficient for archival nodes. These challenges primarily revolve around high input/output (I/O) operations, latency, and the sheer volume and complexity of the data, with disk sizes for archival nodes often exceeding 4 terabytes (TB). Let's delve into these issues to understand their impact:</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://erigon.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Erigon Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><ol><li><p><strong>High I/O Operations</strong>: Archival nodes store a complete history of all states and blocks on the Ethereum network. This requires frequent reading and writing operations to the disk, leading to high I/O throughput. The intensive I/O demands can slow down the performance of archival nodes, especially when processing or validating new transactions and blocks. This is because the system's ability to read from and write to the disk efficiently is a critical factor in overall performance. When these operations become a bottleneck, it directly impacts the speed and efficiency of the network.</p></li><li><p><strong>Latency</strong>: The latency in accessing data from disk storage is significantly higher than accessing the same data from memory (RAM). As archival nodes deal with vast amounts of data, they rely heavily on disk storage. This reliance results in increased latency when accessing historical data, which can slow down query responses and data processing. </p></li><li><p><strong>Disk Sizes Exceeding 4 TB</strong>: The Ethereum blockchain continuously grows, adding new blocks approximately every 12 seconds. This constant growth leads to an exponential increase in the data that archival nodes must store. Modern archive nodes often see their disk sizes exceed 4 TB, which increases hardware costs and complicates data management and retrieval. Large disk sizes mean that more data must be scanned for each query, which can further increase latency and I/O operations, exacerbating the existing challenges.</p></li></ol><p>Right now, the two main (that we know of) contenders are trying to fix this problem:</p><ul><li><p>Lighthouse&#8217;s experimental tree states data model.</p></li><li><p>Caplin&#8217;s data model.</p></li></ul><p>Therefore, to give a better picture of it. We will present some benchmarks by putting them against one another, comparing the memory consumption of the two nodes under stress, latency of retrieved data, and disk size.</p><h2>Disk Footprint: Lighthouse Tree-States VS Caplin.</h2><p>First of all, Lighthouse Tree-states and Caplin have similar archival sizes (up to 8.4 Million slots)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h9hA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h9hA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png 424w, https://substackcdn.com/image/fetch/$s_!h9hA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png 848w, https://substackcdn.com/image/fetch/$s_!h9hA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png 1272w, https://substackcdn.com/image/fetch/$s_!h9hA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h9hA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png" width="1456" height="836" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:836,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:609840,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h9hA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png 424w, https://substackcdn.com/image/fetch/$s_!h9hA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png 848w, https://substackcdn.com/image/fetch/$s_!h9hA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png 1272w, https://substackcdn.com/image/fetch/$s_!h9hA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6e87831-edec-4f0f-b8b1-47800f0d5d57_3276x1882.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>.</p><p>Caplin is a little smaller, with 145 GB of additional disk footprint required, while Lighthouse stands at 180 GB. They are roughly the same in terms of sync speed and database population speed.  The main difference between the two, when it comes to the data model, is that Lighthouse tree-states keep track of what essentially is a diff-tree of each instance of the state throughout history using xdelta3 (a delta-compression algorithm), while Caplin uses internal indexing and pre-loading to keep track of the changes as opposed to the tree-states approach. This leads to a slightly smaller disk footprint. However, this difference in approach also leads to faster data processing and extraction times. So, how do they differ in application latency?</p><h2>Latency: Lighthouse Tree-States VS Caplin.</h2><p>To measure latency, we decided to compare the timings on the Restfull API from both Beacon nodes. We selected three endpoints to test, which we believe to touch all the spots regarding data processing. The first and most important for reorg handling is how fast each client can read a previous state. We benchmarked the /eth/v2/debug/beacon/states/{state_id} in octet-stream to do this. Below are the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H1g2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H1g2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png 424w, https://substackcdn.com/image/fetch/$s_!H1g2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png 848w, https://substackcdn.com/image/fetch/$s_!H1g2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png 1272w, https://substackcdn.com/image/fetch/$s_!H1g2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H1g2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png" width="1456" height="890" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:890,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:366869,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H1g2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png 424w, https://substackcdn.com/image/fetch/$s_!H1g2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png 848w, https://substackcdn.com/image/fetch/$s_!H1g2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png 1272w, https://substackcdn.com/image/fetch/$s_!H1g2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3240e31c-204f-470a-9af3-a692af8f0018_1924x1176.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can see that caplin sits all the time below the one-second mark while lighthouse-tree states go as far as to exceed 2 seconds at times. Making Caplin approximately 2x times faster at reading historical states. </p><p>We also ran two other benchmarks on how fast historical individual (or even multiple) validator data and rewards are retrieved. Below are the results for retrieving individual validator data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oueb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oueb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png 424w, https://substackcdn.com/image/fetch/$s_!Oueb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png 848w, https://substackcdn.com/image/fetch/$s_!Oueb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!Oueb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oueb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png" width="1456" height="873" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:873,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:375453,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Oueb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png 424w, https://substackcdn.com/image/fetch/$s_!Oueb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png 848w, https://substackcdn.com/image/fetch/$s_!Oueb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!Oueb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F339a2a2c-a0bd-45ce-8b84-93c406211582_1934x1160.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p> We can see that Caplin is six times faster at retrieving this kind of data  by showing a slow growth curve over time, while Lighthouse seems to pick up latency as we approach the most recent slot data. Lastly,  a measurement for validators deltas tracking is shown:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oe1F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oe1F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png 424w, https://substackcdn.com/image/fetch/$s_!Oe1F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png 848w, https://substackcdn.com/image/fetch/$s_!Oe1F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!Oe1F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oe1F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png" width="1456" height="903" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:903,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:322405,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Oe1F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png 424w, https://substackcdn.com/image/fetch/$s_!Oe1F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png 848w, https://substackcdn.com/image/fetch/$s_!Oe1F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!Oe1F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023cd4c7-b8ca-44ef-aceb-0eae51b5607a_1870x1160.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We also picked this endpoint to test computation and processing on pre-existing beacon data. The results show that Caplin is ten times faster than a lighthouse regarding historical data processing.</p><h2>Network improvements</h2><p>To add a final note: in the past two weeks, the Caplin team finally fixed the recurring issue of Caplin occasionally missing a few gossip blocks. The issue was that we completely messed up the size of a P2P Message. Luckily, that does not happen anymore, and other functionalities, such as being a Validator, are in reach. </p><h2>What&#8217;s next?</h2><p>From the next release, Caplin&#8217;s archive node will be able to be enabled using the flags  <code>&#8212;-internalcl and &#8212;-caplin.archive</code>, these two flags will enable backfilling and reconstruction of states. The next step is to implement the full-validator functionality and work on bug fixing and improving current things. The Caplin team also starts researching efficient means of blob retrieval and storage for Layer 2s.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://erigon.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Erigon Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Update on Caplin and Roadmap: Building a Consensus Layer Client to work with Erigon without the Engine API.]]></title><description><![CDATA[This is an update on Caplin, Erigon's internal CL development progress and roadmap outlining.]]></description><link>https://erigon.substack.com/p/update-on-caplin-and-roadmap-building</link><guid isPermaLink="false">https://erigon.substack.com/p/update-on-caplin-and-roadmap-building</guid><dc:creator><![CDATA[Giulio Rebuffo🦦🪱🐛🦈]]></dc:creator><pubDate>Mon, 28 Aug 2023 13:04:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!uEzJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the Ethereum ecosystem, Erigon stands as an innovative client, excelling for archive nodes. In addition to Erigon, in the last few months, we announced Caplin, a consensus layer client that seamlessly integrates with Erigon, offering a direct approach to EL-CL interaction without relying on the Engine API. This innovation aims to improve user experience and performance. The post explores motivations, benefits, and the roadmap behind this initiative, along with implications for developers and users, contributing to Ethereum's growth. Importantly, while delving into the core aspects, it's important to note that the post will not delve into intricate technical details, ensuring accessibility and readability for a wide audience.</p><h2><strong>Motivation</strong></h2><p>Caplin was born out of the need to simplify the complex technical details that arose from "The Merge." Dealing with various client setups had become a headache, causing many issues. Additionally, changing the Engine API is a tough and time-consuming process. When new protocol concepts come in that require API changes, there's a long and strict validation process. This whole situation highlights the requirement for a smoother approach, which is what Caplin tries to achieve. As we explore this further, it's clear that Caplin's development journey aimed to make things more efficient and compatible in the evolving Ethereum environment.</p><p></p><h3><strong>Achievable Benefits</strong></h3><p>Caplin brings about advantages that can be divided into three main groups: Soft, Hard, and Protocol benefits. Soft benefits are the subtle perks that might not catch users' attention immediately. They include clearer code, easier codebase maintenance, and faster block import speeds. On the flip side, Hard benefits are more concrete and noticeable. They directly improve user experience, simplify infrastructure, make better use of data, and even have the potential to enhance Execution Layer (EL) pruning capabilities. These benefits are all quantifiable and enhance the overall usability.</p><p>Now, the Protocol benefits are the big-picture gains. These benefits extend beyond immediate user interactions and have a measurable impact on the Ethereum protocol as a whole. Caplin's design allows for introducing features that aren't available through the Engine API. This means protocol improvements can be made without needing all the other Consensus and Execution clients to agree. This approach accelerates protocol enhancements without getting stuck in prolonged consensus and approval processes. As Protocol benefits stack up, they enhance client performance, make the Ethereum ecosystem more adaptable and innovative, and introduce valuable optimizations.</p><p>Furthermore, an additional advantage lies in the potential to deliver an optimized Ethereum archive node (150GB&lt; estimated) and beacon API (faster retrieval of data), which only Lighthouse and Nimbus are currently making an attempt at. However, it's worth noting that while this capability exists, it currently isn't a high priority due to limited demand for the beacon API, given its current structure. Designing a new API presents challenges and risks regarding effort and time investment. This pragmatic approach underscores the importance of aligning development efforts with tangible user needs and optimizing resource allocation for maximum impact.</p><h2>Caplin Roadmap</h2><p>Regarding the roadmap, Caplin's evolution is divided into four distinct phases, each signifying a critical milestone in its development and integration:</p><p><strong>Phase 1: Engine API Integration</strong> In the initial phase, Caplin interfaces with the Engine API. This step enables Caplin to harness the comprehensive capabilities and functions provided by the Engine API. Notably, this integration also extends its utility to other Ethereum clients such as Geth, Besu, and Nethermind.</p><p><strong>Phase 2: Internal Erigon API Integration</strong> Transitioning to the second phase, Caplin utilizes an internal Erigon API. This API is also crafted to integrate other chains other than Ethereum 2.0 (such as Polygon). Notably, this capability is a central point of the Caplin project.</p><p><strong>Phase 3: Distributed Validator and Validation Client</strong> Progressing to the third phase, Caplin integrates the validator REST API capable of fulfilling the role of a proposing client.</p><p><strong>Phase 4: Archive Node Capabilities</strong> Culminating in the fourth phase, Caplin extends its functionalities to include archive node capabilities. </p><p>Currently positioned in Phase 2 of development, our progress aligns with the integration milestone that involves utilizing the internal Erigon API. As we march forward, we anticipate making Caplin accessible to the public by the end of the year. This progressive step reflects our commitment to streamlining the operation of Erigon through Caplin's capabilities, serving as the default mode unless specifically indicated otherwise. Our strategic approach ensures the alignment of Erigon's functionality with Caplin's core principles and advancements, ultimately contributing to a more seamless and efficient Ethereum ecosystem.</p><h3>Benchmarks</h3><p>Below, we outline some Technical benchmarks which are subject to change as they are not that optimal yet but below are our results in block import time and Disk Footprint.</p><h4>Disk Footprint</h4><p>So, the disk footprint comprises 222 MB of indices and 16 GB of beacon blocks stored to serve the P2P RPC. There is still some room for improvement here in this regard, so this is not definite (it is quite a dumb approach so far). There is to note that the 16 GB worth of beacon blocks are stored as blobs, so one can choose to dump them on an HDD, thus practically reducing their cost to 0.</p><h4>Block time importing</h4><p>Below is the block importing time on a machine with an AMD Ryzen 9 5950X 16-Core Processor, which is a quite powerful but still affordable machine compared with Prysm:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uEzJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uEzJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png 424w, https://substackcdn.com/image/fetch/$s_!uEzJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png 848w, https://substackcdn.com/image/fetch/$s_!uEzJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png 1272w, https://substackcdn.com/image/fetch/$s_!uEzJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uEzJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png" width="600" height="390" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:24987,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uEzJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png 424w, https://substackcdn.com/image/fetch/$s_!uEzJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png 848w, https://substackcdn.com/image/fetch/$s_!uEzJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png 1272w, https://substackcdn.com/image/fetch/$s_!uEzJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3824bca-6ab1-4872-8d98-90cb4fbde64f_600x390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Note: This is for block importing for Block processing in addition to ForkChoice computation. Additionally, Prysm and Caplin do different things; although they fully implement the consensus specs and fork choice rules, Prysm is a far bigger and more complete software. Above are just the rough numbers for raw <strong>optimistic</strong> (BLS verification only) block processing at the chain tip (so we exclude EL overhead).</p><h4>Memory Consumption</h4><p>Below are memory consumption benchmarks; I think that for non-validating nodes, this metric can very well be halved (also, this is out of a very dumb and unoptimized implementation of the forkchoice rule, just a more decent copy-cat of the consensus specification). I do not want to give definite answers here. It pretty much caps at 3.8 GB and never goes up, giving it a requirement of 4 GB of RAM to run Caplin.</p><p>Below is Caplin's Memory usage compared to Prysm:</p><p>Prysm (approximately 11 GB):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EsP2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EsP2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png 424w, https://substackcdn.com/image/fetch/$s_!EsP2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png 848w, https://substackcdn.com/image/fetch/$s_!EsP2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png 1272w, https://substackcdn.com/image/fetch/$s_!EsP2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EsP2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png" width="1456" height="383" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:383,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:145766,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EsP2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png 424w, https://substackcdn.com/image/fetch/$s_!EsP2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png 848w, https://substackcdn.com/image/fetch/$s_!EsP2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png 1272w, https://substackcdn.com/image/fetch/$s_!EsP2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e553f5d-e783-425f-8174-0eb82bbd693f_2606x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Caplin (Approximately 4 GB):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OG84!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OG84!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png 424w, https://substackcdn.com/image/fetch/$s_!OG84!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png 848w, https://substackcdn.com/image/fetch/$s_!OG84!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png 1272w, https://substackcdn.com/image/fetch/$s_!OG84!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OG84!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png" width="1456" height="374" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:374,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:219806,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OG84!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png 424w, https://substackcdn.com/image/fetch/$s_!OG84!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png 848w, https://substackcdn.com/image/fetch/$s_!OG84!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png 1272w, https://substackcdn.com/image/fetch/$s_!OG84!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe5c2e04-1a3b-4a61-aa2a-b04f76517de1_2896x744.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p>]]></content:encoded></item><item><title><![CDATA[Merging Erigon 3 and Erigon 4, and possibly Caplin]]></title><description><![CDATA[We had mentioned before that there are currently three big features in Erigon&#8217;s technological roadmap: Erigon 3, Erigon 4, and Caplin.]]></description><link>https://erigon.substack.com/p/merging-erigon-3-and-erigon-4-and</link><guid isPermaLink="false">https://erigon.substack.com/p/merging-erigon-3-and-erigon-4-and</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Tue, 30 May 2023 13:22:56 GMT</pubDate><content:encoded><![CDATA[<p>We had mentioned before that there are currently three big features in Erigon&#8217;s technological roadmap: Erigon 3, Erigon 4, and Caplin. As we tried to formalise the roadmap further, we have split each of these three features into R&amp;D phases:</p><ul><li><p>Prototype (proof of concept) - initial implementation, possibly with sub-standard performance and not integrated with Erigon, but answering most obvious questions about feasibility of design. Usually developed by a single person based on approximate design.</p></li><li><p>Integration - connecting the prototype code to the code of Erigon, giving other people apart from the prototype developer, ability to exercise the prototype.</p></li><li><p>Stabilisation - achieving good predictable experience with the feature, gradual elimination of thorny edge-cases.</p></li><li><p>Expansion - making the feature work for all supported networks/chains.</p></li></ul><p>Our initial plan regarding Erigon 3 and Erigon 4 was to roll them out as two separate non-backwards-compatible upgrades. These upgrades would require node operators to bootstrap their nodes from scratch, in a similar way to how upgrade from Erigon 1 to Erigon 2 was performed.</p><p>However, couple of months ago, looking at the progress of Erigon 3 and Erigon 4 development, when Erigon 3 was quite well into the integration phase, and Erigon 4 was just coming out of the Prototype phase, we decided to bundle them up into one single upgrade. That way, we are hoping to gain these benefits:</p><ul><li><p>Collaboration. Prior to the decision, there was 1 team member working on Erigon 3 integration and another team member - on Erigon 4 prototype. Combining two projects would lead to these two team members working together - something we would like to encourage.</p></li><li><p>Reduction of the importance of some intermediate constructs, like state reconstitution and scratch-space db transactions.</p></li><li><p>Even though the delivery of Erigon 3 will be delayed as a result, it is likely that the delivery of Erigon 4 will come sooner.</p></li></ul><p>Caplin integration phase will also require a change of the data model, and it may be that this will also merged into the Erigon 3/4 upgrade, though decision on this has not been reached. If it does happen, however, then the remainder of the Erigon technological roadmap will be delivered in a single non-backwards-compatible upgrade.</p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Erigon receives $200,000 grant from BNB Chain to advance technological roadmap]]></title><description><![CDATA[Erigon is thrilled to announce that it has been awarded a grant from BNB Chain worth $200,000 to support its mission of advancing its technological roadmap.]]></description><link>https://erigon.substack.com/p/erigon-receives-200000-grant-from</link><guid isPermaLink="false">https://erigon.substack.com/p/erigon-receives-200000-grant-from</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Thu, 27 Apr 2023 21:03:10 GMT</pubDate><content:encoded><![CDATA[<p>Erigon is thrilled to announce that it has been awarded a grant from BNB Chain worth $200,000 to support its mission of advancing its technological roadmap. This grant will help Erigon move even closer to what it calls the "efficiency frontier" for Ethereum-derived blockchain implementations, which includes three main items on the roadmap: Erigon 3, Erigon 4 (with more updates coming soon), and Caplin.</p><p>One of Erigon's biggest challenges is providing excellent support to its users, which is where the grant from BNB Chain will come in handy. Erigon will use the funds to expand its team and further develop its new diagnostics system, regression testing tools, and pay bounties to external contributors.</p><p>Adam Bendjemil, Head of Business Development at BNB Chain, commented on the grant, stating that BNB Chain is proud to support innovative projects in the blockchain space through its grants program. He added, "We aim to provide resources and opportunities for talented developers and entrepreneurs to push the boundaries of what is possible in the blockchain space."</p><p>Alexey Akhunov, Founder of Erigon, expressed excitement about the grant's potential impact on the company's mission, stating, "The grant from BNB Chain will support this mission, by helping us find and bring more talent to build together with us. I believe in the vision of the multiplicity of systems, bridged to one another, rather than in a single settlement layer."</p><p>Erigon is grateful for the generous contribution from BNB Chain and looks forward to putting the funds to good use.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Update on the support for BSC and Polygon in Erigon. Recruitment ideas.]]></title><description><![CDATA[In one of the previous posts, we announced that we may be discontinuing support for BNB Smart Chain and/or Bor/Polygon in Erigon, due to our resource constrains and other factors.]]></description><link>https://erigon.substack.com/p/update-on-the-support-for-bsc-and</link><guid isPermaLink="false">https://erigon.substack.com/p/update-on-the-support-for-bsc-and</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Wed, 26 Apr 2023 07:18:38 GMT</pubDate><content:encoded><![CDATA[<p>In one of the previous posts, we announced that we may be discontinuing support for BNB Smart Chain and/or Bor/Polygon in Erigon, due to our resource constrains and other factors. The decision deadline specified in that post was 1st of April 2023. Now we are well past the deadline, here is the update of what the conclusion is.</p><p>In the latest release of Erigon, v2.43.0, the code for support of BNB Smart Chain has been removed. This does not mean that Erigon for BSC ends there. There is now a project which is independent from us, maintaining Erigon implementation for BSC. It can be found it here: https://github.com/node-real/bsc-erigon. We feel very positive about this development, and hope that this project goes well.</p><p>Regarding Bor/Polygon, over these two months, we had many interactions with Polygon and eventually came to an agreement in principle that satisfies both Erigon and Polygon. It is now being finalised. We have a rough technical plan on what we would do to improve and stabilise the support of Bor in Erigon.</p><p>We also work on a recruitment plan to attract more people to work with us to support Ethereum, Gnosis Chain, and Bor/Polygon. We will be assessing potential candidates in a traditional way (CV, interviews, etc.), however we have a very limited capacity to do so and also on-board/absorb new joiners in the team. Therefore, we will also be experimenting with the second approach in parallel. This second approach will be used in combination with the traditional approach, as well as on its own.</p><p>That second approach involves performing programming tasks, in a similar way they would be performed during person&#8217;s work in Erigon. These tasks would be designed as real contributions rather than throw-away assignments, and for the valuable once we will pay bounties. Since Erigon&#8217;s code base is rather challenging to get to, and required a lot of learning, it would be good to have initial tasks on projects that are related to Erigon, but stand &#8220;lower&#8221; on the learning curve. These tasks would contribute to building up experience for working on Erigon&#8217;s code base.</p><p>Current plan is to attempt to use the following four projects as &#8220;stepping stones&#8221; for these tasks. The tasks themselves are improvements, which are ideally found by the contributors themselves, but can be also picked/allocated, once we have a good list of them built up. Only the first project is now being prepared for this role, while the other two will require more work.</p><ol><li><p>Diagnostics system: https://github.com/ledgerwatch/diagnostics. README file in the project gives the background and current state of the development. There is also Discussion section on GitHub which can be used to ask questions and discuss. Working on this project familiarises with the general functionality of Erigon nodes, and with the ways to deal with user&#8217;s issues, and extract useful diagnostics information and metrics. Tasks there could be improvements in the Web server operations, improvements in the UX, adding so-called &#8220;diagnostics scripts&#8221; (using existing types of diagnostics information, but checking for new conditions of the nodes), or adding new type of diagnostics information to be extracted from the nodes.</p></li><li><p>Devnet tool, which is currently part of Erigon&#8217;s code base: https://github.com/ledgerwatch/erigon/tree/devel/cmd/devnet. It is a regression-testing tool, which can be run as a standalone executable, and when it is, it launches 2 Erigon nodes internally (could be more in the future) and runs some simple tests using JSON RPC API. It is similar to Hive, but without needing to use docker containers. Working on this project familiarises with the lifecycle of Erigon node, and with some of the most essential API methods to inject transactions, produce blocks, watch for events, inspect transaction pool. Tasks there would be about adding new test scenarios covering what is not covered, or perhaps introducing a new class of tests, or some structural code improvements. Different levels of tasks demonstrate varying levels of expertise.</p></li><li><p>Hive tests: https://github.com/ethereum/hive. It is also regression testing tool, utilised by all Ethereum core developers. Working with it requires the knowledge of docker containers and their mechanics, and also include richer set of scenarios and asserts. There are still quite a few hive tests not passing for Erigon, and improvement tasks there are fixes for such tests or at least detailed understanding why they fail. There is also need to fork/extend such tests for Gnosis Chain and Bor.</p></li><li><p>Otterscan: https://github.com/otterscan/otterscan. This is an open-source block explorer, operating on top of Erigon nodes. Most of its functionality is in Javascript accessing JSON RPC APIs, but some of it is inside Erigon, in the form of implementation of APIs which are specific to Otterscan at the moment. We would like to eventually make Otterscan embedded to Erigon. This would mean having a command-line flag <code>&#8212;otterscan</code> to active it. It is possible to do because Otterscan/Erigon combination does not require any external indexing databases. The main challenge for such embedding is the size of the resources (javascript libraries and various data sources) what need to come with it. As it is now, it could potentially inflate Erigon&#8217;s executable quite a lot. Anyway, assuming these problems are resolved, Otterscan can also be the source of the tasks for the recruitment and/or onboarding process. </p></li></ol><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Announcing Caplin: Erigon Full consensus layer is now live!]]></title><description><![CDATA[Shortly before or after the publication of this article, we are also publishing a new release,v2.43.0 which contains a lot of fixes and improvements and will contain the first iteration of Caplin, Erigon&#8217;s embedded complete consensus layer, which is now also a part of our roadmap.]]></description><link>https://erigon.substack.com/p/announcing-caplin-erigon-full-consensus</link><guid isPermaLink="false">https://erigon.substack.com/p/announcing-caplin-erigon-full-consensus</guid><dc:creator><![CDATA[Giulio Rebuffo🦦🪱🐛🦈]]></dc:creator><pubDate>Sun, 23 Apr 2023 21:17:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ezuH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Shortly before or after the publication of this article, we are also publishing a new release,<strong>v2.43.0</strong> which contains a lot of fixes and improvements and will contain the first iteration of Caplin, Erigon&#8217;s embedded complete consensus layer, which is now also a part of our roadmap. On top of this, after this new release, We will completely sunset the Erigon-embedded Consensus Lightclient project.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ezuH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ezuH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png 424w, https://substackcdn.com/image/fetch/$s_!ezuH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png 848w, https://substackcdn.com/image/fetch/$s_!ezuH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png 1272w, https://substackcdn.com/image/fetch/$s_!ezuH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ezuH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png" width="554" height="474.3193657984145" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:756,&quot;width&quot;:883,&quot;resizeWidth&quot;:554,&quot;bytes&quot;:454169,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ezuH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png 424w, https://substackcdn.com/image/fetch/$s_!ezuH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png 848w, https://substackcdn.com/image/fetch/$s_!ezuH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png 1272w, https://substackcdn.com/image/fetch/$s_!ezuH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a5a2008-b9f9-430c-a0a0-67206686cbcc_883x756.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p><strong>What is Caplin specifically?</strong></p><p>Caplin is the codename for the Consensus Layer client, which will be embedded into Erigon. Caplin will be a full-fledged validating Consensus Client like Prysm, Lighthouse, Teku, Nimbus and Lodestar. Our goal is to make it able to: provide better stability, validation of the chain, stay in sync, keep the execution of blocks on chain tip, provide Beacon API, compact data model, and low CPU and memory usage. The main reason why we are developing a new Consensus Layer is to experiment with the possible benefits that could come with it. We can already envision some significant benefits that could be derived, but we have yet to discover all of them. Some of the most important benefits are that Erigon was not designed around Engine API, the beacon chain archive node is 3 TB, and there is less protocol complexity for Ethereum Mainnet. For example, The Engine API does not work well with Erigon. The Engine API sends data one block at a time, which does not suit how Erigon works. Erigon is designed to handle many blocks simultaneously and needs to sort and process data efficiently. Therefore, it would be better for Erigon to handle the blocks independently instead of relying on the Engine API.</p><p><strong>What is Caplin Roadmap?</strong></p><p>As of now, we envisioned 4 phases for Caplin development:</p><ul><li><p>Phase 1: Embedded communication through Engine API (Finished)</p></li><li><p>Phase 2: Embedded communication with Erigon custom protocol</p></li><li><p>Phase 3: Functioning Beacon API (and support for running validators)</p></li><li><p>Phase 4: Compact data model using Erigon 4 compaction.</p></li></ul><p>As of now, Phase 1 is finished and will be released in the next release and will replace the Lightclient and will need to be enabled through the --internalcl flag in Erigon CLI (it is not default anymore due to the alpha state of Caplin during this first iteration). We will try to stabilise it as much as possible. Only after we believe it is stable enough, we will move on to Phase 2, where the Protocol simplifications (and most of the benefits) will be able to come to fruition (Noting again that we do not even know the full extent and effects of the benefit that can result from this experiment). Phase 3 and Phase 4 are extras that may or may not be implemented.</p><p><strong>What is the current state of the art of Caplin?</strong></p><p>Currently, the development of Caplin is at the point where we have a working validating client which implements Ethereum 2.0 fork choice and that can communicate with the Erigon Execution Layer both in separate and embedded modes. Currently, there is no persistent storage in Caplin, and only the last 128 blocks are kept in memory for the sake of chain reorgs, so at the time of writing, the hardware requirement for Caplin are as follows:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TFc6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TFc6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png 424w, https://substackcdn.com/image/fetch/$s_!TFc6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png 848w, https://substackcdn.com/image/fetch/$s_!TFc6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png 1272w, https://substackcdn.com/image/fetch/$s_!TFc6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TFc6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png" width="1176" height="386" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:386,&quot;width&quot;:1176,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TFc6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png 424w, https://substackcdn.com/image/fetch/$s_!TFc6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png 848w, https://substackcdn.com/image/fetch/$s_!TFc6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png 1272w, https://substackcdn.com/image/fetch/$s_!TFc6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc613666-b6e2-42dd-90b9-af88c0f5ad5d_1176x386.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It can sync the chain and stay on chain tip through checkpoint sync, nothing more, nothing less; it will behave as the embedded consensus Lightclient which will soon be removed. You can use it right away from the next release with --internalcl if you still want to avoid using a Consensus Layer and want to try it out and help us test it.&nbsp;</p><p><strong>More on sunsetting on Consensus Lightclient</strong></p><p>Although the Consensus Layer Lightclient embedded into Erigon has proven helpful, it is time to sunset him in favour of Caplin. Despite having better memory requirements than Caplin, the light client network in Ethereum 2.0 is supported by insufficient LightClient servers, which has become a minority in the network as Erigon&#8217;s consensus&#8217;s Lightclient has started to be used. In other words, finding peers took a lot of time and went from being very helpful to a maintainability nightmare. Additionally, since Caplin and the Erigon embedded lightclient are maintained by only one person, we determined that it was best to focus all our efforts on one thing instead of maintaining both simultaneously.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://erigon.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Erigon Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Future of the support of BNB Smart Chain and Bor (Polygon) in Erigon]]></title><description><![CDATA[Around a year ago, in January and February 2022, Erigon has accepted the inclusion of the support of BNB Smart Chain and Bor (from Polygon) into the codebase.]]></description><link>https://erigon.substack.com/p/future-of-the-support-of-bnb-smart</link><guid isPermaLink="false">https://erigon.substack.com/p/future-of-the-support-of-bnb-smart</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Tue, 07 Feb 2023 07:22:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!igN7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Around a year ago, in January and February 2022, Erigon has accepted the inclusion of the support of BNB Smart Chain and Bor (from Polygon) into the codebase. There was a large interest in this from the outside. From our point of view, our interest was to &#8220;stress test&#8221; our architecture and data models to see how such large chains could be supported.</p><p>Our initial hope was that most of the code maintenance would be done by external contributors, which was partially the case.</p><p>However, the demand to our time from the support of these chains, has increased considerably. There seem to have been regular regressions that were difficult to diagnose because we do not ourselves maintain fully-synced Erigon nodes for BNB Smart Chain and Bor. Still, when time allowed it, I tried personally to debug the issues (mostly about sync being stuck in headers and bodies stage), with some success, but at as cost of somewhat &#8220;frantic&#8221; release schedule. At the same time, continuing developments in the go-ethereum-derived versions (which are so far dominant and &#8220;officially&#8221; supported) seem to diverge from our roadmap. We expect this divergence to further increase our burden, unless properly integrated into our roadmap. Despite issues, so far we had an impression that there is still a strong external interest in Erigon to continue to support these large chains.</p><p>We do definitely expect Erigon 3 (as specified in our roadmap) to bring significant benefits to our Ethereum and Gnosis Chain implementations (both in terms of reduction of sync time and disk footprint), but benefits would be even greater for BNB Smart Chain and Bor.</p><p>We feel it is unfair for us to spend ever increasing resources on continuing support of these platforms while only being funded by Ethereum Foundation and Gnosis DAO. Over the past few months, we had conversations with some representatives of BNB Smart Chain and Polygon about the need for continuing funding of our efforts, if the support is to continue. However, as it stands, our feeling also is that the expectation is (as it was traditionally the case) that our team needs to &#8220;apply&#8221; for funding, providing some extra commitments beyond what we already do (or trying to do), and then navigate the internal processes of the respective organisations to get the funding. As a result, we would also over-commit in the process of negotiating the level of funding. As unusual as it may sound, we would like to reverse this &#8220;process&#8221;.</p><p>We would like BNB Smart Chain and Polygon representatives to &#8220;apply&#8221; to Erigon for continuing the support of the respective chain, which we will agree to, if sufficient ongoing funding is provided - as simple as that. If this does not happen, we aim at removing the respective code from Erigon shortly after 1st of April 2023, and therefore discontinue support. It is, of course, possible, for anyone to create a fork of Erigon at that point and continue support &#8220;on the side&#8221;, but without our team being held responsible for the results.</p><p><strong>Important note</strong>: representatives mentioned above have been given advance view of this post, and also our terms of funding. So far, BNB Smart Chain replied that unfortunately, they are not able to provide funding on these terms.</p><p>We feel that current situation is untenable for us, so we need a proper resolution, and we are ready for either outcome. We either drop support and concentrate our efforts on the platforms where our funding comes from, or, having received appropriate funding, incorporate support into our roadmap, without over-committing in the attempt to gain funding using the currently expected process.</p><p>Finally, we would like to clarify, that this proposal to &#8220;apply&#8221; only extends to BNB Smart Chain and Polygon, because Erigon already has support for these platforms and there are apparently a lot of users who would not want this to be discontinued. In other words, we are not planning to add support for any more platforms. Instead, our plan is to consolidate development and ensure we have sustainable runway for accomplishing our complete roadmap. Short version of the roadmap for quick reference:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!igN7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!igN7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg 424w, https://substackcdn.com/image/fetch/$s_!igN7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg 848w, https://substackcdn.com/image/fetch/$s_!igN7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!igN7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!igN7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg" width="1450" height="1416" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1416,&quot;width&quot;:1450,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:461359,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!igN7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg 424w, https://substackcdn.com/image/fetch/$s_!igN7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg 848w, https://substackcdn.com/image/fetch/$s_!igN7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!igN7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84e26eb7-7b64-4b0b-8957-a50e53c27e52_1450x1416.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p> </p>]]></content:encoded></item><item><title><![CDATA[Winding down support for Akula project]]></title><description><![CDATA[Akula project (https://github.com/akula-bft/akula) was started last year when we realised there is large amount of interest in a high-performance Ethereum implementation in Rust after the sun-setting of OpenEthereum.]]></description><link>https://erigon.substack.com/p/winding-down-support-for-akula-project</link><guid isPermaLink="false">https://erigon.substack.com/p/winding-down-support-for-akula-project</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Wed, 23 Nov 2022 18:09:36 GMT</pubDate><content:encoded><![CDATA[<p>Akula project (https://github.com/akula-bft/akula) was started last year when we realised there is large amount of interest in a high-performance Ethereum implementation in Rust after the sun-setting of OpenEthereum. We also had &#8220;know-how&#8221; from our multi-year work on Erigon. The start was very challenging, because most of the initial building blocks had to be written from scratch, and practically by a single individual, Artem (https://github.com/vorot93). That includes EVM implementation, bindings for the embedded database MDBX, fast RLP library, entire devp2p implementation, to name a few. More developers joined the project later, to bring about things like downloader for blocks and headers, and computation of the state root in a similar fashion to Erigon.</p><p>From our point of view, this is an amazing progress, done by a very small team in reasonably short time. Of course, now that Akula have some real users, it also needs to deal with support issues.</p><p>Recently, it has come to our attention, that there is another Ethereum implementation in Rust, with nearly identical scope as Akula, and with some of the same/similar building blocks. It will be open sourced and presented to the public very soon. After discussing the matter, we have come to a decision to unwind our technological, managerial and financial support for Akula. We think that the other project will, after it is open sourced, become better supported and more popular, and will very quickly match and overtake Akula in functionality. Therefore, we do not see how Akula will be able to attract future funding from grants (and this is how it is funded now), and consequently, it does not make sense to spend our scare resources on it. We also know that the entity behind the new project has resources and influence incomparable to ours.</p><p>Of course, we cannot &#8220;close&#8221; or &#8220;shut down&#8221; Akula project, because it is public and open-source, so anyone is able to fork it and continue development. However, we are winding down the management of the project and the technology transfer.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Big release and renaming of Erigon 2.2 & 2.3 into Erigon 3 & 4]]></title><description><![CDATA[Shortly before or after publication of this article, we are also publishing a new release, 2022.10.01, which contains a lot of fixes and improvements, specifically to the handing of Engine API messages (communication with CL - Consensus Layer).]]></description><link>https://erigon.substack.com/p/big-release-and-renaming-of-erigon</link><guid isPermaLink="false">https://erigon.substack.com/p/big-release-and-renaming-of-erigon</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Wed, 05 Oct 2022 06:59:23 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!xHPO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Shortly before or after publication of this article, we are also publishing a new release, <strong>2022.10.01</strong>, which contains a lot of fixes and improvements, specifically to the handing of Engine API messages (communication with CL - Consensus Layer).</p><p>Here are the draft release notes:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xHPO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xHPO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png 424w, https://substackcdn.com/image/fetch/$s_!xHPO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png 848w, https://substackcdn.com/image/fetch/$s_!xHPO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png 1272w, https://substackcdn.com/image/fetch/$s_!xHPO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xHPO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png" width="1332" height="1498" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1498,&quot;width&quot;:1332,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:335801,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xHPO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png 424w, https://substackcdn.com/image/fetch/$s_!xHPO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png 848w, https://substackcdn.com/image/fetch/$s_!xHPO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png 1272w, https://substackcdn.com/image/fetch/$s_!xHPO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c00f8b2-05b0-449f-a5d3-27c442b72217_1332x1498.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>In particular, the logging output should now be less confusing.</p><p>In the previous release there was an unfortunate flaw that meant that the block snapshot generation was no longer going on, and therefore the blocks would accumulate in MDBX without being converted into snapshots files and cleaned up from the MBDX. The newest release fixes it.</p><p>For some users who previously ran one of the flawed version in <code>devel</code> branch (that flaw never got to the released versions), there would be automatic database migration performed, to re-alight the transaction enumeration. When this migration is performed, the block headers and block bodies are truncated up the most recent snapshot, and re-downloaded again, to be inserted with properly aligned numbering.</p><p>In the next release, we will update the BitTorrent info hashes for the new block snapshots (doing it now may cause problems with downloading them, as most of the node would not have them generated and not able to seed).</p><h3>Renaming</h3><p>To simplify the communication about the planned incompatible upgrades of Erigon, described in the <a href="https://erigon.substack.com/p/post-merge-release-of-erigon-dropping">previous post</a>, we decided to rename these upgrades.</p><p>From now on, we will call the currently released version <strong>Erigon 2</strong> (instead of Erigon 2.1). Since it required full re-sync to go from Erigon 1, it makes sense.</p><p>What we previously called Erigon 2.2, will now be called <strong>Erigon 3</strong>. This upgrade introduces new way of storing and distributing history, as well as increased granularity of history. As mentioned before, it is currently being integrated into the code base. Upgrade from <strong>Erigon 2</strong> to <strong>Erigon 3</strong> will require full resync, as database layouts are incompatible.</p><p>What we previously called Erigon 2.3, will now be called <strong>Erigon 4</strong>. It introduces new way of storing and distributing state and state commitment. As mentioned before, it is currently being prototyped. Upgrade from <strong>Erigon 3</strong> to <strong>Erigon 4</strong> will require full resync, though we expect this to be much quicker than before (that is one of the objectives of Erigon 4 after all, to make full resync quicker).</p><h3>Release versioning</h3><p>We are also planning to move from calendar-based versioning of our releases to semantic versioning, using 2, 3, and 4 as major versions. This will enable us to ensure smother transition from <strong>Erigon 2</strong> to <strong>Erigon 3</strong> supporting both versions for some time, allowing users to migrate. However, this will be done a bit later, so not to do all the changes at once.</p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Post-merge release of Erigon, dropping alpha designation, and progress of Erigon2]]></title><description><![CDATA[It has been a while since the last update, but summer always messes up the schedule.]]></description><link>https://erigon.substack.com/p/post-merge-release-of-erigon-dropping</link><guid isPermaLink="false">https://erigon.substack.com/p/post-merge-release-of-erigon-dropping</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Sat, 17 Sep 2022 16:11:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wsgu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It has been a while since the last update, but summer always messes up the schedule. But now the weather got cooler, the routine set in. Ready? Let&#8217;s dive in :)</p><h3>Merge</h3><p>On the 15th of September 2022, Ethereum transitioned to Proof Of Stake (POS) by merging two of its networks/chains, and from then on, their blocks are synchronised. What was known as &#8220;beacon chain&#8221; or &#8220;Ethereum 2&#8221; (and now is called &#8220;Consensus Layer&#8221;, or CL) is allocating block slots, which are filled by the blocks produced by what was known &#8220;Ethereum 1&#8221; (and now is called &#8220;Execution Layer&#8221; or EL). You can see this now by inspecting any POS block in a block explorer:</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://erigon.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Erigon Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wsgu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wsgu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png 424w, https://substackcdn.com/image/fetch/$s_!wsgu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png 848w, https://substackcdn.com/image/fetch/$s_!wsgu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png 1272w, https://substackcdn.com/image/fetch/$s_!wsgu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wsgu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png" width="1366" height="383" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:383,&quot;width&quot;:1366,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66644,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wsgu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png 424w, https://substackcdn.com/image/fetch/$s_!wsgu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png 848w, https://substackcdn.com/image/fetch/$s_!wsgu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png 1272w, https://substackcdn.com/image/fetch/$s_!wsgu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bacbc0-e58e-4984-b6f2-4656bad1378d_1366x383.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>While previously, blocks had 1 numerical identifier, called &#8220;Block number&#8221;, or &#8220;Block height&#8221;, now each block will have three: block height, slot number, and epoch number. Epochs are relevant when we talk about finalisation, as Ethereum POS finalises blocks in whole epochs.</p><p>Although the merge event has been seen as very successful, we see quite a few user issues at the moment, which is somewhat understandable, because the complexity of the system running a node did go up: two pieces of software are required to run a node instead of one, there are multiple combinations of these pieces, and these pieces have their own &#8220;sync&#8221; lifecycles.</p><p>Given the above, some of us think that there will be a need for embedded CL at some point. Of course, as far as Erigon architecture is concerned, such embedding would also be separable, working via GRPC. Perhaps a standard GRPC specification will emerge for EL&#8592;&#8594; CL communication.</p><h3>Alpha and beta designations</h3><p>From the release which will be published shortly after this article (2022.09.02 - this is not a date but second release of September 2022), we are dropping <strong>alpha</strong> and <strong>beta</strong> designations from our releases. It did make sense in the past, as we were experimenting with a few approaches to managing the code. But recently we decided that designating our releases as <strong>alpha</strong> and <strong>beta</strong> does not serve us very well. Firstly, to the best of our knowledge, no other Ethereum implementations use such designations, and the users assume that all other implementations are therefore &#8220;production ready&#8221;. What &#8220;production ready&#8221; actually means is relatively subjective. But there were also instances where our <strong>alpha</strong> designation was used to dissuade users from using our software. We would like node operators to use Erigon if they find it useful, if it provides them with the functionality or cost efficiency that other implementations are not providing. As will be described in the section below, there will be big changes in Erigon for a while, as we are gradually rolling out Erigon 2, which we believe will make Erigon competitive with other implementations according to most criteria. For now, it is up to the users to make their choices.</p><h3>Erigon 2 progress</h3><p>As described in <a href="https://erigon.substack.com/p/erigon-2-three-upgrades">one of the previous posts</a>, the plan was for <strong>Erigon 2</strong> to include three upgrades, which we now call <strong>Erigon 2.1</strong>, <strong>Erigon 2.2</strong>, and <strong>Erigon 2.3</strong>. It is still the plan. We can say that <strong>Erigon 2.1</strong> has been shipped, it is now part of the all releases. There are still issues once in a while, but for most users, the functionality works. To recap, <strong>Erigon 2.1</strong> has brought:</p><ul><li><p>Infrastructure for using BitTorrent to download and seed block snapshots.</p></li><li><p>Block snapshots contain information about block headers, block bodies (including transaction payloads), and pre-computed transaction senders.</p></li><li><p>Compression used inside snapshot files (mostly for transaction payloads) reduces the total disk footprint of a node.</p></li><li><p>Indexing based on minimal perfect hash tables for looking up transactions by their hashes further reduces the total disk footprint of a node.</p></li></ul><p><strong>Erigon 2.2</strong> is currently out of the prototype phase and is being integrated into the code base. It is not developed in a separate branch, but instead is "hiding&#8221; behind an experimental command line flag. Here is what <strong>Erigon 2.2</strong> will be bringing:</p><ul><li><p>In addition to block snapshots, all historical data will be provided as snapshots, delivered and seeded via BitTorrent.</p></li><li><p>State (accounts, contract storage, byte code of contract) will still be only in the MDBX and will not be delivered via BitTorrent (this should be happening in <strong>Erigon 2.3</strong>).</p></li><li><p>History of state will become more granular. Instead of being able to query the state of any account, or contract storage item, or byte code &#8220;<strong>as of&#8221;</strong> certain block height, it will be possible to query these things &#8220;<strong>as of&#8221;</strong> before any transaction in any block.</p></li><li><p>Transaction-level granularity of history will improve performance of queries like <code>debug_traceTransaction</code>, <code>trace_transaction</code>, but more importantly, of <code>trace_filter</code>, which currently has to re-execute a lot of irrelevant transactions to advance the state from beginning of a block.</p></li><li><p>Improved performance of <code>trace_filter</code> may lead to block explorers like <strong>Otterscan</strong> being able to offer smoother user experience when displaying list of transactions for certain account.</p></li><li><p>Slightly experimental but promising feature - state reconstitution. Given downloaded history in the form of snapshot files, it is possible to reconstitute recent state by re-executing only part of the transactions occurred since Genesis. Such reconstitution may also exploit multiple CPU cores. So far experiments on relatively powerful machine (16 cores, 128 Gb RAM) showed reconstitution for Ethereum main net up to 15m block within 11,5 hours. Experiment is now prepared for BSC (but it takes a long time to generate history snapshot files).</p></li></ul><p>There is still a lot of work to be done for <strong>Erigon 2.2</strong>, including, but not limited to proper parallelism of snapshot creating, and rewriting most of the RPC methods to support new state history layout.</p><p><strong>Erigon 2.3</strong> is still in the prototype phase (and will likely stay in the prototype until <strong>Erigon 2.2</strong> is rolled out), though a lot of progress has been made here too. According to the current vision, <strong>Erigon 2.3</strong> will bring:</p><ul><li><p>State of accounts, contract storage items, and contract byte code will be split into parts stored as snapshot files and MDBX (that part will contain recent updates).</p></li><li><p>The separation into snapshot files and MDBX is similar to the idea used in LSM (Log Structured Merge) databases, such as LevelDB, RocksDB etc. Recently updated entries live in &#8220;Level 0&#8221; (which is usually in-memory skip list, analogous to MDBX in <strong>Erigon 2.3</strong>). As they get &#8220;more mature&#8221;, they migrate to &#8220;Level 1&#8221; (bunch of files), and then to &#8220;Level 2&#8221; (larger files), etc.</p></li><li><p>The main difference between LSM organisation and <strong>Erigon 2.3</strong> is that snapshots files are produced in deterministic way, and therefore can be shared around the network in the form of BitTorrent swarms.</p></li><li><p>There will be further decoupling of &#8220;commitment&#8221; from the &#8220;state&#8221;, with the code designed to easily support multiple commitments simultaneously. This will be quite useful for easier support of Verkle tree commitments, and also for alternative commitment schemes, used in StarkNet, for instance.</p></li></ul><p>After <strong>Erigon 2.3</strong> upgrade, we see the Erigon archive node being mostly bootstrapped via snapshot files, and then relatively quickly catch up to the more recent state. Also, the size of MDBX database file will be quite limited, and perhaps fitting entirely in RAM on relatively powerful hardware.</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://erigon.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Erigon Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Current status of Silkworm and SilkRPC projects (Ethereum C++)]]></title><description><![CDATA[In one of the previous posts, a short history of Silkworm project was introduced: LINK. Silkworm is an implementation of Ethereum, written in C++ from scratch (meaning that it did not inherit code from any previously written implementations, like Aleth), starting from wrapping]]></description><link>https://erigon.substack.com/p/current-status-of-silkworm-and-silkrpc</link><guid isPermaLink="false">https://erigon.substack.com/p/current-status-of-silkworm-and-silkrpc</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Wed, 18 May 2022 20:44:52 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jFPc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In one of the previous posts, a short history of Silkworm project was introduced: <a href="https://erigon.substack.com/p/staged-sync-and-short-history-of?s=w">LINK</a>. Silkworm is an implementation of Ethereum, written in C++ from scratch (meaning that it did not inherit code from any previously written implementations, like Aleth), starting from wrapping <a href="https://github.com/ethereum/evmone">evmone</a> EVM implementation. Two diagrams introduced in the previous posts, will be used to describe roughly the current status of Silkworm (and SilkRPC).</p><p>Firstly, the architecture diagram:</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jFPc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jFPc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png 424w, https://substackcdn.com/image/fetch/$s_!jFPc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png 848w, https://substackcdn.com/image/fetch/$s_!jFPc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png 1272w, https://substackcdn.com/image/fetch/$s_!jFPc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jFPc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png" width="607" height="581" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:581,&quot;width&quot;:607,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:47592,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jFPc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png 424w, https://substackcdn.com/image/fetch/$s_!jFPc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png 848w, https://substackcdn.com/image/fetch/$s_!jFPc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png 1272w, https://substackcdn.com/image/fetch/$s_!jFPc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F735afda3-e031-4733-a06c-b1ee2c2cc360_607x581.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In the diagram above, and also in the one below, a somewhat traditional colour coding is used - red for things that have not been started yet, amber (orange) - for things that are in progress but not finished yet, and green - for things that are done (but will be improved over time, of course).</p><p>The amber box with &#8220;ETH core&#8221; corresponds to the bulk of the <strong>silkworm</strong> project in this <a href="https://github.com/torquem-ch/silkworm">repository</a>. Another amber box, &#8220;ETH RPC api(s)&#8221; corresponds to the <strong>silkrpc</strong> project in this <a href="https://github.com/torquem-ch/silkrpc">repository</a>. SilkRPC project uses Silkworm as a library, in order to run EVM inside such RPC methods as <code>eth_call</code>.</p><p>Broadly, <strong>silkworm</strong>, as being developed, is currently compatible with Erigon&#8217;s ETH Sentry component, and <strong>silkRPC</strong> is compatible with Erigon&#8217;s ETH core and Erigon&#8217;s TxPool components. Also, <strong>silkworm</strong> maintains database-level compatibility with Erigon beta (the version which will only work on Ethereum main net until Ethereum POS transition, and then superseded by Erigon alpha).</p><p><strong>SilkRPC</strong> has a lot of functionality that Erigon&#8217;s RPC daemon has, but in comparison has many more tests, including performance benchmarks.</p><p>Below is the second diagram which zooms specifically into silkworm:</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H7BT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H7BT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png 424w, https://substackcdn.com/image/fetch/$s_!H7BT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png 848w, https://substackcdn.com/image/fetch/$s_!H7BT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png 1272w, https://substackcdn.com/image/fetch/$s_!H7BT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H7BT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png" width="890" height="949" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:949,&quot;width&quot;:890,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105653,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H7BT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png 424w, https://substackcdn.com/image/fetch/$s_!H7BT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png 848w, https://substackcdn.com/image/fetch/$s_!H7BT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png 1272w, https://substackcdn.com/image/fetch/$s_!H7BT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5e1277b-6bf2-425b-a5ba-d2b380f6ed6f_890x949.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Initially, the development of silkworm was focused on creating and testing individual stages in separation. Erigon was used to prepare the database state for these stages. Later, the work started on implementing two stages that depend on interaction with peers (via Sentry component provided by Erigon), as well as on assembly of the Silkworm StageLoop and converting disparate binaries (one per stage) into a useable product with all stages integrated into one binary.</p><p>As shown above, work is currently being done on the stages responsible for downloading block bodies and maintaining the state root hash.</p><h3>The two most challenging stages</h3><p>It has become a somewhat surprising, but now recognised experience that the two stages from the diagram above, which turned out to be most challenging in Erigon, then Silkworm (and also Akula, Rust implementation) are &#8220;Headers&#8221; stage (downloading header chain) and &#8220;Trie&#8221; stage (computing state root hash).</p><p>However, it appears that we are gaining better conceptual understanding of why these stages are challenging, and, as a result, simpler constructions appear iteratively. In Erigon, the simplification of &#8220;Headers&#8221; stage is ongoing. For Erigon 2 Upgrade 3, a new algorithm of calculating and updating state root hash has been created, and this algorithm promised to be much more tractable.</p><h3>Performance</h3><p>Silkworm uses evmone as its EVM interpreter, which is already known to be the fastest fully compatible EVM implementation. In addition to that, Silkworm uses MDBX, which is the fastest embedded key-value store with fully ACID transactions and MVCC (Multi-Version Concurrency Control). And on top of that, Silkworm has been written with performance being one of the highest priorities. In all stages it currently implements, silkworm beats Erigon in processing speed.</p><p>As mentioned above, silkRPC includes performance benchmarks, comparing it to Erigon&#8217;s RPC Daemon. On these benchmarks, it shows improvements over Erigon&#8217;s RPC Daemon especially under highly concurrent load. SilkRPC uses C++ co-routines, a relatively new feature introduced in C++20, to orchestrate such highly concurrent operations efficiently.</p><h3>Software licence</h3><p>Silkworm and silkRPC are both licences under Apache 2.0. Not sure how important this will turn out to be, but this may be a benefit for some users.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Erigon Stage Sync and control flows]]></title><description><![CDATA[Quick follow up from the previous post: the theoretical figure of 1015 Gb of the database (this does not include block snapshot of 225 Gb) after full resync of the latest alpha release 2022.05.02 was not too far from the actual, which was 1083 Gb, out of which 12 Gb was non yet reused free space.]]></description><link>https://erigon.substack.com/p/erigon-stage-sync-and-control-flows</link><guid isPermaLink="false">https://erigon.substack.com/p/erigon-stage-sync-and-control-flows</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Wed, 04 May 2022 20:48:50 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UHmO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Quick follow up from the <a href="https://erigon.substack.com/p/more-on-the-disk-footprint-of-erigon?s=w">previous post</a>: the theoretical figure of 1015 Gb of the database (this does not include block snapshot of 225 Gb) after full resync of the latest alpha release <a href="https://github.com/ledgerwatch/erigon/releases/tag/v2022.05.02">2022.05.02</a> was not too far from the actual, which was 1083 Gb, out of which 12 Gb was non yet reused free space.</p><p>In this post we will be looking closer into the internals of the &#8220;ETH core&#8221; component from the architecture diagram in <a href="https://erigon.substack.com/p/architecture-of-erigon-separable?s=w">one of the previous posts</a>. Inside is something we call &#8220;Stage Loop&#8221;. Here is the diagram:</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UHmO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UHmO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png 424w, https://substackcdn.com/image/fetch/$s_!UHmO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png 848w, https://substackcdn.com/image/fetch/$s_!UHmO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png 1272w, https://substackcdn.com/image/fetch/$s_!UHmO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UHmO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png" width="890" height="949" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:949,&quot;width&quot;:890,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:94240,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UHmO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png 424w, https://substackcdn.com/image/fetch/$s_!UHmO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png 848w, https://substackcdn.com/image/fetch/$s_!UHmO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png 1272w, https://substackcdn.com/image/fetch/$s_!UHmO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7b9a96e-1c53-4426-9880-f0ee68ae0521_890x949.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>There are two main control flows here - one shown by yellow arrows, and another - by blue arrows. Stage loop is driven by a single go-routine (thread) that repeatedly goes through so-called stages. Below are short descriptions of what each stage does:</p><ul><li><p><strong>Headers</strong>. Requests block headers from ETH sentry, receives them, verifies and persists in 3 tables in the database (one can find full list of tables in the file <code>tables.go</code> in the package <code>kv</code> of the <code>erigon-lib</code> repository):</p><ul><li><p><code>Headers: height|hash =&gt; RLP encoding of header</code></p></li><li><p><code>HeaderTD: height|hash =&gt; RLP encoding of total_difficulty</code></p></li><li><p><code>HeaderCanonical: height =&gt; hash</code></p></li></ul></li><li><p><strong>Block Hashes</strong>. Computes the inverted mapping (and persists it into a database table): <code>HeaderNumber: hash =&gt; height</code>. It is more efficient to perform this separately from the Headers stage, because hashes are not monotonous, so their insertion into a database table is most efficient when hashes are first pre-sorted.</p></li><li><p><strong>Bodies</strong>. Requests block bodies corresponding to canonical block hashes, receives them, verifies and persists in 2 tables in the database:</p><ul><li><p><code>BlockBody: height =&gt; (start_tx_id; tx_count)</code></p></li><li><p><code>EthTx: tx_id =&gt; RLP encoding of tx</code></p></li></ul></li><li><p><strong>Senders</strong>. Processes digital signatures (ECDSA) of transactions and &#8220;recovers&#8221; corresponding public keys, and therefore, &#8220;From&#8221; addresses for each transaction, persists them into a table in the database:</p><ul><li><p><code>Senders: height =&gt; sender_0|sender_1|&#8230;|sender_{tx_count-1}</code></p></li></ul></li><li><p><strong>Execution</strong>. Replays all transactions and computes so-called &#8220;Plain State&#8221;, as well as 2 types of change logs, and receipts and event logs, persisting all these into tables in the database. It also create another, temporary table, which is later used one the Call Trace Index Stage.</p><ul><li><p><code>PlainState: account_address =&gt; (balance; nonce; code_hash)</code> or <code>account_address|incarnation|location =&gt; storage_value</code></p></li><li><p><code>PlainContractCode: account_address|incarnation =&gt; code_hash</code></p></li><li><p><code>Code: code_hash =&gt; contract_bytecode</code></p></li><li><p><code>AccountChangeSet: height =&gt; account_address =&gt; (prev_balance; prev_nonce; prev_code_hash)</code></p></li><li><p><code>StorageChangeSet: height =&gt; account_address|location =&gt; prev_storage_value</code></p></li><li><p><code>Receipts: height =&gt; CBOR encoding of receipts</code></p></li><li><p><code>Log: height|tx_index =&gt; CBOR encoding of event logs</code></p></li><li><p><code>CallTraceSet: height =&gt; account_address =&gt; (bit_from; bit_to)</code></p></li></ul></li><li><p><strong>Hashed State</strong>. Exists only to provide input data for the next stage. Reads new records in the tables AccountChangeSet and StorageChangeSet, to determine new account addresses and storage locations added to the state, and adds entries to two tables, which have similar content to PlainState, except the mapping is from &#8220;hashed keys&#8221;, and accounts and storage items are in separate tables:</p><ul><li><p><code>HashesAccounts: keccak256(account_address) =&gt; (balance; nonce; code_hash)</code></p></li><li><p><code>HashedStorage: keccak256(account_address)|incarnation|keccak256(location) =&gt; storage_value</code></p></li></ul></li><li><p><strong>Trie</strong>. Calculates state root hash, as well as maintains two tables (<code>TrieOfAccounts</code> and <code>TrieOfStorage</code>) in the database allowing incrementation computation of state root hash to be done more efficiently.</p></li><li><p><strong>Call Trace Index</strong>. Processes data from temporary table CallTraceSet and creates two inverted indices (represented by roaring bitmaps):</p><ul><li><p><code>CallFromIndex: account_address =&gt; bitmap of heights where account has &#8220;from&#8221; traces</code></p></li><li><p><code>CallToIndex: account_address =&gt; bitmap of heights where accounts has &#8220;to&#8221; traces</code></p></li></ul></li><li><p><strong>History Index</strong>. Processes data from <code>AccountChangeSet</code> and <code>StorageChangeSet</code> tables and creates two inverted indices (as roaring bitmaps):</p><ul><li><p><code>AccountHistory: account_address =&gt; bitmap of heights where account was modified</code></p></li><li><p><code>StorageHistory: account_address|location =&gt; bitmap of heights where storage item was modified</code></p></li></ul></li><li><p><strong>Log Index</strong>. Processes data from <code>Log</code> table and creates two inverted indices (as roaring bitmaps):</p><ul><li><p><code>LogAddressIndex: account_address =&gt; bitmap of heights where account is mentioned in any event logs</code></p></li><li><p><code>LogTopicIndex: topic =&gt; bitmap of heights where topic is mentioned in any event logs</code></p></li></ul></li><li><p><strong>Tx Lookup</strong>. Processes data from <code>BlockBody</code> and <code>EthTx</code> tables and persists mapping that allows finding transactions by their tx hash:</p><ul><li><p><code>TxLookup: tx_hash =&gt; height</code></p></li></ul></li></ul><p></p><p>Whenever control flow reaches any stage, it attempts to process all data available for this stage at the moment. This means that during initial launch, Headers stage will attempt to download all existing block headers, Bodies stage will attempt to download all corresponding block bodies, and so on. It can take many hours before control returns to the Headers stage again, by which time there are more headers available, so the process repeats, but with much fewer number of headers, and then blocks. Eventually, these repetitions converge to processing 1 (or sometimes more) blocks at a time, as they are being produced by the network.</p><p>Another control flow, shown in blue, is driven by data arriving from other peers, as managed by sentry. Receiving newly produced blocks, or response to requested headers and block bodies, may happen at the time when the Stage Loop (yellow control flow) is away from the &#8220;Headers&#8221; or &#8220;Bodies&#8221; stages, those that are able to &#8220;ingest&#8221; new headers and block bodies correspondingly. In order not to block the blue control flow, so-called &#8220;Exchange&#8221; data structures are introduced. They allow for the blue control to deposit data and for the yellow control flow to pick the data up. Of course, these exchanges need to be designed such that they do not consume unlimited memory, but at the same time minimise amount of repeated requests, and latency of delivery of the latest headers and blocks. In order words, it is not trivial, and there are still bugs in the implementation, unfortunately.</p><h2>The Merge</h2><p>Design of &#8220;The Merge&#8221; (a.k.a. POS transition) introduced another, third control flow in the diagram above. It is control flow communicating with the Consensus Layer (CL). Details of the interaction between Staged Sync, Sentry flow, and CL flow are still being worked out, and hopefully will be described in another post. As one may suspect, things are getting more complicated&#8230;</p><p></p>]]></content:encoded></item><item><title><![CDATA[More on the disk footprint of Erigon alpha]]></title><description><![CDATA[After looking at the charts in the previous post, it occurred to us that the &#8220;CallTraceSet&#8221; table is unusually large.]]></description><link>https://erigon.substack.com/p/more-on-the-disk-footprint-of-erigon</link><guid isPermaLink="false">https://erigon.substack.com/p/more-on-the-disk-footprint-of-erigon</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Wed, 27 Apr 2022 18:28:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!swCi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>After looking at the charts in the previous post, it occurred to us that the &#8220;CallTraceSet&#8221; table is unusually large. This table holds intermediate data, which are used to build call trace indices (for supporting <code>trace_filter</code> RPC method). Previously, this table was pruned once the indices were built, however, the code that did it, was removed by mistake some time ago. As a result, in both beta and alpha version, there is 140 Gb of footprint which should not be there. The fix has been done in the current code, and it will be part of the next alpha release. Unfortunately, MDBX database does not shrink when a lot of data is deleted, so actually reclaiming those 140 Gb will require cleaning MDBX database (but snapshots can be kept intact), and re-running the replay from genesis. Alternatively, the database can be compacted if enough temporary disk space is available, using the command (Erigon needs to be off-line):</p><p><code>./build/bin/mdbx_copy -c &lt;source_db&gt; &lt;destination_db&gt;</code></p><p>Now if we remove that &#8220;dead weight table&#8221;, the charts would look as follows (this is theoretical, because it will take couple of days to actually produce such database now):</p><p></p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!swCi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!swCi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png 424w, https://substackcdn.com/image/fetch/$s_!swCi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png 848w, https://substackcdn.com/image/fetch/$s_!swCi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png 1272w, https://substackcdn.com/image/fetch/$s_!swCi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!swCi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png" width="1424" height="1557" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1557,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:387138,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!swCi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png 424w, https://substackcdn.com/image/fetch/$s_!swCi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png 848w, https://substackcdn.com/image/fetch/$s_!swCi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png 1272w, https://substackcdn.com/image/fetch/$s_!swCi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb576f8a8-a695-48a4-97e9-2e3116b885df_1424x1557.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!adY7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!adY7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png 424w, https://substackcdn.com/image/fetch/$s_!adY7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png 848w, https://substackcdn.com/image/fetch/$s_!adY7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png 1272w, https://substackcdn.com/image/fetch/$s_!adY7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!adY7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png" width="1363" height="1673" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/bf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1673,&quot;width&quot;:1363,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:406459,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!adY7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png 424w, https://substackcdn.com/image/fetch/$s_!adY7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png 848w, https://substackcdn.com/image/fetch/$s_!adY7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png 1272w, https://substackcdn.com/image/fetch/$s_!adY7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7ab814-64a1-4a56-890e-02925b1f9daa_1363x1673.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Note that the actual sizes will be bigger because of the inevitable slack in the database after some period of use.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Disk footprint changes in new Erigon alpha]]></title><description><![CDATA[Today we are publishing another alpha release, 2022.04.04-alpha, LINK.]]></description><link>https://erigon.substack.com/p/disk-footprint-changes-in-new-erigon</link><guid isPermaLink="false">https://erigon.substack.com/p/disk-footprint-changes-in-new-erigon</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Wed, 27 Apr 2022 14:36:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!84Y4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Today we are publishing another alpha release, 2022.04.04-alpha, <a href="https://github.com/ledgerwatch/erigon/releases/tag/v2022.04.04">LINK</a>.</p><p>Multiple things were fixed and improved.</p><p>Most important problem with alpha release 2022.04.03 was the slow download speed of block snapshots via BitTorrent. Even though there were enough seeders around, the download speed was usually limited by 2Mb/s. Although the exact root cause has not yet been determined, we have observed that:</p><ul><li><p>Downloading via 3rd party BitTorrent clients does not have this issue, so it is likely that the root cause is due to the library Erigon uses or the manner in which it is used.</p></li><li><p>If files are downloaded one at a time, instead of all at the same time, the speed improves.</p></li></ul><p>In version 2022.04.04, we therefore introduce a temporary workaround, to download files one by one, which leads to much more reasonable download times (otherwise it takes around 32 hours to download Ethereum main net block snapshots of 225 Gb at the speed of 2Mb/s).</p><p>There were also issues with the last stage of initial sync, called &#8220;TxLookup&#8221;. This stage manages the mapping that allows locating transaction payload by their hashes. Since in alpha release, most of this mapping was moved from the MDBX database to the indices based on perfect hashing, the issues may arise on the &#8220;edge&#8221;. If there are any issues, please update to the new version, and if they persist, use integration tool to reset the &#8220;TxLookup&#8221; stage:</p><p><code>make integration</code></p><p><code>./build/bin/integration stage_tx_lookup &#8212;reset &#8212;datadir &lt;your_datadir&gt;</code></p><p>The main topic of this post is the comparison of disk footprint between beta (current stable versions of Erigon) and alpha (with improvements coming from Erigon 2 upgrade 1). Here are the charts:</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!84Y4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!84Y4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png 424w, https://substackcdn.com/image/fetch/$s_!84Y4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png 848w, https://substackcdn.com/image/fetch/$s_!84Y4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png 1272w, https://substackcdn.com/image/fetch/$s_!84Y4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!84Y4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png" width="1342" height="1795" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1795,&quot;width&quot;:1342,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:399057,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!84Y4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png 424w, https://substackcdn.com/image/fetch/$s_!84Y4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png 848w, https://substackcdn.com/image/fetch/$s_!84Y4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png 1272w, https://substackcdn.com/image/fetch/$s_!84Y4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6b01011-84b0-410d-af15-0abe0e21ce0d_1342x1795.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DNMA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DNMA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png 424w, https://substackcdn.com/image/fetch/$s_!DNMA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png 848w, https://substackcdn.com/image/fetch/$s_!DNMA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png 1272w, https://substackcdn.com/image/fetch/$s_!DNMA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DNMA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png" width="1362" height="1702" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1702,&quot;width&quot;:1362,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:412193,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DNMA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png 424w, https://substackcdn.com/image/fetch/$s_!DNMA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png 848w, https://substackcdn.com/image/fetch/$s_!DNMA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png 1272w, https://substackcdn.com/image/fetch/$s_!DNMA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17fcac80-2d11-48e1-9c9b-3274d234891c_1362x1702.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>First thing to note is that in beta version, all the data are kept in the single MDBX database file, which at the time of writing should come at around 1858 Gb after a fresh sync for Ethereum main net. Within that database file, there are individual tables shown as segments in the charts. In alpha version, data related to block headers, block bodies, transaction payloads, senders (originators of transactions), and mapping from transaction hashes to transaction payload, are mostly moved from the MDBX database file into separate static files which are shared and downloaded via BitTorrent. Total size of these shared files is around 225 Gb.</p><p>All corresponding segments are coloured in the same colour on both charts, which makes it easy to see that two segments that shrank the most are Transactions (light green, 477 Gb =&gt; 17.5 Gb), and Transaction Lookup (grey, 101.3 Gb =&gt; 1.3 Gb).</p><p>Another thing to note is the biggest tables in the ALPHA footprint breakdown: Event Logs, Account History, Storage History, Call Trace Set. These tables will be the focus of Erigon 2 Upgrade 2.</p><p>And lastly, similar to go-ethereum freezer (a.k.a ancient storage), the static files can now be mounted on different drives and do not need to be co-located with the rest of the data. However, we have not yet tested the performance of the configuration where these files are moved to a cheaper but slower storage, like HDD.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Erigon alpha release 2022.04.02-alpha]]></title><description><![CDATA[This is the first release of Erigon that contains the code required for transition to POS (Proof Of Stake) via cooperation with one of the CL (Consensus Layer) implementations.]]></description><link>https://erigon.substack.com/p/erigon-alpha-release-20220402-alpha</link><guid isPermaLink="false">https://erigon.substack.com/p/erigon-alpha-release-20220402-alpha</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Thu, 21 Apr 2022 18:03:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!aeCw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is the first release of Erigon that contains the code required for transition to POS (Proof Of Stake) via cooperation with one of the CL (Consensus Layer) implementations. It also contains the first upgrade of Erigon 2, as described in the previous post: </p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:52108636,&quot;url&quot;:&quot;https://erigon.substack.com/p/erigon-2-three-upgrades&quot;,&quot;publication_id&quot;:707077,&quot;publication_name&quot;:&quot;Erigon Blog&quot;,&quot;publication_logo_url&quot;:null,&quot;title&quot;:&quot;Erigon 2 - three upgrades&quot;,&quot;truncated_body_text&quot;:&quot;Two flavours of Erigon - going back to Alpha Presently, Erigon is available for the users in two main &#8220;flavours&#8221;: Beta releases - these have been published roughly every week, but sometimes less frequently. Main objective of these releases has been to stabilise the code (by fixing issues) while continuing adding missing features. It is assumed that subseq&#8230;&quot;,&quot;date&quot;:&quot;2022-04-12T21:57:41.855Z&quot;,&quot;like_count&quot;:2,&quot;comment_count&quot;:0,&quot;bylines&quot;:[{&quot;id&quot;:1136970,&quot;name&quot;:&quot;Alex Sharp&quot;,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/28aa862c-680b-46c1-b6ce-d78061a82c11_144x144.png&quot;,&quot;bio&quot;:null,&quot;profile_set_up_at&quot;:null,&quot;publicationUsers&quot;:[{&quot;id&quot;:641517,&quot;user_id&quot;:1136970,&quot;publication_id&quot;:707077,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:707077,&quot;name&quot;:&quot;Erigon Blog&quot;,&quot;subdomain&quot;:&quot;erigon&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Erigon&quot;,&quot;logo_url&quot;:null,&quot;author_id&quot;:1136970,&quot;theme_var_background_pop&quot;:&quot;#FD5353&quot;,&quot;created_at&quot;:&quot;2022-01-23T19:53:06.570Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Alex Sharp&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false}}],&quot;is_guest&quot;:false}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:false,&quot;type&quot;:null,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://erigon.substack.com/p/erigon-2-three-upgrades?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><span></span><span class="embedded-post-publication-name">Erigon Blog</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">Erigon 2 - three upgrades</div></div><div class="embedded-post-body">Two flavours of Erigon - going back to Alpha Presently, Erigon is available for the users in two main &#8220;flavours&#8221;: Beta releases - these have been published roughly every week, but sometimes less frequently. Main objective of these releases has been to stabilise the code (by fixing issues) while continuing adding missing features. It is assumed that subseq&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">4 years ago &#183; 2 likes &#183; Alex Sharp</div></a></div><p>This is the <strong><a href="https://github.com/ledgerwatch/erigon/releases/tag/v2022.04.03">TAG</a></strong>.</p><p>Main things to know about this release:</p><ol><li><p>You CANNOT upgrade your existing Erigon database that was built by one of the previous beta releases. You need to sync from scratch.</p></li><li><p>Currently, to build this alpha code, go 1.18 is required. We have a workaround for 1.17, but it is not in this version.</p></li><li><p>If you are a &#8220;casual user&#8221;, you do not need to run RPC daemon in a separate process. Instead, you can use the embedded RPC daemon, which is on by default (can be turned off by <code>http false</code> command line flag).</p></li><li><p>BitTorrent protocol gets involved to download most of the headers and blocks (turned on by default for Ethereum main net, G&#246;rli testnet and BSC main net). By default, download rate limit is 8mb/s, and upload rate limit is 4mb/s. These limits can be changed by command line flags <code>torrent.download.rate</code> and <code>torrent.upload.rate</code>. In the current code, BitTorrent DHT is not used. Some number of seeders have been bootstrapped for Ethereum mainnet (in progress for BSC mainnet), but the more nodes join the network, the quicker the download will be for everyone else.</p></li><li><p>For BitTorrent download to work, port 42069 needs to be open for both TCP and UDP.</p></li><li><p>BSC mainnet works on this release, but not yet Bor (Polygon).</p></li></ol><h2>Plan for further releases</h2><p>Further releases may become more confusing, at least for some time. Here is an attempt to explain:</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aeCw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aeCw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png 424w, https://substackcdn.com/image/fetch/$s_!aeCw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png 848w, https://substackcdn.com/image/fetch/$s_!aeCw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png 1272w, https://substackcdn.com/image/fetch/$s_!aeCw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aeCw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png" width="859" height="732" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:732,&quot;width&quot;:859,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:82498,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aeCw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png 424w, https://substackcdn.com/image/fetch/$s_!aeCw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png 848w, https://substackcdn.com/image/fetch/$s_!aeCw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png 1272w, https://substackcdn.com/image/fetch/$s_!aeCw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76330b08-d65f-4b58-840c-a48c3f862f2e_859x732.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Up to now, we were using <code>stable</code> branch to publish beta releases. Out of all PRs made to the <code>devel</code> branch (where most of the current development happens), only some are cherry-picked into <code>stable</code>. These are bug fixes and missing features. This allowed us to keep developing the support for &#8220;The merge&#8221; as well as Erigon 2 without affecting Erigon users who required relative stability of the beta.</p><p>Now we are creating <code>alpha</code> branch, which is going to be used to publish alpha releases. Our intent, similarly to the <code>stable</code> branch, to only cherry-pick into <code>alpha</code> branch bug fixes, missing features (mostly for the POS transition) and substantial optimisations (for example, we know that current version required 6Gb in the heap for Huffman decoding tables, a side effect of an optimisation, and we may make a change to move these 6Gb out of the heap into the virtual memory). At some point before the POS transition we will discontinue what currently is called &#8220;Beta&#8221; and the current &#8220;Alpha&#8221; will become de-facto beta.</p><p>What will happen after that with the various branches and releases is not clear yet, but the plans will be published as soon as they solidify. Our current goal is to help Erigon users to:</p><ul><li><p>Experience the POS transition functionality and the first part of Erigon 2 (blockchain snapshots).</p></li><li><p>Gradually migrate their infrastructure before the POS transition, flagging up any issues so they can be fixed.</p></li></ul><p></p>]]></content:encoded></item><item><title><![CDATA[Architecture of Erigon - separable and embeddable components]]></title><description><![CDATA[Erigon is different from many other implementations of Ethereum (or other blockchain protocols) is that it is less monolithic and more modular.]]></description><link>https://erigon.substack.com/p/architecture-of-erigon-separable</link><guid isPermaLink="false">https://erigon.substack.com/p/architecture-of-erigon-separable</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Tue, 19 Apr 2022 06:56:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!W1HF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Erigon is different from many other implementations of Ethereum (or other blockchain protocols) is that it is less monolithic and more modular. But the word "modular" here needs to be understood quite specifically. Modules are not just code packages that end up complied into a single executable. In Erigon, modules (or we more often call them "components") are parts of Erigon that can be taken out into a separate executable, and then operated in its own process (of the operating system), or even on its own computer in the network. Below is the illustration of how Erigon currently splits up into components (modules):</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W1HF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W1HF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png 424w, https://substackcdn.com/image/fetch/$s_!W1HF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png 848w, https://substackcdn.com/image/fetch/$s_!W1HF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png 1272w, https://substackcdn.com/image/fetch/$s_!W1HF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W1HF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png" width="607" height="581" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:581,&quot;width&quot;:607,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:45117,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!W1HF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png 424w, https://substackcdn.com/image/fetch/$s_!W1HF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png 848w, https://substackcdn.com/image/fetch/$s_!W1HF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png 1272w, https://substackcdn.com/image/fetch/$s_!W1HF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2de43fb-457e-4691-86bb-c655d8c3c48b_607x581.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Components are shown as rectangles. In the current version of Erigon code, all components shown as rectangles are &#8220;separable&#8221;, meaning that they can be run as separate processes. Where two overlapping rectangles are shown, it means that more than one component of this type can be run at the same time, and on multiple computers. All components are separable, and all of them can currently run within the same process (embeddable). However, downloader/seeder components need need to be run on the same computer even if they are separated, to be able to share downloaded and seeded files with Erigon.</p><p>The &#8220;lollipop&#8221; notation is explained below:</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RTEf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RTEf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png 424w, https://substackcdn.com/image/fetch/$s_!RTEf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png 848w, https://substackcdn.com/image/fetch/$s_!RTEf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png 1272w, https://substackcdn.com/image/fetch/$s_!RTEf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RTEf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png" width="322" height="67" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:67,&quot;width&quot;:322,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:15031,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RTEf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png 424w, https://substackcdn.com/image/fetch/$s_!RTEf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png 848w, https://substackcdn.com/image/fetch/$s_!RTEf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png 1272w, https://substackcdn.com/image/fetch/$s_!RTEf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87bf9cfe-2a02-46e0-a3c0-eb2588d5b046_322x67.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>All interactions in the diagram above are numbered with numbers in blue background. Below is the description of what each interaction is for:</p><ol><li><p>ETH sentry connects to the Ethereum p2p network. It performs these main functions: peer discovery (via Kademlia DHT, via DNS lookup, via configured static peers, via node info saved in the database, or via boot nodes pre-configured in the source code), peer management (handshakes, holding p2p connection even if Erigon is restarted).</p></li><li><p>ETH core interacts with the Ethereum p2p network via Sentry component. Sentry presents a simple interface to the core, with functions to download data, receive notifications about gossip messages, upload data upon request from peers, and broadcast gossip messages to either specially selected set of peers, or to all peers. It is possible to have multiple Sentries to increase the connectivity to the network, or obscure the position of the Core computer.</p></li><li><p>ETH core instructs the ETH downloader/seeder component to download (and then seed) specific files from BitTorrent network. Files are specified as their &#8220;info hashes&#8221;, which is a form of content addressing. The files ETH core instructs to download are block headers, block bodies, and in the near future also parts of the Ethereum state and various indices.</p></li><li><p>ETH downloader/seeder interacts with the BitTorrent network in order to retrieve files required by ETH core.</p></li><li><p>ETH TxPool uses ETH sentry to download initial set of transactions currently unconfirmed, as well as to receive gossip about new transactions, re-broadcast them, and inject transactions created by users and submitted via ETH RPC api.</p></li><li><p>ETH TxPool connects to ETH core to be able to fetch the up-to-date information about account balances and account nonces for the transactions in the pool. It also subscribes to the stream of state updates to be able to maintain a partial cache of the state, to reduce the interaction in the long run.</p></li><li><p>ETH RPC api connects to ETH core to be able to access any data in the ETH core&#8217;s database or other sources (downloaded files), as well as other information (for example, number of currently connected peers via ETH sentries). Through this connection RPC api also subscribes to the stream of state updates to be able to maintain a partial cache of the state, so it can respond to some of the queries using fewer interactions with the ETH core.</p></li><li><p>ETH RPC api connects to ETH TxPool to be able to query transaction pool as well as inject new transactions to be broadcasted to the Ethereum network.</p></li><li><p>User connects to ETH PRC api to query data about current or historical state of Ethereum, subscribe to notifications, and send new transactions to the Ethereum network.</p></li></ol><h2>Rollup architecture</h2><p>Though not yet realised, the modularity of Erigon architecture makes it very suitable platform for implementing rollups based on Ethereum. Here is a theoretical rollup node architecture:</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VWvd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VWvd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png 424w, https://substackcdn.com/image/fetch/$s_!VWvd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png 848w, https://substackcdn.com/image/fetch/$s_!VWvd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png 1272w, https://substackcdn.com/image/fetch/$s_!VWvd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VWvd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png" width="1127" height="681" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:681,&quot;width&quot;:1127,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:79275,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VWvd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png 424w, https://substackcdn.com/image/fetch/$s_!VWvd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png 848w, https://substackcdn.com/image/fetch/$s_!VWvd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png 1272w, https://substackcdn.com/image/fetch/$s_!VWvd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73869ca4-0f5d-4670-9f90-db87c4eb3463_1127x681.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>One can observe on the diagram above that the &#8220;rollup&#8221; part is mostly a mirror image of the &#8220;ETH&#8221; part, with one extra connection (number 10) from Rollup core to ETH core. This connection is required for the Rollup Core to be notified of events happening in ETH code (usually interacting with the dedicated contract deployed on Ethereum). In the version of the architecture for the block-producing rollup nodes, where will also be a connection (not shown on the diagram above) between Rollup Core and ETH TxPool(s), so that transactions that &#8220;roll up&#8221; data into Ethereum blocks can be added directly without having to go via JSON RPC and pay the extra cost of data transformations and having less interactive interface (connections between components support duplex streams, for example).</p><p>Since all the components are embeddable, it should be possible to realise the entire rollup node (including ETH part) in one executable for convenience. Of course, for more scalable installations, any parts can be taken out and many of them - multiplied.</p><h2>Architecture after the transition to Proof Of Stake</h2><p>Current design of &#8220;The Merge&#8221; does disrupt the architectural elegance presented above. There is no diagram for it yet, but it is easy to imagine a CL (Consensus Layer) component plugged in to the ETH RPC api component. Also, for some time, CL will not be embeddable, and will not utilise the richness of the communication protocol used between other components (duplex streams, for example).</p><p>This is, of course, the area where more thinking and design needs to happen. Perhaps the way to go is to create a version of CL implementation that can be embeddable. This is especially interesting for rollup implementations that will themselves use CL implementation for their rollup consensus.</p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Staged Sync and short history of Silkworm project]]></title><description><![CDATA[In the beginning of 2020, a decision was made to introduce so-called Staged Sync to Erigon (back then, it was called &#8220;Turbo-Geth&#8221;).]]></description><link>https://erigon.substack.com/p/staged-sync-and-short-history-of</link><guid isPermaLink="false">https://erigon.substack.com/p/staged-sync-and-short-history-of</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Sat, 16 Apr 2022 11:58:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!f1RU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the beginning of 2020, a decision was made to introduce so-called Staged Sync to Erigon (back then, it was called &#8220;Turbo-Geth&#8221;). The idea is simple, but counter-intuitive.</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f1RU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f1RU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png 424w, https://substackcdn.com/image/fetch/$s_!f1RU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png 848w, https://substackcdn.com/image/fetch/$s_!f1RU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png 1272w, https://substackcdn.com/image/fetch/$s_!f1RU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f1RU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png" width="1456" height="702" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:702,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:125232,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!f1RU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png 424w, https://substackcdn.com/image/fetch/$s_!f1RU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png 848w, https://substackcdn.com/image/fetch/$s_!f1RU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png 1272w, https://substackcdn.com/image/fetch/$s_!f1RU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a63d7a-67d4-450e-a601-7ae6df32fed0_1992x961.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>On the picture above, it is assumed that Ethereum implementation processes the blocks received from the network, as a series of pipelines. On the picture, there are 7 stages in such pipeline, shown by 7 colours (in reality, it does not have to be 7). Intuitively, one would want to maximise the utilisation of multi-core or multi-CPU computers and so run many pipelines concurrently. Staged sync goes against this intuition, and proposes the processing model where all available blocks first go through stage 1 of the pipeline, then all of them go through stage 2 of the pipeline and so on. Within each stage, concurrency is allowed, but more often than not, it is actually parallelism more than concurrency that matters. Certain stages in the pipeline, for example, verification of signatures are so-called &#8220;embarrassingly parallel&#8221; tasks. Others are mostly I/O bound and do not benefit from parallelism. In fact, concurrency may even degrade performance due to content switching and lost locality of data access.</p><p>The reason why Staged Sync looks counter-intuitive is that simple model shown in the picture above predicts that it will be slower than concurrent processing. In reality, it is not slower. It is not much faster either. As it was determined later, the main reason Erigon&#8217;s Staged Sync ends up being faster than alternatives, is the decoupling of state and Patricia Merkle tree in the data model. Using this decoupling, it is possible to defer the update of the Patricia Merkle tree, and computation of the state root until after all the EVM transaction processing is done, which speeds up the process significantly. Staged Sync makes this approach very natural and almost inevitable.</p><p>But other very interesting consequences of adopting the Staged Sync are to do with the development process of Erigon (and later Silkworm and Akula), so-called force multipliers:</p><ol><li><p>Profiling of individual stage gives better insights about performance of that stage and results in quicker optimisations (force multiplier 1).</p></li><li><p>Well-defined inputs and outputs of each stage makes it possible to assemble and maintain them in isolation (force multiplier 2).</p></li><li><p>Significant speed up of the full sync (cut from couple of weeks to couple of days) enables more testing and empowers bigger changes (force multiplier 3).</p></li></ol><p>The longest stage was (and still is) the replay of all transaction in EVM, and computation of the resulting state of Ethereum. This stage is customary called &#8220;Execution&#8221; stage. Due to the force multiplier mentioned above, a lot of profiling and optimisations have been performed in the beginning on 2020, and eventually we arrived at this rough split of wall time:</p><ul><li><p>Roughly 1/3 was taken by the EVM interpreter</p></li><li><p>Roughly 1/3 was taken by the Golang&#8217;s garbage collector (after optimisations targeting allocations)</p></li><li><p>Roughly 1/3 was taken by I/O (mostly reads from LMDB - this was prior to MDBX)</p></li></ul><p>At the same time, we saw experiments of evmone&#8217;s team (evmone is EVM interpreter written in C/C++) to integrate into go-ethereum. We integrated evmone (via EVMC interface) into Erigon (then Turbo-Geth). Even though the sheer performance of evmone was better than built-in interpreter inherited from go-ethereum, there was a lot of overhead introduced by the EVMC interface coupled with CGo (Golang&#8217;s interface for interacting with the code written in other languages). The main problem was that EVMC is designed around not just calling of the &#8220;host&#8221; into EVMC, but also calling out of EVMC into the &#8220;host&#8221;. And the latter part was introducing the overhead. In order to fix this, we needed to effectively &#8220;enlarge&#8221; EVMC to envelope it with some extra C/C++ code to remove the interfacing overheads.</p><p>We also determined that squeezing more out of Golang in terms of minimising allocation would lead to poorer readability of code and deviation from the idiomatic use of the language. We thought: instead of writing in Go as if it was C++, we might as well just write in C++.</p><p>And this is how the Silkworm project (C++ implementation of Ethereum based on Erigon component model, data model, and Staged sync architecture) started. This happened around May 2020.</p><p>The current status of Silkworm project will be described in one of the future posts.</p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Erigon 2 - three upgrades]]></title><description><![CDATA[Two flavours of Erigon - going back to Alpha]]></description><link>https://erigon.substack.com/p/erigon-2-three-upgrades</link><guid isPermaLink="false">https://erigon.substack.com/p/erigon-2-three-upgrades</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Tue, 12 Apr 2022 21:57:41 GMT</pubDate><content:encoded><![CDATA[<h2>Two flavours of Erigon - going back to Alpha</h2><p>Presently, Erigon is available for the users in two main &#8220;flavours&#8221;:</p><ol><li><p>Beta releases - these have been published roughly every week, but sometimes less frequently. Main objective of these releases has been to stabilise the code (by fixing issues) while continuing adding missing features. It is assumed that subsequent versions are compatible with one another, so that users can keep upgrading without having to rebuild their databases.</p></li><li><p>Cutting-edge <code>devel</code> branch. There are no promises made about compatibility of subsequent versions (and there are no versions per se, apart from commit hashes). This is to enable development team to move quickly with implementing the support for &#8220;The Merge&#8221; (upcoming Ethereum transition to Proof Of Stake), as well as series of upgrades currently named &#8220;Erigon 2&#8221;.</p></li></ol><p>Very soon, available &#8220;flavours&#8221; will change. Erigon will continue to have beta releases, though the cadence is likely to decrease. This beta version should be operational up until &#8220;The Merge&#8221;, but it will not allow users to transition.</p><p>Instead, Erigon will start publishing Alpha versions again, with the aim of taking a cut of <code>devel</code> branch and gradually stabilising into beta version. These alpha versions should be upgradeable from one another (should data model change, automatic data migration will be provided), but it will not be possible to migrate the database from current &#8220;Beta&#8221; to that new &#8220;Alpha&#8221;.</p><p>The new Alpha versions will contain mainly the following improvements:</p><ol><li><p>Support for &#8220;The Merge&#8221;, transition to Proof Of Stake. Implementation is not yet finalised, but any further updates will be cherry-picked from <code>devel</code> branch to Alpha releases.</p></li><li><p>Embeddable RPC daemon. Prior to this, there was no option to run RPC daemon in the same OS (Operating System) process as Erigon. And one could get good performance simply by running on the same computer but with &#8220;shared memory&#8221; mode. However, the design of &#8220;The Merge&#8221; requires the EL (Execution Layer, of which Erigon is one of the implementation) to expose JSON RPC for the CL (Consensus Layer), making it non-meaningful to run Erigon without an RPC daemon. It is still possible to run multiple RPC daemons per Erigon node, one of them can be embedded.</p></li><li><p>Implementation of BSC. There is an implementation of Parlia in Erigon (but not in Beta releases), which appears to work. However, it is not easy to support heavy chains like Ethereum Mainnet, BSC, and Bor (part of Polygon), because any potentially disruptive changes need to be tested using full resync, which is currently very time consuming for BSC and Bor. In fact, for this reason, implementation of Bor is still not functional. These testing issues will hopefully be addressed in the 3rd upgrade of Erigon 2 (see below), and this may enable better support for heavy chains.</p></li><li><p>First upgrade (<strong>Upgrade 1</strong>) of Erigon 2. What are the upgrades of Erigon 2 is the main topic of this post, so it will follow.</p></li></ol><h2>Goal of Erigon 2</h2><p>Erigon2 is the modification of Erigon1 (currently available) aimed primarily at solving two problems described below, and, secondarily, at resolving any issues that arise from solving the primary problems.</p><h3><strong>Snapshot sync (boostrapping)</strong></h3><p>First primary problem is the Erigon's inability to perform snapshot sync, which is bootstrapping the node without having to replay all historical transactions from the Genesis. Solving this does not simply improve user experience, but also makes it easier for the developers of Erigon to support large blockchains. Without snapshot sync, testing any potentially disruptive changes requires full replay since Genesis. This becomes more impractical as the supported blockchain grow. With snapshot sync, we have a convention that testing is only performed for the blocks above certain height, and all blocks below that have pre-computed history available for download as snapshots.</p><h3><strong>Granularity of history</strong></h3><p>In Erigon1, history of the blockchain state, and all other indices related to that history, are granular up to a block. However, from user's perspective, transaction granularity makes much more sense. Blocks exist only as optimisation neccesary to order transactions without requiring them to refer to one another. When state history and related indices have block granularity, the peformance of accessing such history deteriorates as number of transactions in a typical block grows. This is because an index only narrows down the search to the closest block, and the search for specific transaction has to be done sequentially by replaying transactions one by one from the start of the block. Erigon2 aims at recording state history at transaction granularity. All related indices would also be at transaction granularity. This means that indices will narrow down the search to specific transaction, and the peformance of this search would be independent of how many transactions there are in a typical block.</p><h2>Three upgrades of Erigon 2</h2><p>Current plain is to roll out Erigon 2 as a series of three upgrades. Each upgrade will require re-sync from scratch since the data models will be incompatible. Here is the rough description of these upgrades.</p><h3>Upgrade 1</h3><ul><li><p>Upgrade introduces infrastructure (based on BitTorrent) for downloading and seeding static files.</p></li><li><p>Nodes download, then seed static files for block headers, block bodies, transactions, and lookup index to search transaction using their hashes. Further on, they automatically produce and seed new static files, meaning that centralised seeder servers will only be required to bootstrap the swarms.</p></li><li><p>Upgrade establishes the first (perhaps naive) format for static files, with notable features of dictionary-based compression, and indexing based on minimal perfect hash tables.</p></li></ul><h3>Upgrade 2</h3><ul><li><p>Using experience with Upgrade 1, this upgrade is likely to improve the format for static files, with more emphasis on encoding of monotonic integer sequences (e.g. Elias-Fano)</p></li><li><p>Nodes download, then seed history of state, as well as indices for event logs and call traces, in addition to all the things from Upgrade 1. Big difference from Erigon 1 here is that the granularity of indices is changed to per-transaction, which is likely to improve performance of most historical queries (especially <code>trace_filter</code>). Further on, they automatically produce and seed new static files for state history, event log indices, and call trace indices, meaning that centralised seeder servers will only be required to bootstrap the swarms.</p></li><li><p>Full replay from genesis is still required to compute the state. However, because most of the history, event logs and call traces are already downloaded, the initial full replay will happen slightly faster. There may also be more simple techniques that use &#8220;benefits of the hindsight&#8221; to speed up the state computation.</p></li></ul><h3>Upgrade 3</h3><ul><li><p>Using experience with Upgrade 2, this upgrade is likely to improve the format for static files, with more emphasis on encoding the intermediate commitments, such as patricia trees (hexary and binary), and B+trees, with flexible choice of hash functions.</p></li><li><p>Nodes download reasonably recent state as a composition of static files, and only use replay to apply recent changes. As with other types of data, further on, new files are automatically produced and seeded. A new complexity here is that static files for static will sometimes need to be removed, as they are getting merged into larger files.</p></li></ul><p>After these three upgrades, the full vision of Erigon 2 should be realised.</p>]]></content:encoded></item><item><title><![CDATA[Coming soon]]></title><link>https://erigon.substack.com/p/coming-soon</link><guid isPermaLink="false">https://erigon.substack.com/p/coming-soon</guid><dc:creator><![CDATA[Alex Sharp]]></dc:creator><pubDate>Sun, 23 Jan 2022 19:53:07 GMT</pubDate><content:encoded><![CDATA[<h2></h2><p></p><p></p><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://erigon.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://erigon.substack.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item></channel></rss>