0xPolygonZero / plonky2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does Plonky2 only generate proof for arithmetic-based codes?

mostafamshk opened this issue · comments

Hey guys,
I'm trying to understand and also use plonky2 to generate proof for my codes.
Based on the documentation and also the examples included in this repository, it seems that plonky at the end, creates a virtual arithmetic circuit and to be able to use it, we have to add arithmetic inputs and logics to that circuit.
I was wondering that if plonky2 can run and create proofs for non-arithmetic logics or not.
for example, can we generate proof for a series of print statements or something like making a request to a REST Api?
I would appreciate it if you guys can help me.

Indeed we can only prove statements about arithmetic circuits. If we want to prove some boolean logic, we can reduce that to arithmetic logic, but proving is strictly limited to pure computations.

There isn't a notion of a console to print to, but we could take the underlying data we want to "print", and prove that some computation results in that data. Similarly there's no way to interact with web APIs, unless it's a trusted server which signs responses, in which case we can prove something like "there exists some response data R, with a valid signature from public key PK, and payload P, which satisfies some property f(P)".