Table of Contents
Steel, connecting RISC Zero and Ethereum
The convenience of Solidity, the power of ZK
Pre-flight phase: Start pre-flight by making a view call to the Ethereum RPC node, which caches the necessary storage slots and only fills the EVM database with the data required for the query. All storage slots are automatically discovered and retrieved based on view calls.
Get the verified block hash
The future of on-chain applications
Home web3.0 How does RISC Zero Steel accelerate Ethereum's ZK adoption?

How does RISC Zero Steel accelerate Ethereum's ZK adoption?

Jun 08, 2024 pm 05:03 PM

Compiled by Alex Liu, Foresight News

Ethereum has successfully brought a thriving decentralized application ecosystem, but its scalability challenges are becoming increasingly severe. Developers face a difficult choice: limit the functionality and data richness of their applications, or tolerate high gas fees and gas usage limits. What if developers had a way to bypass these restrictions?

Steel, connecting RISC Zero and Ethereum

RISC Zero is one of the major zkVM developers. If you often hear zkEVM in your ears, but don’t know the difference between it and What is zkVM? You can refer to this article. RISC Zero’s latest launch is Steel, a view call proof library based on Alloy that brings a sea change to the way developers interact with Ethereum L1 or other EVM chains. Leveraging zero-knowledge proofs and RISC Zero zkVM, Steel enables developers to perform view calls and provably read and compute Ethereum's state in a scalable, secure, and cost-effective manner.

The convenience of Solidity, the power of ZK

Steel bridges the gap between Ethereum application development and zero-knowledge technology, making it easier for developers to leverage the power of ZK in their smart contracts. Combined with the capabilities of RISC Zero zkVM, Steel enables developers to build more secure, scalable and efficient applications on Ethereum L1 or any EVM equivalent chain.

With Steel, developers can:

  • Execute Solidity smart contracts directly within zkVM, compatible with more complex on-chain logic
  • Access historical ether within zkVM Square status
  • Use continuations for calculations, not limited by block and transaction data size
  • Ensure that off-chain calculations are as safe and reliable as on-chain execution
  • Use more experience The first production-ready zkVM rigorously tested and used by partners
  • Seamless integration and cost savings
  • With Steel, performing a view call is as simple as specifying the required Solidity method. Whether it's retrieving ERC-20 token balances (example) or accessing everything from Ethereum state, Steel simplifies the process by seamlessly integrating with RISC Zero zkVM while ensuring security and efficiency. Testing has shown that Steel is capable of handling over 100K SLOAD operations in a single view call, saving thousands of dollars in gas costs on mainnet. We can prove it in about 15 minutes using Bonsai, which requires at least 210M Gas, which is 7x over the block limit.
Example: ERC20 balanceOf

The code snippet below demonstrates the process of using Steel to prove the balance of a specific address for an ERC-20 contract deployed on Ethereum. This example shows how developers can leverage Steel to interact with Ethereum on-chain data within zkVM. The complete code can be viewed here.

Define the view function signature

First, use the sol! macro to define the balanceOf function signature of ERC-20. This will parse the Solidity syntax to generate a corresponding Rust struct that implements the SolCall trait and can be used to call the balanceOf method, which accepts an account address and returns the associated ERC-20 token balance.

Preparing to call

Next, set up the call by instantiating the balanceOfCall structure with the target account address. At the same time, define constants for the contract address you want to query and the caller's address. RISC Zero Steel 如何加速以太坊的 ZK 采用?

Execute the call in Main

The main function is executed in zkVM and generates zero-knowledge proof. It first reads the input environment and then constructs a ViewCallEnv object, ensuring that the current state matches the expected state root. After submitting the relevant block hash and number, perform a view call and print the balance. RISC Zero Steel 如何加速以太坊的 ZK 采用?

How it works

Steel proves Solidity code in RISC Zero zkVM in three steps, simplifying the execution process: RISC Zero Steel 如何加速以太坊的 ZK 采用?

Pre-flight phase: Start pre-flight by making a view call to the Ethereum RPC node, which caches the necessary storage slots and only fills the EVM database with the data required for the query. All storage slots are automatically discovered and retrieved based on view calls.

Storage verification: Perform a storage integrity check to ensure that the data in the EVM database is aligned with the state root of the blockchain to confirm its legitimacy.

    Solidity Execution: Runs the given Solidity function on the EVM within RISC Zero zkVM.
  1. How is this different from proof of storage?
  2. With traditional proof of storage, developers must manually select the storage slots used by their smart contracts and reimplement the smart contract logic. With Steel, all storage slots are automatically discovered and retrieved based on view calls. This saves developers a lot of time and reduces the chance of implementation errors, thereby reducing the chance of security vulnerabilities.
  3. Get the verified block hash

    When using the blockhash opcode for verification in an Ethereum smart contract, the verified commitment must reference a block hash no more than 256 blocks old. Considering the average block time is 12 seconds, this sets a narrow time frame of approximately 50 minutes for complete proof generation and confirmation that the validated transaction has been included in a block.

    When you need to obtain a verified block hash on the chain that is older than 256 blocks, you can use one of the following strategies:

  • When known in advance When a block hash is needed (for example, when launching a governance proposal), this block hash can be saved into the contract state.
  • An alternative is to use RISC Zero to prove the chain of hashes from the queried block to one of the most recent 256 blocks.

The future of on-chain applications

Envision a future where off-chain computation will be seamlessly integrated with on-chain verification. Steel contributes to this vision by enabling developers to reliably access and compute the complete history of Ethereum within zkVM, allowing them to create the next generation of data-rich and more powerful on-chain applications.

The above is the detailed content of How does RISC Zero Steel accelerate Ethereum's ZK adoption?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1658
14
PHP Tutorial
1257
29
C# Tutorial
1231
24
'Notorious” Conor McGregor Launches Cryptocurrency Venture, Promises to 'Change the CRYPTO Game” With His $REAL Coin 'Notorious” Conor McGregor Launches Cryptocurrency Venture, Promises to 'Change the CRYPTO Game” With His $REAL Coin Apr 06, 2025 am 10:14 AM

“Notorious nearly never happened. You want the real story? The McGregor story could've been about the lad who never left Dublin. I manifested greatness…”

Nasdaq Files to List VanEck Avalanche (AVAX) Trust ETF Nasdaq Files to List VanEck Avalanche (AVAX) Trust ETF Apr 11, 2025 am 11:04 AM

This new financial instrument would track the token's market price, with a third-party custodian holding the underlying AVAX

Zcash (ZEC) Reaches a High of $35.69 as a Record Amount of Tokens Move Out of Circulation Zcash (ZEC) Reaches a High of $35.69 as a Record Amount of Tokens Move Out of Circulation Apr 09, 2025 am 10:36 AM

Zcash was one of the top gainers during the latest market rally, reaching a high of $35.69 as traders moved a record amount of tokens out of circulation.

Can BRICS Win from Trump's Tariffs? Can BRICS Win from Trump's Tariffs? Apr 07, 2025 am 11:14 AM

The global economic landscape is continuously shifting, and one of the latest disruptions comes from former U.S. President Donald Trump's imposition of tariffs

Is Wall Street Quietly Backing Solana? $42 Million Bet Says Yes Is Wall Street Quietly Backing Solana? $42 Million Bet Says Yes Apr 10, 2025 pm 12:43 PM

A group of former Kraken executives acquired U.S.-listed company Janover, which secured $42 million in venture capital funding to begin building a Solana (SOL) treasury.

OM Mantra Cryptocurrency Crashes 90%, Team Allegedly Dumps 90% of Token Supply OM Mantra Cryptocurrency Crashes 90%, Team Allegedly Dumps 90% of Token Supply Apr 14, 2025 am 11:26 AM

In a devastating blow to investors, the OM Mantra cryptocurrency has collapsed by approximately 90% in the past 24 hours, with the price plummeting to $0.58.

Dogecoin (DOGE) Price Plummets 17% Dogecoin (DOGE) Price Plummets 17% Apr 08, 2025 am 11:20 AM

The Dogecoin price plummeted 17% in the last 24 hours to trade at $0.1365 as of 4.30 a.m. EST on trading volume that skyrocketed 271% to $2.24 billion.

TrollerCat ($TCAT) Stands Out as a Dominant Force in the Meme Coin Market TrollerCat ($TCAT) Stands Out as a Dominant Force in the Meme Coin Market Apr 14, 2025 am 10:24 AM

Have you noticed the meteoric rise of meme coins in the cryptocurrency world? What started as an online joke has quickly evolved into a lucrative investment opportunity