---
# System prepended metadata

title: Untitled

---

## ZoKrates -> Scout script

*(result of discussion with Alex and Thibaut)*

- Write custom circuit in ZoKrates DSL
- Add 2 cli commands to Zokrates:
    - Generate scout yaml file containing proof, given a witness
    - Generate scout verifier Wasm module which uses `eth2` ewasm api to fetch data, `pre_state_root` and save `post_state_root`.
        > Not sure this needs to go into zokrates right now as the verifier will be the same code, but eventually yes, because it could support multiple curves, etc. but I'm not sure tbh, Thibaut can answer this.
        [name=axic]
        > Most of it is the same, but one difference between scripts would be if they have different public inputs (AFAIK)
        [name=sina]

### Open questions

- Should there be any constraints on the circuit? (e.g. have two public inputs for `pre_state_root` and `post_state_root`). Alternatively decision could be left to circuit designer.
- How to serialize proof & public input data to return on `eth2::copyReturnData`
    > There is no return data?
    [name=axic]
    > Sorry I meant `eth2::blockDataCopy`
    [name=sina]
- How to handle verifying key? hardcode into Wasm module, or pass it along with proof
    > pass everything along right now, because that allows for a single verifier? Depends on the question above. does the verifier depends on the number/kind of inputs to the circuit?
    [name=axic]
    > Yeah, public inputs need to be passed to the verifying function
    [name=sina]
- How to generate verifier Wasm module in ZoKrates?
    - generate rust code and let user compile it manually
    - ...