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

  • FTSE China A50 Index Futures Turn Positive

    On March 30, FTSE China A50 Index futures turned positive after previously dropping more than 1%. (Jin Shi)

  • Trump Claims Iran Has Agreed to Most of the '15-Point Plan'

    On March 30, CNN reported that U.S. President Trump stated that Iran has agreed to most of the content in the ceasefire '15-point plan'. (Xinhua News Agency)

  • BTC Surpasses $67,000

    Market data shows that BTC has surpassed $67,000, currently priced at $67,017.45, with a 24-hour increase of 0.44%. The market is experiencing significant fluctuations, so please ensure proper risk management.

  • Trump: US Will Act Swiftly if Iran Charges Fees in Strait of Hormuz

    On March 30, when asked about Iran's plans to charge fees in the Strait of Hormuz, US President Trump stated that he needed to confirm the validity of this information, but that the US could terminate such actions very quickly. "We can complete this task in two minutes. We can do it so swiftly that you would feel dizzy," he said. He noted that Saudi Arabia, Qatar, the UAE, and Bahrain are retaliating against Iran. "I was very surprised by their attack. But once attacked, they retaliated effectively. We have very strong communication, but people from all these countries say they have been fighting all along," he added. (Jinshi)

  • A-shares Trading Volume Exceeds 500 Billion Yuan

    On March 30, the trading volume of the Shanghai and Shenzhen stock exchanges exceeded 500 billion yuan, an increase of 86.4 billion yuan compared to the same time the previous day. (Jin Shi)

  • Trump: Iran Has Allowed 20 Tankers to Pass Through the Strait of Hormuz

    On March 30, U.S. President Trump stated on the 29th that Iran allowed 10 tankers flying the Pakistani flag to pass through the Strait of Hormuz last week, and the number has now increased to 20. He told the Financial Times, 'These tankers have set sail and are heading straight through the center of the strait.' The decision was approved by Iran's Islamic Parliament Speaker Ghalibaf. (Xinhua)

  • China's AI Model Usage Surges Nearly 34% Month-on-Month, Outpacing the U.S. for Four Consecutive Weeks

    On March 30, according to the latest data from institutions, the total global usage of AI large models reached 22.7 trillion tokens last week, reflecting an 11.2% month-on-month increase. Among the listed AI models, the weekly usage of Chinese AI models rose to 9.857 trillion tokens, marking a 33.94% increase from the previous week; the weekly usage of U.S. AI models was 3.007 trillion tokens, with a month-on-month growth of 1.79%. The weekly usage of Chinese AI models has increased for four consecutive weeks, consistently surpassing that of the U.S. In the past week, the top four global usage rankings were all occupied by Chinese AI models. Xiaomi's MiMo-V2-Pro maintained its top position with a weekly usage of 3.96 trillion tokens; Step 3.5 Flash (free) ranked second with a weekly usage of 1.49 trillion tokens; MiniMax M2.7 entered the rankings at third place with a weekly usage of 1.29 trillion tokens; and DeepSeek V3.2 ranked fourth with a weekly usage of 1.24 trillion tokens, reflecting an 8.7% increase. Meanwhile, MiniMax M2.5, which ranked third the previous week, fell to ninth place, nearly dropping out of the rankings, with a weekly usage of 0.909 trillion tokens, down 30% month-on-month. (Dongxin News Agency)

  • Over $313 Million Liquidated in the Past 24 Hours

    According to Coinglass data, over the past 24 hours, a total of $313 million has been liquidated across the network, with long positions accounting for $238 million and short positions for $74.7256 million. Among these, Bitcoin long positions saw liquidations of $89.9706 million, while Bitcoin short positions were liquidated for $30.4691 million. Ethereum long positions faced liquidations of $69.7201 million, and Ethereum short positions were liquidated for $21.9023 million. Additionally, in the last 24 hours, a total of 89,935 individuals were liquidated globally, with the largest single liquidation occurring on Bybit-BTCUSD valued at $9.8018 million.

  • ETH Falls Below $2000

    Market data shows that ETH has fallen below $2000, currently priced at $1999.96, with a 24-hour decline of 0.23%. The market is experiencing significant fluctuations, so please ensure proper risk management.

  • FTSE China A50 Index Futures Open Down 0.92%

    On March 30, FTSE China A50 Index futures opened down 0.92%.