diff --git a/README.md b/README.md index 60027ebe..7ba8ef2b 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Your new project consists of: ### Run the Tests -- Use `RISC0_DEV_MODE=true cargo test` to run the tests in your zkVM program. +- Use `cargo test` to run the tests in your zkVM program. - Use `RISC0_DEV_MODE=true forge test -vvv` to test your Solidity contracts and their interaction with your zkVM program. ## Develop Your Application @@ -148,4 +148,4 @@ Below are the primary files in the project directory [deployment guide]: /deployment-guide.md [Sepolia]: https://www.alchemy.com/overviews/sepolia-testnet [RISC Zero installation]: https://dev.risczero.com/api/zkvm/install -[Publisher]: ./apps/README.md \ No newline at end of file +[Publisher]: ./apps/README.md diff --git a/methods/src/lib.rs b/methods/src/lib.rs index 96fb75be..c9fab1b3 100644 --- a/methods/src/lib.rs +++ b/methods/src/lib.rs @@ -19,7 +19,7 @@ include!(concat!(env!("OUT_DIR"), "/methods.rs")); mod tests { use alloy_primitives::U256; use alloy_sol_types::SolValue; - use risc0_zkvm::{default_prover, ExecutorEnv}; + use risc0_zkvm::{default_executor, ExecutorEnv}; #[test] fn proves_even_number() { @@ -30,9 +30,10 @@ mod tests { .build() .unwrap(); - let receipt = default_prover().prove(env, super::IS_EVEN_ELF).unwrap(); + // NOTE: Use the executor to run tests without proving. + let session_info = default_executor().execute(env, super::IS_EVEN_ELF).unwrap(); - let x = U256::abi_decode(&receipt.journal.bytes, true).unwrap(); + let x = U256::abi_decode(&session_info.journal.bytes, true).unwrap(); assert_eq!(x, even_number); } @@ -46,6 +47,7 @@ mod tests { .build() .unwrap(); - default_prover().prove(env, super::IS_EVEN_ELF).unwrap(); + // NOTE: Use the executor to run tests without proving. + default_executor().execute(env, super::IS_EVEN_ELF).unwrap(); } }