Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvolear committed Oct 10, 2024
1 parent 6365041 commit ea5cbec
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ template Multiplier(){
out <== in1 * in2;
}
// main component to compile the circuit
component main = Multiplier();
```

Expand All @@ -205,8 +206,9 @@ async function main() {

// proof testing
const proof = await circuit.generateProof({ in1: "4", in2: "2" });

await expect(circuit).to.verifyProof(proof);

console.log("OK");
}

main()
Expand All @@ -224,9 +226,9 @@ To see the plugin in action, place the `Multiplier` circuit in the `circuits` di
npx hardhat zkit make
```

This command will compile the circuit leveraging `wasm`-based Circom compiler, download the necessary `ptau` file regarding the number of circuit's constraints, build the required `zkey` and `vkey` files, and generate TypeScript object wrappers to enable full typization of signals and ZK proofs.
This command will install the newest compatible Circom compiler, compile the provided circuit, download the necessary `ptau` file regarding the number of circuit's constraints, build the required `zkey` and `vkey` files, and generate TypeScript object wrappers to enable full typization of signals and ZK proofs.

Afterward, you may run the provided hardhat script via `npx hardhat run "./scripts/multiplier.test.ts"`.
Afterward, you may run the provided hardhat script via `npx hardhat run ./scripts/multiplier.test.ts`.

> Check out the [Medium blog post](https://medium.com/@Arvolear/introducing-hardhat-zkit-how-did-you-even-use-circom-before-a7b463a5575b) to learn more.
Expand All @@ -252,5 +254,6 @@ Where:
## Known limitations

- Due to current `wasm` memory limitations (address space is 32-bit), the plugin may fail to compile especially large circuits.
- Temporarily, the only supported proving system is `groth16`.
- Sometimes `hardhat` scripts that generate `zkey` files may run indefinitely. Waiting for [this snarkjs fix](https://github.com/iden3/snarkjs/pull/512) to be published.
- Due to current `wasm` memory limitations (address space is 32-bit), the plugin may fail to compile especially large circuits on some platforms.

0 comments on commit ea5cbec

Please sign in to comment.