vacp2p / research

Thinking in code
MIT License
62 stars 4 forks source link

Research zkSNARK Semaphore RLN blocker: Shamir in SNARK #10

Closed oskarth closed 3 years ago

oskarth commented 4 years ago

Problem

For Semaphore RLN https://ethresear.ch/t/semaphore-rln-rate-limiting-nullifier-for-spam-prevention-in-anonymous-p2p-setting/5009 we need to embed the Shamir logic inside the SNARK in order to do slashing for spam. Currently the implementation is trusted and very hacky https://github.com/vacp2p/research/blob/master/zksnarks/semaphore/src/hello.js#L450

Acceptance criteria

  1. Shamir logic is integrated into the SNARK, and glue code around uses this

  2. (Optional?) Ideally it works for precomputed proofs too, requires some more thinking here

  3. Number of constraints don't explode too much, or at least understanding of overhead this would bring

Notes

Requires hacking actual SNARKs, and then some more thought around precomputes (no signal?) / complexity / etc.

Note that this doesn't apply to the Semaphore voting etc use case.

oskarth commented 3 years ago

@barryWhiteHat is Shamir logic part of the SNARK for rlnapp?

barryWhiteHat commented 3 years ago

Yes its ready to go. Just needs UI :)