Added memory command and engine prereqs

This commit is contained in:
Metachaser24
2024-02-22 14:10:44 +03:00
parent 1b7021ab4d
commit 6f695f96a1
4 changed files with 15 additions and 3 deletions

View File

@@ -1,5 +1,10 @@
## **Installation**
**Prerequisites:**
- **Node.js**: Version 14.0.0 or higher.
- **Yarn**: Latest version recommended.
To get started with zk-email, install these three npm packages:
## **1. @zk-email/helpers**
This package provides utility functions for email verification and cryptographic operations.

View File

@@ -54,8 +54,6 @@ The `@zk-email/helpers` package provides a comprehensive suite of utility functi
- `tryRevertARCChanges`: A flag indicating whether to attempt reverting changes made by email forwarders, defaulting to true.
- **Returns:** A `Promise` resolving to a `DKIMVerificationResult` object, which includes details such as the public key, signature, message, body, and other relevant verification outcomes.
## zk-email/contracts
The @zk-email/contracts package contains the main contract of the SDK, `DKIMRegistry.sol`. This Solidity contract serves as a registry for storing the hash of the DomainKeys Identified Mail (DKIM) public key for each domain.

View File

@@ -135,6 +135,12 @@ Firstly, you need to determine the constraint size of your circuit. You can do t
```bash
snarkjs r1cs info myCircuit.r1cs
```
### Memory Allocation for snarkjs
To avoid out-of-memory errors in `snarkjs` for large circuits, increase Node.js memory with `node --max-old-space-size=<size>`, where `<size>` is in kilobytes.
```
node --max-old-space-size=614400 ./../node_modules/.bin/snarkjs
```
### Powers of Tau
After obtaining the constraint size, find the next highest power of 2 and replace the '12' in the following command with that number. This command initiates the Powers of tau ceremony.

View File

@@ -8,5 +8,8 @@
"packages/*",
"scripts"
],
"packageManager": "yarn@3.2.3"
"packageManager": "yarn@3.2.3",
"engines": {
"node": ">=14.0.0"
}
}