3
votes
Accepted
About bitwise in circom
From the Cirom docs:
The shift operations also work modulo p and are defined as follows
(assuming p>=7).
For all k with 0=< k <= p/2 (integer division) we have that
x >> k = x/(2**k)
...
3
votes
Why do we use circom circuit in zero knowledge?
Good question!
I think the main reason is that the underlying framework of ZK systems is somewhat different. For example, integers in ZK are field elements instead of regular integers. They behave ...
2
votes
How to implement Poseidon hash function into a smart contract
If you are using circom for writing your ZKP circuits, you can generate the contract using this script from circomlibjs: https://github.com/iden3/circomlibjs/blob/main/src/poseidon_gencontract.js
This ...
1
vote
Accepted
Why use circom circuits to generate solidity contracts, instead of directly writing the contract?
There are two pieces in any ZK system: a prover and (at least one) verifier.
The prover's job is to take in all the inputs, verify certain stuff based on them and generate a proof that the input is ...
1
vote
circom error in zk-rollup circuit: circom error: circuit too big for this power of tau ceremony. 6600*2 > 2**12
i just met this bug, you have to change the pot key to expand limit of constraints (2^12 in your case). the command that i use to create pot is below:
snarkjs powersoftau new bn128 14 pot12_0000.ptau -...
1
vote
bn.inherits is not a function in snarkjs
I just got this error using the latest snarkjs.min.js from github/iden3
I had an older file from early 2023 and it works find with no error. I suggest downloading a file from the git history.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
circom × 12zksnark × 7
solidity × 5
zero-knowledge × 4
rollups × 3
merkleization × 2
blockchain × 1
javascript × 1
evm × 1
nodejs × 1
signature × 1
hash-algorithm × 1
polygon × 1
decoding × 1
foundry × 1