A Holistic view of solutions to reduce 7-day Finality in OP Rollups
Tags: opstack, rollups
Published: 2024-04-04 08:09:32

<p>Optimistic rollups or OP Rollups are the key contenders in the battle of Layer2 scaling solutions. With leading projects like Optimism (OP) Mainnet, Arbitrum One/Nova, Zora, Base, and Mantle network– Optimistic rollups have now become a top choice for innovative dApps and web3 projects. Despite all the features and benefits, OP rollups are often challenged for its 7-days finality window. While this week-long confirmation window is designed to ensure solid security and rollup integrity, a significant reduction in this duration can make Optimistic rollups even more popular with enhanced user experience and protocol robustness.</p>
<p>This article talks about some of the interesting models proposed by industry experts who envision a better future for OP Rollups. Reading this, you will get an all-encompassing view of how different points present distinct improvement plans to reduce 7-day Finality in optimistic Rollups.</p>
<figure class="wp-block-image aligncenter size-large"><a href="https://www.zeeve.io/rollups/"><img src="https://www.zeeve.io/wp-content/uploads/2024/03/Save-up-to-97-time-in-launching-your-L2-rollups-1024x213.png" alt="Finality in OP Rollups solutions " class="wp-image-64057"/></a></figure>
<h2 class="wp-block-heading" id="h-but-why-is-the-challenge-period-a-week">But, why is the challenge period a week?</h2>
<p>Let’s first understand the core idea behind having this 7-days window. Well, the concept is simple– “giving enough time for verifiers,” that’s it. The fraud proving process in OP rollups requires multi–round challenges. Hence, a week’s length has been decided to allow honest validators to submit a fraud proof in case they witness any invalid state transition.&nbsp;</p>
<p>If we talk about a shorter challenge window, it will definitely speed up the transaction process and allow for quick withdrawals. But, it can also increase the risk of adding fraudulent transactions in the blocks because validators won’t have enough time to authenticate all the transactions. Also, the longer finality slot accommodates the time required to detect bugs in the rollup network’s software or state transition function.</p>
<h2 class="wp-block-heading" id="h-models-proposed-to-reduce-7-day-finality-of-optimistic-rollups">Models proposed to reduce 7-day Finality of Optimistic Rollups</h2>
<p>The discussion for reducing the waiting period in Optimistic rollups has been active since 2020. However, due to the continuation of critical issues like consensus failures on Ethereum, the majority kept on favoring the concept of a fixed 7-day 7-day Finality in optimistic Rollups. Now that Ethereum and most Ethereum-compatible blockchains have transitioned to proof-of-stake from proof-of-work and the duration of consensus failure is notably reduced, the arguments around reducing 1-week finality are heating once again. Below are some of the tweets justifying the ‘challenge period’ as downside of <a href="https://www.zeeve.io/appchains/optimistic-rollups/">OP rollups</a>.</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0mnkxc1t5n1dxyzh19qt.png)
<p>In this regard, let’s discuss the popular models proposed to reduce the 7-day challenge window in Optimistic rollups.</p>
<h3 class="wp-block-heading" id="h-1-check-in-model-nick-dadson-fuel-labs">1- Check-in model— Nick Dadson @ Fuel Labs</h3>
<p>The <a href="https://ethresear.ch/t/why-wait-a-week-fast-finality-optimistic-rollups/18868">Ethereum Research post by Nick Dadson </a>on “Check-in model” for fast OP rollup finality has gathered huge traction in the rollup space, also discussed at EthDenver. This check-in model introduces a new censorship-resistant scheme for Optimistic rollups, aiming to reduce the confirmation window from a week to just a few blocks while retaining the single honest minority assumption.&nbsp;</p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fvwl190p5ymxtmdqry0j.png)
<p>The core idea here is to replace the conventional approach of validation in which honest minority validators are supposed to submit a challenge whenever some invalid state transition is identified. Now, the check-in model suggests that all the validators must aggressively check if they have missed any check-in transaction, which can happen in case of offline activity or censorship. Based on the situation, the finality window will expand dynamically, up to 7-days.&nbsp;</p>
<p>Validators in a check-in based model are accountable to submit transactions periodically for every epoch, let’s say for every 64 Ethereum blocks. Regarding the check-in mechanism, it will work based on the following three conditions:</p>
<ol><!-- wp:list-item -->
<li><strong>True, </strong>in case there are no invalid transactions in the past epoch.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>False, </strong>if an invalid transaction is detected in the past epoch.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>No-report,</strong> the node is down or honest minorities have been censored.</li>
<!-- /wp:list-item --></ol>
<p>In case of <strong>True</strong>, all the validators will check-in with true, allowing the state to be finalized in just 64 blocks 9 (or an epoche).&nbsp;</p>
<p>In case of <strong>False</strong>, either all or just one validator will check-in with False, enabling the fraud proving window to remain open until the state is finalized and the result is concluded.&nbsp;</p>
<p>For<strong> no-report</strong>, it is assumed that an honest minority has been censored and thus the window keeps on being extended until its maximum time frame so that fraud proof can be submitted to undo the mistake.</p>
<p>This approach empowers Optimistic rollup protocols to thwart massive censorship attacks on their network through honest minority validators.&nbsp;</p>
<h3 class="wp-block-heading" id="h-2-the-idea-of-forked-block-censorship-oracle-from-ed-felten-the-co-founder-offchain-labs">2. The idea of ‘ Forked block censorship oracle’ from Ed Felten– The Co-founder @Offchain Labs</h3>
<p>Ed Felten, in his<a href="https://ethresear.ch/t/reducing-challenge-times-in-rollups/14997"> intense research on Optimistic Rollups’ challenge period </a>proposed the idea of building “censorship oracle '' within the smart contract to implement the following two conditions. Note that this idea is based on the fact that proof-of-stake networks are now optimized to easily detect censorship.&nbsp;</p>
<li>There has been zero censorship in N blocks (for example, total blocks in the last 23-hour periods).</li>
<li>No conclusion is reached.</li>
<p>If no censorship is detected, the rollup network can accept Layer2 state assertion and confirm transactions rapidly. However, if the oracles do not guarantee surety, then the rollup protocol still has to wait till 7 days for the challenge period to complete.&nbsp;</p>
<p>Here’s a sample contract reflecting implementation of censorship oracle in the rollup’s smart contract:</p>
<pre class="wp-block-code has-background" style="background-color:#f7f7f7;font-size:16px"><code>interface CensorshipOracle {

&nbsp;&nbsp;&nbsp;&nbsp;function testParameters(

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64 percentNoncensoringValidators,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64 inverseConfidenceLevel,

&nbsp;&nbsp;&nbsp;&nbsp;) pure returns (

uint64,&nbsp; // test duration

uint64,&nbsp; // max missing blocks allowing test to pass

);

&nbsp;&nbsp;&nbsp;&nbsp;function startTest(

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64 percentNoncensoringValidators,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64 inverseConfidenceLevel,

&nbsp;&nbsp;&nbsp;&nbsp;) returns (bytes32, uint64, uint64);

&nbsp;&nbsp;&nbsp;&nbsp;function getTestInfo(

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bytes32 testId,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) view returns (

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64,&nbsp; // percent non-censoring validators

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64,&nbsp; // inverse confidence level

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64,&nbsp; // test start timestamp

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64,&nbsp; // test result available timestamp

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bool,&nbsp; &nbsp; // test has finished

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bool &nbsp; &nbsp; // (test has finished) &amp;&amp; (non-censored block was included)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);

&nbsp;&nbsp;&nbsp;&nbsp;function finishAndGetTestInfo(bytes32 testId) returns (

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bytes32 testId,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) returns (

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64,&nbsp; // percent non-censoring validators

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64,&nbsp; // inverse confidence level

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64,&nbsp; // test start timestamp

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint64,&nbsp; // test result available timestamp

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bool,&nbsp; &nbsp; // test has finished (will be false if result not available yet)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bool &nbsp; &nbsp; // (test has finished) &amp;&amp; (non-censored block was included)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);

}

</code></pre>
<h3 class="wp-block-heading" id="h-3-dynamic-challenge-period-model-from-three-sigma">3. ‘Dynamic challenge period model’ from Three Sigma:</h3>
<p>Taking into account Ed Felten’s idea of a “censorship oracle’ and a few important concepts of the <a href="https://kelvinfichter.com/pages/thoughts/challenge-periods/">Optimistic Rollup challenge period</a>, 3Sigma has proposed a unique ‘Dynamic Challenge Period model’ that works with the following two main concepts:</p>
<li><strong>Reducing the 7-days challenge period based on the level of risk involved in the transactions:&nbsp;</strong></li>
<p>As you may already know, the main idea behind a week’s finality time is to make it long enough and extremely expensive for malicious sequencers to perform DoS attacks. However, they can still succeed by enforcing the high transaction fee strategy from the moment batches are submitted on layer1 till completion of the challenge period. A good example of this is the incident in the <a href="https://medium.com/coinmonks/how-the-winner-got-fomo3d-prize-a-detailed-explanation-b30a69b7813f">Fomo3D game’s contest</a>.&nbsp;</p>
<p>Considering such scenarios, 3Sigma suggests that the rollup protocol should employ tactics to identify malicious sequencers or attackers so that transaction fees collected from them should be greater than the profit they can earn from the batch. This means that the maximum profit should be equal to or more than the batch’s aggregate value. What we understand from this statement is that batches with high-value transactions will not have to wait for any challenge period. This will obviously improve user experience on the network as finality time will be reduced. At the same time, the roll-up protocol’s security will be preserved because of more non-malicious sequencers.&nbsp;</p>
<li><strong>Transition from centralized to decentralized sequencer network: </strong>&nbsp;</li>
<p>This concept emphasizes the decentralization of the sequencer network to improve security and thus reduce the chances of attacks. However, the selection of validators should be done on critical parameters so that all of them are honest with no history of indulging in malicious activities. Further, Sigma’s dynamic challenge period model allows for adding a governance-adjusted time factor for each sequence that works to continuously reduce the finality time as sequencers gain a higher reputation. This way, high-value transactions benefit from extremely shorter confirmation time. Multi-slot sequencer selection process and multi-slot sequencer selection process are the two proposed approaches that Three Sigma’s research suggests for selection of honest, decentralized sequencers.</p>
<p>Apart from the three models we discussed, there’s also a sliding window challenge mechanism based on the fee oracle system. The model is proposed by Patrick McCorry (CEO of PISA Research) in collaboration with research professionals–Ayelet Lotem, Sarah Azouvi, and Aviv Zohar, which suggests adjusting the challenge window as per the congestion on Layer 1. For example, if the fee oracle detected high congestion on Ethereum, it would allow for an extended challenge window. Similarly, if the congestion is low to moderate, the window will be reduced. However, this approach is difficult to adopt in case of extremely busy blockspace as extension of the window will be hard to determine.&nbsp;</p>
<h2 class="wp-block-heading" id="h-here-s-a-tl-dr">Here’s a TL,DR</h2>
<p>      1- 7-days finality in Optimistic rollups is advantageous to censor all the fraudulent transactions,           keeping the protocol safe.</p>
<p>      2- The Check-in model, Forked block censorship oracle, Dynamic challenge period model and Sliding window challenge– all focus on a common goal of reducing 7-finality in rollups, but their approach is different.<br>      3- These models also come with shortcomings:</p>
<ul><!-- wp:list-item -->
<li>The censorship oracle may not be suitable for scenarios when block producers perform the censor outside the protocol.&nbsp;</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>The governance inclusion approach in dynamic window challenge will pose issues to the fundamental assumption around honest minority.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>For check-in Windows, it may negatively affect the honest validators if slashing is applied. It is up to the rollup networks which method they find suitable for reducing the confirmation window on their network.</li>
<!-- /wp:list-item --></ul>
<p>      4- Optimistic rollup projects can adopt any of these models to enable fast-finality on their protocol for higher sustainability.</p>
<p>     5- The finality window can be reduced from 24 hours to a maximum of 7-days, based on the protocol-specific scenarios.</p>
<h2 class="wp-block-heading" id="h-launch-your-custom-op-rollups-quickly-with-zeeve-raas">Launch your custom OP Rollups quickly with Zeeve RaaS</h2>
<p>Zeeve RaaS allows enterprises and web3 projects to launch custom Optimistic Rollups with their modular frameworks– OP Stack and Arbitrum Orbit. In a few clicks, you can launch Layer2 rollups and enhance its usability with 30+ third-party integrations such as Avail, Near DA, Celestia, Biconomy,&nbsp; Chainlink, Blocksout, Axelar, Espresso, and more. With this, the Zeeve RaaS platform saves up to 97% of your deployment and 60% of management costs. On top of all these, you get a unified dashboard for monitoring and management of all your rollups.</p>
<p>For more details on how Zeeve is simplifying the launch of custom Optimistic rollups, <a href="https://www.zeeve.io/talk-to-an-expert/">get in touch with our expert</a>. You can drop an email or set up a one-to-one call for a detailed discussion.</p>