Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: minor tweaks... #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/HowTo/write/design_considerations.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Refer to the conceptual documentation if you're not familiar with:

[`Circuits`](../../Concepts/circuits.md) are programmable but can't (practically and efficiently) prove any algorithm. The way constraints are represented make some things more natural ("snark-friendly") to do than others.

Numbers used in constraints are not integers or floats, but finite field elements (big numbers modulo a prime $p$).
Numbers used in constraints are not integers or floats, but finite field elements (big numbers modulo a prime `p`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previous version was actually correct, didn't render because the new doc didn't support Latex, fixed now 👍


So when writing `a = b * c`, not only don't you have the liberty to specify _types_ for these variables (for example `float` or `int`), but you must also consider field overflow.

Some cryptographic constructs, like MiMC hash or EdDSA signature scheme were designed to work on those field elements, and are well suited to be used with zk-SNARKs. Which is why zk-SNARKs are mostly used to verify hashes, signatures or other "snark friendly" cryptographic primitives.

Examples of programing concepts used in a traditional programming language, but are un-natural in most zk-SNARK constructs are:

- Using floating numbers
- Using floating point numbers
- Using conditional statements (`if` and `else`)
- Managing memory.

Expand Down