Closed kubkon closed 4 years ago
cc @srinathsetty
Thanks @kubkon for adding the example!
Could you please sign the CLA so I can merge?
EDIT: @srinathsetty I've added a build step to the CI config so that examples are also always built. In the meantime, it seems there's been a regression in the nightly compiler and one of the project's deps fails to build anymore (packed_simd
to be exact). As a temp solution I've made sure the CI uses the latest toolchain that was known to have been still functional (nightly-2020-09-15
to be exact).
@kubkon Great, thanks! I’ll merge this shortly.
I had a quick question: in your example, it seems like x is a public input. Wouldn’t it make more sense to have y as public input and x as secret witness?
@kubkon Great, thanks! I’ll merge this shortly.
I had a quick question: in your example, it seems like x is a public input. Wouldn’t it make more sense to have y as public input and x as secret witness?
You're absolutely right, thanks for spotting that one @srinathsetty! I've now fixed it in 7715fd5 :-)
The example of knowing a solution to the cubic equation of
x^3 + x + 5 = y
is effectively the first thing you come across when dissecting the zkSNARKs knowledge if your background is in blockchain. This is probably thanks to Vitalik who decomposes the problem into the primitives in his blog post here.This commit adds this as a working example to Spartan repo.