Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 0 additions & 11 deletions docs/pages/CRISP/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ CRISP/
|── client/ # React frontend application
|── server/ # Rust coordination server
|── program/ # RISC Zero computation program
|── wasm-crypto/ # WebAssembly crypto utilities
├── contracts/ # Smart contracts (Solidity)
├── circuits/ # Noir circuits for ZK proofs
├── scripts/ # Development and utility scripts
Expand Down Expand Up @@ -69,16 +68,6 @@ The core computation logic written in Rust for zkVM:

---

### **WebAssembly Crypto** (`/wasm-crypto`)

High-performance cryptographic operations compiled to WebAssembly:

- Client-side fully homomorphic encryption
- ZK Circuit input generation for Noir proofs
- Optimized for browser execution

---

### **Smart Contracts** (`/contracts`)

Solidity contracts implementing the E3 program interface:
Expand Down
13 changes: 11 additions & 2 deletions docs/pages/CRISP/running-e3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,21 @@ The server will start and begin listening for blockchain events.
Navigate to the program directory and start the program server:

```sh
cd examples/CRISP/program
cargo run
cd examples/CRISP/
enclave program start
```

This runs the RISC Zero program server that handles secure computations.

If you would like to run the program server in dev mode, you can run the following command:

```sh
cd examples/CRISP/
enclave program start --dev true
```

In this case, Risc0 will not be used to generate proofs, and instead these will be mocked.

### Initialize a New Voting Round

**Terminal 6: CLI**
Expand Down
8 changes: 5 additions & 3 deletions docs/pages/CRISP/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The setup includes the following:

## Quick Start with Docker (Recommended)

The fastest way to get CRISP running is using the Docker development environment:
The fastest way to get CRISP running is using the scripts provided in the `scripts/` directory:

```sh
cd examples/CRISP
Expand Down Expand Up @@ -60,7 +60,7 @@ Before getting started, ensure you have the following tools installed:

- **Rust** (programming language and package manager)
- **Foundry** (Ethereum development framework)
- **RISC Zero toolchain** (for RISC Zero program development)
- **RISC Zero toolchain** (for RISC Zero program development) - Note that you can also run the program server in dev mode which does not use Risc0.
- **Node.js** (JavaScript runtime for client-side dependencies)
- **Anvil** (local Ethereum node)
- **Enclave CLI** (for managing ciphernodes)
Expand Down Expand Up @@ -105,6 +105,8 @@ curl -L https://foundry.paradigm.xyz | bash

### Install RISC Zero Toolchain

> Optional: you can run CRISP in dev mode which does not use Risc0.

Next, install `rzup`, which provides the `cargo-risczero` toolchain.

```sh
Expand Down Expand Up @@ -185,7 +187,7 @@ Keep this terminal open and running. Open a new terminal for the next steps.
4. Deploy the Enclave contracts on the local testnet:

```sh
rm -rf deployments/localhost
pnpm clean:deployments
pnpm deploy:mocks --network localhost
```

Expand Down
3 changes: 2 additions & 1 deletion examples/CRISP/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ CRISP

## Development

To start the development environment, run the following commands:
To start the development environment, run the following commands from inside the CRISP directory:

```sh
pnpm install # install dependencies
pnpm dev:setup # build the project
pnpm dev:up # run the services
```
Expand Down
3 changes: 2 additions & 1 deletion examples/CRISP/contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ It exposes two main functions:

The input validator contract is used to validate the input data that is submitted to the E3 instance. It is called by the Enclave contract when a new input is published (`Enclave.publishInput`). In CRISP, the data providers (the ones submitting the inputs) are the voters, and the input submitted is the vote itself.

The validator will validate the input data by checking whether the gating conditions are satisifed (this uses Semaphore by default), and that the ciphertext is constructed correctly, using [Greco](https://github.com/gnosisguild/enclave/tree/main/packages/circuits/crates/libs/greco) ([link to paper(https://eprint.iacr.org/2024/594)]).
The validator checks that gating conditions are satisfied (uses [Semaphore](https://semaphore.pse.dev/) by default) and that the ciphertext is constructed correctly using [Greco](https://github.com/gnosisguild/enclave/tree/main/packages/circuits/crates/libs/greco). See the Greco [paper](https://eprint.iacr.org/2024/594).


Loading