<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by 4rgon4ut on Medium]]></title>
        <description><![CDATA[Stories by 4rgon4ut on Medium]]></description>
        <link>https://medium.com/@4rgon4ut?source=rss-1bff7bd4fbf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PBRTfknjVLUjitkzEiYAMA.jpeg</url>
            <title>Stories by 4rgon4ut on Medium</title>
            <link>https://medium.com/@4rgon4ut?source=rss-1bff7bd4fbf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 15:07:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@4rgon4ut/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dencun Archives: EIP-4844 for Gnosis and Big Blocks Experiment]]></title>
            <link>https://medium.com/@4rgon4ut/dencun-archives-eip-4844-for-gnosis-and-big-blocks-experiment-2779730b0d55?source=rss-1bff7bd4fbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/2779730b0d55</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blob]]></category>
            <category><![CDATA[eip-4844]]></category>
            <category><![CDATA[dencun-upgrade]]></category>
            <category><![CDATA[gnosis]]></category>
            <dc:creator><![CDATA[4rgon4ut]]></dc:creator>
            <pubDate>Sat, 08 Jun 2024 16:34:50 GMT</pubDate>
            <atom:updated>2024-06-08T16:34:50.565Z</atom:updated>
            <content:encoded><![CDATA[<h3>Abstract</h3><p>In this exploration, we analyze the correlation between block size and chain performance, focusing on its implications for the Gnosis Chain. We aim to leverage these insights to optimize parameters for the Gnosis Chain, especially considering the introduction of <a href="https://eips.ethereum.org/EIPS/eip-4844">EIP-4844</a> in the Ethereum Dancun upgrade. <a href="https://eips.ethereum.org/EIPS/eip-4844">EIP-4844</a> proposes a new transaction format, accommodating ‘blob-carrying transactions’ with a significant data load, aligning with future sharding goals and necessitating an increase in block size for enhanced network efficiency.</p><h3>Big Blocks Experiment</h3><h4>Formal Description</h4><p>The <strong>Big Blocks experiment</strong> on Gnosis Chain is inspired by a similar experiment originally conducted by the Ethereum Foundation.</p><p>We analyzed block diffusion latency based on data collected from the so-called <strong>Sentry nodes</strong>. To collect most of the chain metrics, we used the <a href="https://github.com/ethpandaops/xatu">Xatu network monitoring tool</a>. For collecting execution payload sizes (in bytes), we utilized a fork of <a href="https://github.com/4rgon4ut/goteth">Goteth</a>.</p><p>Sentry nodes are actual Gnosis Chain full nodes with the Nethermind execution client and the Lighthouse consensus client running in different geolocations. During the analysis, we primarily focused on the effect of block size (in bytes) and derived a latency distribution for any given size.</p><h4>Experiment Steps</h4><ul><li>Measure “baseline” metrics under normal usage conditions.</li><li>Run a spammer tool to increase the average block size to a specific level.</li><li>Contrast key metrics against the baseline.</li></ul><h4>Analysis Time Range</h4><p>The <strong>experiment</strong> takes place on 04/10/2023 (dd/mm/yy). Big blocks were spammed within a range of approximately 3000 slots. The several days leading up to the experiment date were used to collect <strong>baseline</strong> network metrics:</p><ul><li>Highload range: 11480000 - 11483000</li><li>Baseline range: 11360000 - 11480000</li></ul><h3>Analysis</h3><h4>Preface</h4><p>It’s important to understand that various size buckets were utilized to spam the network during the experiment. It is considered that the average latency has a linear correlation with the block size up to a certain size threshold, with latency spikes occurring after surpassing the threshold.</p><h4>Latencies</h4><p>During the period of spamming large blocks, it was observed that high-sized blocks could significantly increase the average chain latency. The plot below illustrates the average latencies during the highload period:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/0*AiIeXd8U33miaFH-" /></figure><p>We can observe spikes where the average block observation latency increases to more than 2 seconds for over 50% of the blocks. There were also instances of super high latency blocks with latency exceeding 5 seconds (depicted by the blue spikes).</p><h4>Participation</h4><p>The following dashboards display how the participation rate was affected by the big blocks spam. The lowest chain head participation rate we recorded was approximately 17%:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M7oEfY_UQvnbob2w" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/0*VE4G3pjWriDh9O93" /></figure><h4>Deeper latencies analysis per size bucket</h4><p>This section aims to analyze the correlation between block size and latency with increased precision. Blocks were organized into groups based on their sizes.</p><p>Additionally, we need to consider the time interval required to attest the block.</p><p>As per the <a href="https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/validator.md#attesting">specification</a>:</p><blockquote><em>A validator should create and broadcast the attestation to the associated attestation subnet when either (a) the validator has received a valid block from the expected block proposer for the assigned slot or (b) </em><em>1 / INTERVALS_PER_SLOT of the slot has transpired ( </em><em>SECONDS_PER_SLOT / INTERVALS_PER_SLOT seconds after the start of the slot) -- whichever comes first.</em></blockquote><p>For the Gnosis chain, the attestation interval is calculated as follows:</p><pre>INTERVALS_PER_SLOT = 3<br>BLOCK_TIME = 5<br><br>interval = 5 * 1/3    # ~1.66 seconds</pre><p>This implies that to achieve a high head participation rate, a block should be propagated to the chain within a time lower than the <strong>1.66-second</strong> threshold.</p><p>Two following plots shows the average letency of all observations for a specific blocksizes:</p><p><strong>Proportional view by groups:</strong></p><figure><img alt="Proportional view by groups" src="https://cdn-images-1.medium.com/max/1024/0*IA9CqZse8jB1gIc8" /><figcaption><strong>Proportional view by groups</strong></figcaption></figure><p><strong>Beaming:</strong></p><figure><img alt="Beaming" src="https://cdn-images-1.medium.com/max/1024/0*BKwMD-kGaiU2DEHd" /><figcaption><strong>Beaming</strong></figcaption></figure><p>It is evident from this observation that latency increases significantly for the size buckets exceeding <strong>0.5MB</strong> (purple and brown groups). Furthermore, a considerable number of blocks from these groups no longer fit within the required 1.66-second interval, resulting in a decline in the head participation rate. Hence, we can consider blocks of size <strong>&gt;0.5MB</strong> as high latency blocks that may have a non-negligible impact on the chain’s performance.</p><p><strong>Median latencies graph:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*50mRrkL8Q_XMO3uI" /><figcaption><strong>Median latencies graph</strong></figcaption></figure><p>Here, a significant spike is evident within the size range of 0.75MB to 1MB. It is also evident that the distribution of latencies is less stable for the groups with larger block sizes.</p><p>The <strong>mean</strong> block size across the analyzed range is roughtly around <strong>75KB ~= 0.075MB</strong>.</p><h4>Analysis recap</h4><ul><li>“Safe” block size thsreshold is <strong>0.5MB</strong></li><li>Average block size is <strong>0.075MB</strong></li></ul><h3>EIP-4844</h3><p>The “Blobs” in the chain context refer to a unique transaction format. These transactions carry a substantial amount of data that cannot be accessed through EVM execution. They are included in a mempool awaiting inclusion by a block builder. Blobs essentially represent off-chain data, referenced within the chain.</p><p>When builders include blob transactions in a block, they contribute to the block’s data size, affecting its overall capacity. Blobs are designed to play a crucial role in data sharding, providing dedicated data space for rollups. Furthermore, network manages blob transactions within blocks as a “sidecar” to a beacon blocks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uqAWbo0adEghR9lB" /></figure><h4>Define proper number of blobs per block</h4><p>Is follows from the <a href="https://eips.ethereum.org/EIPS/eip-4844">specification</a> that the <strong>target</strong> and <strong>max</strong> number of blobs per block may be specified with TARGET_BLOB_GAS_PER_BLOCK and MAX_BLOB_GAS_PER_BLOCK parameters.</p><p>The size of single blob can be calculated as follows:</p><pre>BYTES_PER_FIELD_ELEMENT = 32<br>FIELD_ELEMENTS_PER_BLOB = 4096<br><br>byte_size = 32 * 4096            # 131072<br><br>mb_size = byte_size / 1024**2    # 0.125 (megabyte units conversion)</pre><p>Sizes that were stated in analysis recap above leading to the formula to calculate possible blobs blobs number per block to not create a DoS vector:</p><pre>import math<br><br>avg_block_size = 0.075<br>safe_size_threshold = 0.5<br>blob_size = 0.125<br><br>number_of_blobs = math.floor(                            # 3<br>    (safe_size_threshold - avg_block_size) / blob_size<br>)</pre><h4>Safe blob count arguments</h4><ul><li>Therefore, having a maximum of 3 blobs per block is considered safe and will not significantly impact network bandwidth, as demonstrated by the Big Blocks experiment. The key consideration in determining the suitable value in this context is the concern regarding the possibility of DoS attacks, as a higher blob count increases the potential for this vector.</li><li>It’s essential to consider that the Ethereum network plans to leverage blobs for a form of exchange, potentially allowing for an increased block size in exchange for offloading on-chain activity to Layer 2 (L2) protocols. Conversely, Gnosis Chain currently doesn’t have as many Layer 2 solutions in place, making the Ethereum concern less directly relevant for Gnosis at the moment.</li><li>Additionally, it’s important to note that the average block size and on-chain activity are expected to increase as we move towards a bull market period.</li></ul><h4>Higher blob count arguments</h4><ul><li>More blobs per block can facilitate the development and deployment of decentralized applications (dApps) on Gnosis Chain. Developers can leverage the increased data availability to create complex and feature-rich dApps.</li><li>Increasing number of blobs per block may enhances usability and support a variety of applications. It also facilitates seamless integration and advancement of Layer 2 (L2) protocols.</li></ul><h4>Backwards compatibility</h4><p>It is also feasible to configure the count of blobs per block, ensuring that modifying this count later in response to demand remains cost-effective and necessitates changes solely in the execution layer clients.</p><h3>Recap</h3><p>Based on the analysis described above, the ‘safe’ options are currently considered more relevant. The strongest argument for this lies in the very low cost to increase the maximum blobs count in the future. This quality allows the team to regulate the balance between security and usability in a reactive way. Not every feature allows for such an approach, so we should apply this scheme to EIP-4844 and move from the safest to the less safe options (if the demand for blob space overtakes the supply) to mitigate risks.</p><h4>1/2</h4><ul><li>Target blobs per block: 1</li><li>Maximal blobs per block: 2</li></ul><p>The safest available option with some reserve in case the block size on the network increases several times. It also fully covers the current demand on blob space (october 2023).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2779730b0d55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dencun Archives: Seeking for proper EIP-7514 value for Gnosis chain]]></title>
            <link>https://medium.com/@4rgon4ut/dencun-archives-seeking-for-proper-eip-7514-value-for-gnosis-chain-6d53f2809929?source=rss-1bff7bd4fbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d53f2809929</guid>
            <category><![CDATA[gnosis]]></category>
            <category><![CDATA[dencun-upgrade]]></category>
            <category><![CDATA[validator]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[4rgon4ut]]></dc:creator>
            <pubDate>Fri, 07 Jun 2024 20:15:16 GMT</pubDate>
            <atom:updated>2024-06-07T20:15:16.246Z</atom:updated>
            <content:encoded><![CDATA[<p>The Ethereum Improvement Proposal <a href="https://eips.ethereum.org/EIPS/eip-7514">EIP-7514</a> introduces a significant specification parameter: MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT. This parameter plays a crucial role in shaping the activation queue, directly impacting the activation churn. This research was used to justify the EIP-7514 parameters for the Dencun hard fork. It’s important to note that this parameter specifically affects the activation queue and does not fall under the considerations of weak subjectivity.</p><h3>Understanding Activation Churn</h3><p>The activation churn equation is a fundamental aspect of <a href="https://eips.ethereum.org/EIPS/eip-7514">EIP-7514</a>. The churn limit for validator activation in the current epoch is determined by the following function:</p><pre>def get_validator_activation_churn_limit(state: BeaconState) -&gt; uint64:<br>    &quot;&quot;&quot;<br>    Return the validator activation churn limit for the current epoch.<br>    &quot;&quot;&quot;<br>    return min(MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT, get_validator_churn_limit(state))</pre><p><a href="https://colab.research.google.com/drive/1lxVPHb4bPfm3qd0LC152Q5P6phuDNQqB?authuser=1#scrollTo=Ovfz8d6uOWly&amp;line=3&amp;uniqifier=1">try in google colab</a></p><h4>The Validator Set and Growth Projection</h4><p><a href="https://eips.ethereum.org/EIPS/eip-7514">EIP-7514</a> is expected to become active during the Dencun upgrade, tentatively scheduled for the EOY 2023. To determine an optimal value for MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT, we analyze the expected size of the validator set around the time of the hardfork.</p><p>Based on growth rate projections since the Shapella hard fork on Gnosis chain, it is estimated that the validator set will reach approximately 163000 validators by mid-December 2023. The current mean growth rate stands at approximately 165 validators per day:</p><pre>PRE_SHAPELLA_SET = 140611<br>PRE_SHAPELLA_DATE = datetime(2023, 7, 31)<br><br>CURRENT_SET = 149349<br>CURRENT_SET_DATE = datetime(2023, 9, 22)<br><br>DENCUN_DATE = datetime(2023, 12, 15)<br><br>set_growth = CURRENT_SET - PRE_SHAPELLA_SET<br>days_between = (CURRENT_SET_DATE - PRE_SHAPELLA_DATE).days<br><br>growth_rate_per_day = set_growth / days_between</pre><p><a href="https://colab.research.google.com/drive/1lxVPHb4bPfm3qd0LC152Q5P6phuDNQqB?authuser=1#scrollTo=W1ZXH7bSzs3D&amp;line=18&amp;uniqifier=1">try in google colab</a></p><h3>Analyzing Activation Speed</h3><h4>Possible queue grow (Ethereum demand)</h4><p>To comprehend how EIP-7514 might affect the entry queue on the Gnosis chain, we take Ethereum entry demand model and consider two scenarios: the worst Ethereum queue on June 10, 2023, and the current Ethereum status as of end of September, 2023. These scenarios allow us to calculate wait periods for different MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT values, assuming that the demand on the Gnosis chain aligns with that of Ethereum AT MOST.</p><pre># Ethereum highest queue size June 10, 2023<br>WORST_CASE_VALIDATOR_SET: 608224<br>WORST_CASE_QUEUE: 96508<br><br># Ethereum current state September, 2023<br>CURRENT_CASE_VALIDATOR_SET: 822593<br>CURRENT_CASE_QUEUE: 20292</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SilY5vH7687r0jlt" /></figure><p><a href="https://colab.research.google.com/drive/1lxVPHb4bPfm3qd0LC152Q5P6phuDNQqB?authuser=1#scrollTo=UbzcQ34p206j&amp;line=1&amp;uniqifier=1">try in google colab</a></p><h4>Gnosis entry demand</h4><p>This following plot provides insights into the historical demand to enter the network, represented by the average activations per epoch, for each month since December 2022 (“The Merge” on Gnosis). Plot shows (monthly_activations / monthly_epochs) for every month respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ebEoTZZhOuflXrst" /></figure><p><a href="https://colab.research.google.com/drive/1lxVPHb4bPfm3qd0LC152Q5P6phuDNQqB?authuser=1#scrollTo=alfcSaqFdMje&amp;line=4&amp;uniqifier=1">try in google colab</a></p><p>The highest value so far is 0.35 activations per epoch (~1 activation per 3 epochs) in July 2023.</p><p>We can also calculate the time it would take to process daily entries for each listed MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT. For the current (September 2023) daily entries ( 165/day), the table below showcases the results:</p><p><strong>Columns</strong>:</p><ul><li><strong>Necessary Epochs</strong> column shows how many epochs it will take to process current daily entries</li><li><strong>Percentage of 24h</strong> column shows how many % of day time it will take to process daily entries</li><li><strong>Total Time</strong> is self describing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XGHPDPs9wkX09oP8Z6otTw.png" /></figure><p>We see that even with the tightest MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 2 it takes only 7.7% of day time to proccess all daily entries (with current demand).</p><p>The maximum daily capacities( MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT * epochs_number_24h) looks as follows (assuming 1 GNO == 100$):</p><p><a href="https://colab.research.google.com/drive/1lxVPHb4bPfm3qd0LC152Q5P6phuDNQqB?authuser=1#scrollTo=MIE4xj3a9L1b&amp;line=15&amp;uniqifier=1">try in google colab</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m_3hEmr3zQ5ULzETbmNLeA.png" /></figure><p>As chain capacity with MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 2 is way more higher than current and maximal historical demand it would be a safe ground to pick the lowest value as it provides highest security benefits and better serves the purpose described in EIP.</p><p>The churn percantage also might be helpful to analyze how different limits suppress chain churn while validator set grows:</p><h4>How fast chain will churn at max</h4><p>The churn percantage also might be helpful to analyze how different limits suppress chain churn while validator set grows:</p><p><a href="https://colab.research.google.com/drive/1lxVPHb4bPfm3qd0LC152Q5P6phuDNQqB?authuser=1#scrollTo=Iu6OD6YEQFf6&amp;line=26&amp;uniqifier=1">try in google colab</a></p><p>The plot indicates that tightening the entry rate, denoted by MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 2, could have a significant impact if the validator set grows substantially. However, this effect is deemed acceptable.</p><p>A lower value for MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT can significantly contribute to a slower chain churning speed. This deliberate slowing of the churn process inherently increases the security of the chain. Moreover, we can calculate the time it would take to churn the validator set to reach target fractions (&gt;1/3 and &gt;2/3 of the chain) for different MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT values.</p><h3>Optimizing Churn Speed for Increased Security</h3><p>A lower value for MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT can significantly contribute to a slower chain churning speed. This deliberate slowing of the churn process inherently increases the security of the chain. Moreover, we can calculate the time it would take to churn the validator set to reach target fractions (&gt;1/3 and &gt;2/3 of the chain) for different MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT values.</p><ul><li>&gt;2/3 threshold reflects a situation akin to a &quot;51% attack,&quot; where a dishonest party gains control over a majority</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/0*zj31e5zfGtirVAB3" /></figure><p><a href="https://colab.research.google.com/drive/1lxVPHb4bPfm3qd0LC152Q5P6phuDNQqB?authuser=1#scrollTo=QO-sZK8LBOGZ&amp;line=5&amp;uniqifier=1">try in google colab</a></p><h3><strong>Recap</strong></h3><pre>MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 2</pre><p><strong>Important Consideration</strong>:</p><ul><li><strong>Resilience to Demand Surges</strong>: The conservative value of 2 equips the chain to handle unexpected spikes in demand, more than 10 times higher from current.</li><li><strong>Optimal Balance with UX</strong>: While 2 is the lowest viable value, it’s essential to note that choosing such a low churn limit strikes a delicate balance. It optimizes chain security and churn reduction without dramatically impacting UX.</li><li><strong>Aggressive yet Cautious Choice</strong>: This choice reflects an aggressive approach in freezing chain economy grow to provide time for better solutions, with an acknowledgment that possible growth tightening is viewed as acceptable.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d53f2809929" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>