#How zkApp state is requested during proof generation?
12 messages · Page 1 of 1 (latest)
afaik it is, why do you ask? 🤔
there is a async .fetch() but i think the entire zkapp state is fetched as once as some getAccount() call behind the scenes, since each account has the same 8 fields available
I am building off-chain and want to have a design for it similar to on-chain.
I have already read that async call is not allowed inside the @method. But if we can make request to the blockchain, why we cannot make request to the off-chain?
Per docs, the code written in smart contract is compiled to the form understandable to kimchi to create circuit. I was wondering if o1js is a wrapper why would allow to make network request in method?
no the request for the on chain state is made before method execution, thats why the state can be .get() synchronously within the method
It is cached and then retrieved during execution? Can we make sync network call 😅 (not tested yet). Or, the execution is happened in the specific env without internet?
are you working with zkdb or are you building your own off chain storage library?
zkdb
zkOracles provide a way to consume off-chain data inside @method. Maybe that helps?
Thank you, but do not think that it is applicable to my case. It should be implemented by my own
It is cached and then retrieved during execution?
yes