Closed intoverflow closed 2 months ago
You make some very good points. I will think some more and get back to you.
this feature would only be useful in a case where multiple independent Steel proofs (but still referencing the same block) are to be generated within the same host file
This is exactly the situation I'm in. Basically, I need to do a bunch of separate Steel proofs, which I then roll-up into one proof. Right now I'm doing something like this:
let env = EthEvmEnv::from_rpc(args.rpc_url, BlockNumberOrTag::Number(args.block_number)).await?.with_chain_spec(chain_spec);
...
let foo_receipt = foo(env.clone(), foo_args)?;
let bar_receipt = bar(env.clone(), bar_args)?;
...
This saves me from needing to pass the RPC url, block number, chain_spec.
A builder would be just as good for this purpose, and also (as you point out) would be less error prone. I'll close this PR and maybe we can make the builder happen this week
Why?
Imagine a situation where the host wants to generate multiple Steel proofs, all using the same RPC provider and block number. In this case, one might start by setting up an EthEvmEnv:
Later, each time we want to use Steel, we work from a fresh clone of
env
.In this way, we can avoid passing the RPC and block number around (less verbose and maybe less error prone)