Skip to content

Latest commit

 

History

History
22 lines (22 loc) · 1.49 KB

README.org

File metadata and controls

22 lines (22 loc) · 1.49 KB

how to

this service is meant to be run as part of a w3bstream-prover and is meant to be invoked through its docker-compose.yml file.

general

  • a grpc-server will be started which accepts messages defined by vm_instance.proto sent by the w3bstream-prover
  • messages (datas[]) are appended as they are in the by default and passed to zokrates split by spaces
    • if you have comma separated values however the messages are reordered by the location they have in relation to the comma fn main(field[2]A, field B, field[2] C) to fn main(field[2]A, field B, field[2], C field[2]A1, field B1, field[2] C1), but with the comma thing the fn could be fn main(field[4]A, field B[2], field[4] C). for more information: see group_by()

build without docker

  • no external dependencies required except for cargo, a c compiler and the protobuf-compiler
  • just run cargo build
  • if the protobuf compiler is not found during compiling, run:
    export PROTOC=$(which protoc-c)
        
  • the tests are WIP but you may run cargo test

TODOs

  • move abi encode (maybe gerelaize and propose pr to alloy-rs core)
  • get abi from message instead of fs somehow (same issue as with getting the proving.key. we will have to see how they handle the proposed changes regarding expParams)
  • write more tests
  • store projects in db or fs instead of memory

caveats

  • zokrates cannot export curves other then Bn128 to eth so we also don’t compute proofs, as we couldn’t use them anyways