Cointime

Download App
iOS & Android

Release Blockhash Opcode Restrictions with zk-SNARKs for Optimistic Bridges

Repost from Ethresearch by tomo_tagami : “Release Blockhash Opcode Restrictions with zk-SNARKs for Optimistic Bridges” The full report and all related findings are available on the official website of Ethresearch.

This post is a proposed solution to release the restrictions that exist in Ethereum opcode by using zk-SNARKs. Furthermore, I hope to use this idea to solve the challenges of the optimistic bridges.

TLDR

  • Ethereum has a blockhash opcode restriction commonly known as the “256 block problem”.
  • This restriction means that the dispute period of the optimistic bridge is only about 51 minutes.
  • To increase the dispute period, use a client that proves the blockhash hash-chain by using zk-SNARKs.
  • Create a circuit of hashes leading up to the targeted blockhash by accessing backward from the latest opcode

Review of the optimistic bridge

If you already know about the optimistic bridge, please skip this part.

Optimistic bridges rather than requiring Ethereum to validate every bridge transaction, the protocol inspects only those that might be fraudulent. Suspicious activity can lead to a dispute, triggering a verification process settled by Layer 1.

Optimistic bridge consists of three participants - User, Relayer and Disputer. Relayer’s actions are constantly monitored by disupters and thrashed if fraud is discovered. See this post for more details.

Blockhash opcode

Ethereum has a blockhash opcode restriction commonly known as the “256 block problem”. The maximum number of blocks that can be referenced by Ethereum’s blockhash opcode is 256 blocks, and older blocks cannot be referenced.

This restriction means that at optimistic bridge, the time available for transaction verification by blockhash is only about 51 minutes (= 12 sec x 256 blocks). Consequently, the window for raising disputes is limited to approximately 51 minutes (12-second block time *256 blocks). In practical terms, this means that if disputers wish to challenge a relayer’s action, they have only about 51 minutes to do so, as the dispute process requires them to present the block hash of the contested transaction block as evidence. This tight timeframe could compromise system security and diminish the overall user experience.

Potential solution using zk-SNARKs

To address this restriction, I propose a solution leveraging zk-SNARKs.

Every block hash inherently embeds information from its predecessor. Given this property, it’s possible to create a cryptographic circuit that verifies the chain of block hashes, even beyond the most recent 256. This is done by anchoring the sequence with a block hash currently accessible via the blockhash opcode and tracing back to an older target hash.

In technical terms, if n1 represents the block number with the opcode-accessible block hash and n2 represents the block number of our target hash, the circuit would be designed to take three primary inputs:

  • Block hash from block n1.
  • All block headers between n1 and n2.
  • Target block hash from block n2.

These operations will utilize RLP encoding and the Keccak256 hash function. This circuit proves that there is a hash connection up to the target block hash.

The following image provides a visual representation of this chain of hashes. However, in practice, the circuit computes this in reverse order. While this graphic specifically illustrates a block hash chain on Ethereum, the principle could also extend to Layer 2 networks.

circuit1721×1080 137 KB

Although this approach is in the research phase and awaits full implementation—primarily because of its intricate nature—it seems almost inevitable that such zk circuits will find integration within the bridge dispute mechanism. This is especially true considering some Layer 2 networks impose even tighter restrictions on block hash access than the 256-block restriction.

Comments

All Comments

Recommended for you

  • US Spot Ethereum ETF Sees $5.6 Million Net Outflow

    On May 15, according to monitoring data from Farside Investors, the US spot Ethereum ETF experienced a net outflow of $5.6 million yesterday.

  • Xi Jinping Holds Restricted Meeting with Trump in Zhongnanhai

    May 15 — Chinese President Xi Jinping held a restricted meeting with US President Donald Trump at Zhongnanhai. (CCTV News)

  • US Spot Bitcoin ETF Sees Net Inflow of $131.32 Million Yesterday

    On May 15, according to monitoring by Trader T, the US spot Bitcoin ETF experienced a net inflow of $131.32 million yesterday.

  • Kechuang 50 Index Declines by 2%

    On May 15, the Kechuang 50 Index experienced a decline of 2.36% during the day. Among the constituent stocks, JinkoSolar fell by 7.60%, Tianyue Advanced dropped by 7.11%, Canadian Solar decreased by 5.54%, and Zhongke Feiyun fell by 5.64%. (Dongxin News Agency)

  • Nikkei 225 Index Falls Below 62,000 Points for the First Time Since May 7

    On May 15, the Nikkei 225 index fell below 62,000 points during trading hours, marking the first time it has done so since May 7. (Tokyo News Agency)

  • U.S. 30-Year Treasury Yield Rises to 5.056%, Reaching 10-Month High

    On May 15, the yield on U.S. 30-year Treasury bonds rose to 5.056%, marking a 10-month high, while the yield on 10-year Treasury bonds reached 4.512%. (Dongxin News Agency)

  • Japan's 10-Year Government Bond Yield Reaches Highest Level in Nearly 29 Years

    On May 15, according to CCTV, the yield on newly issued 10-year government bonds, which serves as a long-term interest rate indicator in Japan's domestic bond market, rose to 2.665%, reaching its highest level in nearly 29 years. This increase is attributed to inflationary pressures from rising oil prices and market concerns about the deterioration of fiscal policy due to Japan's domestic economic measures, leading to selling pressure on bonds. (Dongxin News Agency)

  • ETH Surpasses $2300

    Market data shows that ETH has surpassed $2300, currently priced at $2300.06, with a 24-hour increase of 1.42%. The market is experiencing significant volatility, so please ensure proper risk management.

  • ETH Surpasses $2300

    Market data shows that ETH has surpassed $2300, currently priced at $2300.02, with a 24-hour increase of 1.97%. The market is highly volatile, so please ensure proper risk management.

  • Trump's Securities Trading Records Exposed, Invests in Nvidia and Apple

    On May 15, the U.S. Office of Government Ethics released two new financial disclosure documents on Thursday, revealing that Trump disclosed large-scale financial transactions worth at least $220 million earlier this year, involving securities from several major U.S. companies. The newly disclosed documents cover the first three months of 2026, with transaction values ranging broadly from $220 million to approximately $750 million. Significant purchases valued between $1 million and $5 million include S&P 500 index funds, Nvidia, and Apple. Large sales valued between $5 million and $25 million include Microsoft, Amazon, and Meta. The documents do not consistently specify the exact types of securities involved, such as whether they are stocks or corporate bonds, nor do they indicate which accounts the transactions occurred in or who authorized the trades. Such disclosure documents are mandatory but only partially reflect officials' financial activities, as they only list transactions exceeding $1,000 and present them in broad value ranges without disclosing specific transaction prices, profit situations, or whether assets were directly purchased or held through managed accounts. Trump's assets are held in a trust controlled by his children, and some transactions in the new documents indicate the involvement of brokers as agents. (NBC)