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

  • The U.S. Department of Government Efficiency needs “revolutionaries with super high IQs who are committed to small government reform”

    the newly established Department of Government Efficiency (DOGE) in the United States has released an official statement via their X account, thanking thousands of Americans for their interest in joining the department. However, they have made it clear that they do not need "part-time creative contributors," but rather "revolutionaries with super high intelligence who are committed to small government reform." Applicants are required to work more than 80 hours per week and focus on plain and simple cost reduction. Applicants who meet the requirements can submit their resumes via private message, and the top 1% of outstanding applicants will be personally reviewed by Elon Musk and Vivek Ramaswami.

  • SEC Chairman Gary Gensler Makes Final Lobbying Call for US Crypto Regulation

    according to institutional reports, US Securities and Exchange Commission (SEC) Chairman, Clayton, is making a final push to allow the agency to regulate the cryptocurrency market before the Trump administration's term ends and its enthusiasm for digital assets wanes. In a speech prepared for a legal conference in New York on Thursday, Clayton reiterated that the agency should focus on "road rules" applicable to cryptocurrency sales and intermediaries such as brokers and exchanges to support proper disclosure. Clayton stated that the experience of the Great Depression made decision-makers aware of the "importance of disclosure terms, as information about securities creates a public product". (Jinshi Data APP)

  • U.S. money market fund assets exceed $7 trillion for the first time

    according to data provided by Crane Data, which has long been researching the currency market fund field, as of the week of November 13th, the management assets of US currency market funds increased by about $91 billion, and the total scale exceeded $7 trillion for the first time, which is a milestone for the industry. Due to the high and reliable yield, the popularity of this industry among investors has risen sharply. Before reaching the $7 trillion mark, the scale of US currency market assets hit a historic high for several consecutive months, which refuted doubts about whether the industry could continue to be popular as Federal Reserve officials lowered interest rates from their highest level in 20 years. After US policy makers cut interest rates by 50 basis points in September and another 25 basis points this month, investors continued to pour into currency market funds, mainly because the yield of these funds is higher than other tools, especially bank deposits. Compared with banks, the speed at which these funds transmit the impact of low interest rates is often slower.

  • Franklin Templeton Expands $410 Million Money Market Fund to Ethereum Blockchain

    Franklin Templeton expanded its $410 million money market fund to the Ethereum blockchain.

  • Are we finally ready for a gas limit increase?

    There has been growing discussion around the possibility of increasing Ethereum’s gas throughput, either by raising the gas limit or reducing slot time. The key argument in favor of this is that the hardware requirements for running a validator have steadily decreased over the past four years.

  • Cointime August 17th News Express

    1.VanEck and 21Shares Solana ETF Form 19b-4 Suspected to be Removed from CBOE Website

  • Ethereum network gas fee falls back below 1 gwei

    According to Etherscan data, the current Ethereum network gas fee has fallen below 1 gwei, currently at 0.937 gwei.

  • Cointime August 10th News Express

    1. The U.S. Internal Revenue Service has released a new draft of the crypto tax form, which no longer requires filling in wallet addresses and transaction IDs

  • Ethereum ACDC #139: Pectra's Devnet 2 upgrade is under debugging, and the release date of Devnet 3 is still to be determined

    Christine Kim, Vice President of Galaxy Research, summarized the main content of the 139th ACDC conference call. The debugging of Pectra's upgraded Devnet 2 is currently underway, and the release date of Devnet 3 is yet to be determined. Developers will hold weekly testing update meetings starting from Monday to better coordinate the release of Pectra's Devnet. The decision to include EIP-7688 in Pectra's upgrade has been postponed again.

  • Ethereum network gas fee drops to 1 gwei

    According to Ether­scan data, the current gas fee on the Ethereum network has dropped to 1 gwei.