Skip to content

provide zokrates proof generation as a grpc server following w3bstreams format

License

Notifications You must be signed in to change notification settings

ioCarb/zokrates-sprout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

provide zokrates proof generation as a grpc server following w3bstreams format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published