balanceOf function, within the guest program, using balanceOfCall:
Proving smart contract execution within the zkVM
The zkVM guest has no network connection, and there is no way to call an RPC provider to carry out the view call from within the guest; so how does Steel make this possible? Steel’s key innovation is the use of revm for simulation of an EVM environment within the guest program. This EVM environment has the necessary state populated from RPC calls, and verified with Merkle storage proofs, to carry out verifiable execution of view calls. In the host program, the preflight call constructs the EVM environment,evm_env which is passed through as input to the guest program:
preflight step calls the RPC provider for the necessary state and for the Merkle storage proofs via eth_getProof (EIP-1186). These Merkle proofs are given to the guest which verifies them to prove that the RPC data is valid, without having to run a full node and without trusting the host or RPC provider.