Skip to content

chore: enclave docs [skip-line-limit]#1021

Merged
hmzakhalid merged 19 commits into
mainfrom
chore/enclave-docs
Dec 17, 2025
Merged

chore: enclave docs [skip-line-limit]#1021
hmzakhalid merged 19 commits into
mainfrom
chore/enclave-docs

Conversation

@hmzakhalid

@hmzakhalid hmzakhalid commented Nov 15, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Documentation

    • Reorganized site navigation and added many pages (Use Cases, Best Practices, Ciphernode Operators, Enclave SDK, Noir Circuits, Project Template); extensive operator guides added.
    • Quick Start and local dev simplified to script-driven single-command orchestration with optional manual controls.
    • Updated deployment and proving guidance to use Boundless + IPFS; expanded notes on program/circuits/verifier build and deployment.
  • Documentation / API

    • Consolidated request payload into a structured params object and revised event/result payload shapes.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Nov 15, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
enclave-docs Ready Ready Preview, Comment Dec 17, 2025 0:21am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
crisp Skipped Skipped Dec 17, 2025 0:21am

@coderabbitai

coderabbitai Bot commented Nov 15, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Reorganizes CRISP docs/examples into a monorepo multi-package layout, centralizes dev orchestration via root scripts (pnpm dev:setup / pnpm dev:up), documents the Enclave.request API change to an E3RequestParams struct, adds SDK/Noir/Ciphernode operator guides, and replaces Bonsai guidance with Boundless + IPFS program-upload instructions.

Changes

Cohort / File(s) Summary
CRISP docs
docs/pages/CRISP/introduction.mdx, docs/pages/CRISP/setup.mdx, docs/pages/CRISP/running-e3.mdx
Rework to multi-package layout (packages/, crates/), centralize dev orchestration (pnpm dev:setup, pnpm dev:up), switch local dev to Hardhat, expand Noir/circuits and emitted artifacts (CRISPVerifier.sol, verification keys), and update coordination server description.
API & computation flow
docs/pages/building-with-enclave.mdx, docs/pages/computation-flow.mdx
Document Solidity API change to function request(E3RequestParams calldata requestParams) external returns (uint256 e3Id, E3 memory e3);, add E3RequestParams struct and related E3/event payload changes.
Site nav / meta
docs/pages/_meta.json
Reorganize site navigation: rename sections, add "Getting Started", "Tooling", "Operations", and new entries for SDK, Noir Circuits, Use Cases, Best Practices, Ciphernode Operators.
Examples (CRISP)
examples/CRISP/Readme.md, examples/CRISP/program/README.md
Replace Bonsai guidance with Boundless (RISC Zero + Boundless), add IPFS program upload workflow, update enclave.config.yaml example for Boundless, and adjust diagrams/labels.
Ciphernode operators
docs/pages/ciphernode-operators/_meta.json, docs/pages/ciphernode-operators/*.mdx
Add Ciphernode Operators section: index, running, registration, tickets & sortition, exits & slashing pages with CLI examples, diagrams, policies, monitoring, and operational checklists.
Best practices & use cases
docs/pages/best-practices.mdx, docs/pages/use-cases.mdx
Add Best Practices playbook and Use Cases catalog with patterns, flows, and checklists.
SDK & developer docs
docs/pages/sdk.mdx, docs/pages/setting-up-server.mdx, docs/pages/noir-circuits.mdx, docs/pages/project-template.mdx
Add Enclave SDK docs (TS/React usage, hooks), update server setup to reference @enclave-e3/sdk, document Noir circuits workspace and Nargo integration, and add project template layout and scripts.
Workflow & compute provider
docs/pages/quick-start.mdx, docs/pages/compute-provider.mdx, docs/pages/write-secure-program.mdx
Update Quick Start (add ciphernode step), switch compute-provider guidance to Boundless + RISC Zero, and update example headings/comments to reference Boundless.
Config examples / tests
tests/integration/enclave.config.yaml
Replace dev-mode risc0 example with Boundless-oriented example (risc0_dev_mode: 0) and add boundless block fields (rpc_url, private_key, pinata_jwt, program_url, onchain).
Integration readmes & minor docs
docs/pages/CRISP/*, examples/CRISP/*, docs/pages/quick-start.mdx
Misc edits: capitalization/terminology tweaks, updated log/output examples, CLI-driven flows, and references to root-level scripts (scripts/dev*.sh, pnpm cli, pnpm dev:up).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas to inspect closely:
    • Consistency of moved/renamed paths and package names (e.g., packages/crisp-contracts, @enclave-e3/sdk) across docs, scripts, and examples
    • Accuracy and completeness of the Solidity API change (E3RequestParams fields, return types, and event payload changes)
    • Matching pnpm/script names (pnpm dev:setup, pnpm dev:up, scripts/dev*.sh) with repository scripts
    • Boundless config fields and example enclave.config.yaml correctness (rpc_url, private_key, pinata_jwt, program_url)
    • Ciphernode operators docs for CLI examples, state transitions, and referenced contract addresses

Possibly related issues

Possibly related PRs

Suggested labels

documentation, crisp, sdk

Suggested reviewers

  • 0xjei
  • cedoor

Poem

"🐇 I hopped through docs and stitched each line,
Boundless skies and Hardhat shine,
Scripts that hum and circuits gleam,
IPFS seeds a tiny dream,
Carrots for tidy repo time!"

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: enclave docs' is vague and generic—it does not convey the specific scope or substance of the changes beyond indicating documentation updates. Replace with a more specific title that reflects the primary documentation changes, such as 'docs: restructure CRISP setup, operations, and operator guides' or 'docs: add ciphernode operations and deployment guides'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/enclave-docs

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 464933d and a0f23ec.

📒 Files selected for processing (1)
  • docs/pages/sdk.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.
📚 Learning: 2025-11-05T14:12:57.814Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.

Applied to files:

  • docs/pages/sdk.mdx
📚 Learning: 2024-10-22T03:39:29.448Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 145
File: packages/ciphernode/evm/src/enclave_sol_reader.rs:87-89
Timestamp: 2024-10-22T03:39:29.448Z
Learning: In the `ciphernode` project, specifically in `packages/ciphernode/evm/src/enclave_sol_reader.rs`, the method `EnclaveSolReader::attach` should be retained even if it directly calls `EvmEventReader::attach` without additional processing. Avoid suggesting its removal in future reviews.

Applied to files:

  • docs/pages/sdk.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build_sdk
  • GitHub Check: build_enclave_cli
  • GitHub Check: test_net
  • GitHub Check: build_crisp_sdk
  • GitHub Check: integration_prebuild
  • GitHub Check: rust_unit
  • GitHub Check: build_ciphernode_image
  • GitHub Check: build_e3_support_dev
  • GitHub Check: rust_integration
🔇 Additional comments (3)
docs/pages/sdk.mdx (3)

35-69: LGTM!

The SDK initialization and request flow examples are clear and follow standard patterns.


71-86: LGTM!

The event subscription pattern is correct. The handler is properly defined and referenced in the cleanup call.


114-170: LGTM!

The configuration guidance, template integration details, application-specific SDK discussion, and troubleshooting section are well-structured and accurate. The CRISP example correctly identifies it as using @crisp-e3/sdk as an application-specific SDK.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel vercel Bot temporarily deployed to Preview – crisp November 19, 2025 14:07 Inactive
@vercel vercel Bot temporarily deployed to Preview – crisp November 19, 2025 14:40 Inactive
@vercel vercel Bot temporarily deployed to Preview – crisp December 9, 2025 02:40 Inactive
@vercel vercel Bot temporarily deployed to Preview – crisp December 9, 2025 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – crisp December 10, 2025 19:27 Inactive
@cedoor cedoor force-pushed the chore/enclave-docs branch from d78abb9 to eb58d9a Compare December 16, 2025 11:02
@hmzakhalid hmzakhalid marked this pull request as ready for review December 16, 2025 11:08
@cedoor cedoor requested review from cedoor and ctrlc03 December 16, 2025 11:09

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 70913fd and eb58d9a.

📒 Files selected for processing (24)
  • docs/pages/CRISP/introduction.mdx (2 hunks)
  • docs/pages/CRISP/running-e3.mdx (3 hunks)
  • docs/pages/CRISP/setup.mdx (5 hunks)
  • docs/pages/_meta.json (3 hunks)
  • docs/pages/best-practices.mdx (1 hunks)
  • docs/pages/building-with-enclave.mdx (6 hunks)
  • docs/pages/ciphernode-operators/_meta.json (1 hunks)
  • docs/pages/ciphernode-operators/exits-and-slashing.mdx (1 hunks)
  • docs/pages/ciphernode-operators/index.mdx (1 hunks)
  • docs/pages/ciphernode-operators/registration.mdx (1 hunks)
  • docs/pages/ciphernode-operators/running.mdx (1 hunks)
  • docs/pages/ciphernode-operators/tickets-and-sortition.mdx (1 hunks)
  • docs/pages/computation-flow.mdx (1 hunks)
  • docs/pages/compute-provider.mdx (2 hunks)
  • docs/pages/noir-circuits.mdx (1 hunks)
  • docs/pages/project-template.mdx (1 hunks)
  • docs/pages/quick-start.mdx (1 hunks)
  • docs/pages/sdk.mdx (1 hunks)
  • docs/pages/setting-up-server.mdx (1 hunks)
  • docs/pages/use-cases.mdx (1 hunks)
  • docs/pages/write-secure-program.mdx (2 hunks)
  • examples/CRISP/Readme.md (1 hunks)
  • examples/CRISP/program/README.md (1 hunks)
  • tests/integration/enclave.config.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-08-27T13:53:47.832Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: packages/circuits/crates/libs/polynomial/src/lib.nr:121-133
Timestamp: 2025-08-27T13:53:47.832Z
Learning: In Noir circuits, prefer relying on built-in array bounds checking rather than adding explicit preconditions for buffer overflow protection, as the language already provides safety guarantees that will fail the circuit on out-of-bounds access.

Applied to files:

  • docs/pages/noir-circuits.mdx
📚 Learning: 2025-08-25T10:28:56.174Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 657
File: Cargo.toml:32-34
Timestamp: 2025-08-25T10:28:56.174Z
Learning: The examples/CRISP directory has its own Cargo.toml workspace configuration with members like "server", "wasm-crypto", "program/core", "program/client", etc. The root workspace intentionally excludes "examples/CRISP/server", "examples/CRISP/program", and "examples/CRISP/wasm-crypto" to prevent double workspace membership, which is the correct approach for self-contained example workspaces.

Applied to files:

  • docs/pages/noir-circuits.mdx
  • examples/CRISP/Readme.md
  • docs/pages/CRISP/introduction.mdx
  • docs/pages/CRISP/setup.mdx
📚 Learning: 2024-11-05T06:49:46.285Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 173
File: packages/ciphernode/enclave_node/src/datastore.rs:14-16
Timestamp: 2024-11-05T06:49:46.285Z
Learning: In `packages/ciphernode/enclave_node/src/datastore.rs`, for internal functions like `get_in_mem_store`, adding extensive documentation and error handling may not be necessary if they are not client-facing.

Applied to files:

  • docs/pages/write-secure-program.mdx
  • docs/pages/ciphernode-operators/running.mdx
📚 Learning: 2024-10-22T02:10:34.864Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 145
File: packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs:82-83
Timestamp: 2024-10-22T02:10:34.864Z
Learning: In the file `packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs`, when reviewing test functions like `generate_pk_share`, minor performance optimizations (e.g., minimizing mutex locks) are not a priority.

Applied to files:

  • docs/pages/write-secure-program.mdx
📚 Learning: 2025-11-05T14:12:57.814Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.

Applied to files:

  • docs/pages/setting-up-server.mdx
  • docs/pages/CRISP/introduction.mdx
  • docs/pages/CRISP/setup.mdx
  • docs/pages/sdk.mdx
📚 Learning: 2025-11-12T10:08:30.720Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 996
File: examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol:144-169
Timestamp: 2025-11-12T10:08:30.720Z
Learning: In the CRISP program (examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol), there are plans to move the merkle tree from the Enclave contract to the program contract itself in the future, which would allow direct calls to validateInput to be stored in the merkle tree.

Applied to files:

  • examples/CRISP/Readme.md
  • docs/pages/CRISP/introduction.mdx
  • docs/pages/CRISP/setup.mdx
  • docs/pages/building-with-enclave.mdx
📚 Learning: 2025-10-10T12:56:40.538Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` is acceptable in template README files and documentation for local testing/interaction purposes.

Applied to files:

  • docs/pages/project-template.mdx
🪛 Gitleaks (8.30.0)
docs/pages/ciphernode-operators/running.mdx

[high] 186-186: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 LanguageTool
docs/pages/ciphernode-operators/index.mdx

[style] ~98-~98: Consider a more concise word here.
Context: ...## Getting Started Follow these guides in order to become an active ciphernode operator: ...

(IN_ORDER_TO_PREMIUM)

examples/CRISP/Readme.md

[style] ~237-~237: Consider shortening or rephrasing this to strengthen your wording.
Context: ...oading Your Program to IPFS** When you make changes to the guest program in program/, you ne...

(MAKE_CHANGES)

docs/pages/best-practices.mdx

[style] ~32-~32: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ... Secure Process, then assert equality prior to any heavy math. - Proof hooks: When...

(EN_WORDINESS_PREMIUM_PRIOR_TO)

docs/pages/CRISP/setup.mdx

[style] ~177-~177: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ploading Your Program to IPFS When you make changes to the guest program in program/, you ne...

(MAKE_CHANGES)

🪛 markdownlint-cli2 (0.18.1)
examples/CRISP/Readme.md

235-235: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build_enclave_cli
  • GitHub Check: crisp_unit
🔇 Additional comments (34)
examples/CRISP/program/README.md (1)

21-26: LGTM! Diagram updated to reflect Boundless integration.

The Mermaid diagram correctly updates the compute provider reference from Bonsai to Boundless (RISC Zero), aligning with the broader documentation changes across the PR.

tests/integration/enclave.config.yaml (1)

24-30: LGTM! Enhanced configuration guidance for Boundless.

The expanded commented configuration block provides clear examples for Boundless integration, including production mode settings and IPFS program URL configuration. These examples align with the updated workflows documented elsewhere in the PR.

docs/pages/write-secure-program.mdx (2)

42-43: LGTM! Documentation updated to reflect Boundless integration.

The comment and link correctly reference Boundless for production proving, providing developers with the appropriate resources.


63-63: LGTM! Example heading updated for Boundless.

The heading now accurately reflects that the example uses RISC Zero with Boundless, consistent with the broader documentation updates.

docs/pages/quick-start.mdx (1)

108-110: LGTM! Valuable addition to the next steps.

Adding the Ciphernode Operators guide as a step provides users with clear guidance on transitioning from local development to production deployment with bonded nodes.

examples/CRISP/Readme.md (1)

207-234: LGTM! Comprehensive Boundless configuration guidance.

The updated section provides clear, detailed instructions for configuring Boundless for production proving, including all required parameters (RPC endpoint, private key, Pinata JWT, program URL). The YAML configuration block is well-structured and includes helpful inline comments.

docs/pages/CRISP/introduction.mdx (2)

34-44: LGTM! Project structure updated to reflect reorganization.

The updated structure accurately reflects the move to a packages-based organization with clear separation between TypeScript packages (packages/) and Rust crates (crates/). The inclusion of docker-compose.yaml and updated paths are helpful additions.


74-79: LGTM! Enhanced documentation for Noir circuits.

The expanded section provides valuable details about the Noir circuit compilation process and artifact generation (CRISPVerifier.sol), helping developers understand the build pipeline.

docs/pages/computation-flow.mdx (2)

14-24: LGTM! Clear explanation of E3RequestParams consolidation.

The updated Phase 1 documentation clearly explains the new structured approach using E3RequestParams, breaking down each field's purpose. This is a significant improvement over passing multiple discrete parameters.


27-42: LGTM! Well-structured API change to E3RequestParams.

The function signature simplification and the comprehensive struct definition improve API maintainability and type safety. All necessary parameters are captured in the struct with clear field names.

docs/pages/CRISP/setup.mdx (3)

81-116: LGTM! Excellent Quick Start workflow documentation.

The updated Quick Start section provides a clear, streamlined workflow with the new pnpm dev:up command and detailed explanations of each step. The concurrent service startup approach with automatic restarts is well-documented.


150-174: LGTM! Comprehensive Boundless configuration guidance.

The Boundless configuration section provides detailed, production-ready instructions with all required parameters clearly explained. The note about prerequisites (RPC endpoint, private key, Pinata JWT) is particularly helpful.


207-228: LGTM! Helpful component-level commands.

The individual component commands provide flexibility for developers who want to run services separately during development or debugging. The dependency chain (Hardhat → ciphernodes → program server → coordination server → client) is clearly documented.

docs/pages/CRISP/running-e3.mdx (1)

23-183: LGTM - Clear documentation structure with helpful workflow consolidation.

The updated documentation successfully consolidates the multi-terminal workflow into a supervisor-driven approach, making it easier for developers to get started. The addition of the Manual Control section provides good flexibility for advanced users who need granular control.

docs/pages/ciphernode-operators/_meta.json (1)

1-17: LGTM - Well-structured navigation metadata.

The metadata file provides clear organization for the Ciphernode Operators documentation section with appropriate titles.

docs/pages/setting-up-server.mdx (1)

32-42: LGTM - Correct SDK package references.

The updated installation instructions correctly reference @enclave-e3/sdk for the TypeScript SDK and @enclave-e3/react for React applications, aligning with the package structure.

docs/pages/sdk.mdx (2)

88-110: LGTM - Complete React hook example.

The React hook example properly demonstrates event subscription with cleanup, including all necessary destructured variables from useEnclaveSDK.


1-152: Comprehensive SDK documentation with good examples.

The documentation provides clear installation steps, core client setup, event handling, and React integration examples. The troubleshooting table is particularly helpful.

docs/pages/noir-circuits.mdx (1)

1-84: LGTM - Clear and comprehensive Noir circuits guide.

The documentation provides good coverage of workspace layout, tooling requirements, compilation workflows, and integration guidance. The version-specific notes about directory structure changes are particularly helpful.

docs/pages/ciphernode-operators/running.mdx (2)

179-188: LGTM - Docker example uses appropriate placeholder.

The Docker run command correctly uses 0xYourPrivateKey as a placeholder. Users should replace this with their actual private key when deploying. The static analysis warning is a false positive.


1-331: Excellent comprehensive guide for ciphernode operators.

This documentation provides clear, actionable guidance for three different deployment methods (DappNode, CLI, Docker) with comprehensive configuration references, networking requirements, and monitoring guidance. The structure makes it easy for operators to choose their preferred method and get started quickly.

docs/pages/use-cases.mdx (1)

1-63: LGTM - Well-structured use case documentation.

The documentation effectively presents concrete scenarios with clear problem statements, patterns, flows, and extras. The Solution Matrix provides a helpful quick reference. The contextual references to other platforms (Ritual, Fhenix, Olas) help position Enclave in the broader ecosystem.

docs/pages/compute-provider.mdx (1)

54-115: LGTM - Clear Boundless integration guidance.

The updates appropriately reflect the integration of Boundless as a decentralized proving marketplace for RISC Zero programs. The configuration section provides clear, actionable steps while appropriately linking to detailed documentation. The cross-reference link to /CRISP/setup#boundless-configuration-production-proving exists and correctly targets the "Boundless Configuration (Production Proving)" section in the documentation structure.

docs/pages/ciphernode-operators/index.mdx (2)

1-104: LGTM - Well-structured operator overview.

This overview page provides a comprehensive introduction to ciphernode operations with clear sections on responsibilities, contract architecture, lifecycle states, and getting started guidance. The Mermaid diagram effectively visualizes the operator state transitions.


39-52: Fix deploy block numbers for three contracts to match deployed_contracts.json.

The contract addresses are correct, but deploy block numbers contain errors:

  • SlashingManager: change 9761309 to 9761313
  • EnclaveTicketToken: change 9761309 to 9761312
  • EnclaveToken: change 9761309 to 9761310
⛔ Skipped due to learnings
Learnt from: cedoor
Repo: gnosisguild/enclave PR: 752
File: packages/enclave-contracts/contracts/Enclave.sol:15-17
Timestamp: 2025-09-19T11:16:53.825Z
Learning: The Enclave contract in the gnosisguild/enclave repository has not been deployed yet as of September 2025, so storage layout considerations for upgradeable contracts don't apply to current changes.
docs/pages/ciphernode-operators/exits-and-slashing.mdx (1)

1-212: LGTM - Comprehensive lifecycle documentation.

This page provides excellent coverage of end-of-lifecycle operations including rewards, slashing, and exit procedures. The Mermaid flowchart, Solidity struct definition, and CLI command examples are clear and actionable. The troubleshooting section and best practices add significant practical value.

docs/pages/ciphernode-operators/tickets-and-sortition.mdx (1)

1-177: LGTM - Clear explanation of tickets and sortition.

This page effectively explains the ticket economics and sortition algorithm with clear formulas, diagrams, and practical guidance. The monitoring section and troubleshooting table provide valuable operational insights.

docs/pages/ciphernode-operators/registration.mdx (1)

1-230: LGTM - Thorough registration guide.

This registration guide provides clear step-by-step instructions with realistic CLI examples and status outputs. The inclusion of economic parameters, best practices, and troubleshooting makes this a comprehensive operator onboarding resource.

docs/pages/best-practices.mdx (1)

1-65: LGTM - Valuable operational guidance.

This best practices guide provides actionable guidance across parameter selection, validation, compute providers, key management, and observability. The deployment checklist offers a practical pre-flight workflow.

docs/pages/project-template.mdx (2)

1-98: LGTM - Clear template documentation.

This page effectively documents the default project template structure, commands, and customization options. The layout diagram, command table, and integration guidance provide clear onboarding for new users.


72-74: Verify git tag reference.

The example references tag = "v0.1.5" in the Noir dependency configuration. The existence and validity of this tag in the gnosisguild/enclave repository could not be definitively confirmed through available sources. Verify that this tag exists in the repository and points to a valid commit before publishing, or update to a tag that can be independently verified.

docs/pages/building-with-enclave.mdx (2)

163-178: LGTM - Example code updated correctly.

The JavaScript example correctly constructs the requestParams object and parses the receipt to extract e3Id from the E3Requested event, aligning with the new API structure.


44-59: Documentation is accurate and matches implementation.

All documented aspects have been verified against the actual Enclave contract implementation. The request function signature, E3RequestParams struct definition, and the E3Requested event match exactly. The five-step request flow described (struct validation, fee estimation, E3 record creation with block entropy, E3Program validation hook, committee selection, and event emission) all correspond precisely to the implementation in Enclave.sol:219-295. No integration errors expected.

docs/pages/_meta.json (1)

1-103: LGTM - Navigation restructuring aligns with new documentation.

The metadata changes reorganize the documentation navigation with logical groupings (Overview, Getting Started, Tooling, Build an E3 Program, Operations, Examples, Reference) and add entries for all new documentation pages introduced in this PR. The structure improves discoverability and navigation flow.

Comment thread docs/pages/CRISP/setup.mdx
Comment thread docs/pages/sdk.mdx
Comment thread examples/CRISP/Readme.md Outdated
hmzakhalid and others added 4 commits December 16, 2025 19:15
ctrlc03
ctrlc03 previously approved these changes Dec 16, 2025
Comment thread docs/pages/CRISP/introduction.mdx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/pages/CRISP/setup.mdx (1)

155-166: Add security warning for sensitive configuration values.

The Boundless configuration example includes placeholders for private_key and pinata_jwt. Consider adding an explicit warning to never commit real credentials to version control, as users may copy-paste this block directly.

 ```yaml
 program:
   dev: false # Disable dev mode to use real proofs
   risc0:
     risc0_dev_mode: 0 # 0 = production (Boundless), 1 = dev mode
     boundless:
       rpc_url: 'https://sepolia.infura.io/v3/YOUR_KEY' # RPC endpoint
-      private_key: 'YOUR_PRIVATE_KEY' # Wallet with funds for proving
-      pinata_jwt: 'YOUR_PINATA_JWT' # Required for uploading programs to IPFS
+      private_key: 'YOUR_PRIVATE_KEY' # Wallet with funds for proving (⚠️ never commit real keys)
+      pinata_jwt: 'YOUR_PINATA_JWT' # Required for uploading programs to IPFS (⚠️ never commit)
       program_url: 'https://gateway.pinata.cloud/ipfs/YOUR_CID' # Pre-uploaded program URL
       onchain: true # true = onchain requests, false = offchain

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between fdb0f2da7af17e78c4cd02c9d3bc9793bcc5225d and a96e32550630a96f66ad992c585781b94bb89803.

</details>

<details>
<summary>📒 Files selected for processing (24)</summary>

* `docs/pages/CRISP/introduction.mdx` (2 hunks)
* `docs/pages/CRISP/running-e3.mdx` (2 hunks)
* `docs/pages/CRISP/setup.mdx` (5 hunks)
* `docs/pages/_meta.json` (3 hunks)
* `docs/pages/best-practices.mdx` (1 hunks)
* `docs/pages/building-with-enclave.mdx` (6 hunks)
* `docs/pages/ciphernode-operators/_meta.json` (1 hunks)
* `docs/pages/ciphernode-operators/exits-and-slashing.mdx` (1 hunks)
* `docs/pages/ciphernode-operators/index.mdx` (1 hunks)
* `docs/pages/ciphernode-operators/registration.mdx` (1 hunks)
* `docs/pages/ciphernode-operators/running.mdx` (1 hunks)
* `docs/pages/ciphernode-operators/tickets-and-sortition.mdx` (1 hunks)
* `docs/pages/computation-flow.mdx` (1 hunks)
* `docs/pages/compute-provider.mdx` (2 hunks)
* `docs/pages/noir-circuits.mdx` (1 hunks)
* `docs/pages/project-template.mdx` (1 hunks)
* `docs/pages/quick-start.mdx` (1 hunks)
* `docs/pages/sdk.mdx` (1 hunks)
* `docs/pages/setting-up-server.mdx` (1 hunks)
* `docs/pages/use-cases.mdx` (1 hunks)
* `docs/pages/write-secure-program.mdx` (2 hunks)
* `examples/CRISP/Readme.md` (1 hunks)
* `examples/CRISP/program/README.md` (1 hunks)
* `tests/integration/enclave.config.yaml` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (14)</summary>

* docs/pages/ciphernode-operators/_meta.json
* docs/pages/sdk.mdx
* docs/pages/ciphernode-operators/exits-and-slashing.mdx
* docs/pages/noir-circuits.mdx
* docs/pages/setting-up-server.mdx
* docs/pages/quick-start.mdx
* docs/pages/computation-flow.mdx
* docs/pages/project-template.mdx
* tests/integration/enclave.config.yaml
* docs/pages/use-cases.mdx
* examples/CRISP/program/README.md
* docs/pages/ciphernode-operators/tickets-and-sortition.mdx
* docs/pages/_meta.json
* docs/pages/ciphernode-operators/registration.mdx

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧠 Learnings (9)</summary>

<details>
<summary>📓 Common learnings</summary>

Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, enclave-e3/sdk and crisp-e3/sdk are different packages: enclave-e3/sdk is the general Enclave SDK, while crisp-e3/sdk is the CRISP-specific SDK. The CRISP client (examples/CRISP/client) intentionally depends on enclave-e3/sdk, not crisp-e3/sdk.


Learnt from: ryardley
Repo: gnosisguild/enclave PR: 173
File: packages/ciphernode/enclave_node/src/datastore.rs:14-16
Timestamp: 2024-11-05T06:49:46.285Z
Learning: In packages/ciphernode/enclave_node/src/datastore.rs, for internal functions like get_in_mem_store, adding extensive documentation and error handling may not be necessary if they are not client-facing.


</details>
<details>
<summary>📚 Learning: 2025-11-05T14:12:57.814Z</summary>

Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, enclave-e3/sdk and crisp-e3/sdk are different packages: enclave-e3/sdk is the general Enclave SDK, while crisp-e3/sdk is the CRISP-specific SDK. The CRISP client (examples/CRISP/client) intentionally depends on enclave-e3/sdk, not crisp-e3/sdk.


**Applied to files:**
- `docs/pages/CRISP/setup.mdx`
- `docs/pages/CRISP/introduction.mdx`

</details>
<details>
<summary>📚 Learning: 2025-08-25T10:28:56.174Z</summary>

Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 657
File: Cargo.toml:32-34
Timestamp: 2025-08-25T10:28:56.174Z
Learning: The examples/CRISP directory has its own Cargo.toml workspace configuration with members like "server", "wasm-crypto", "program/core", "program/client", etc. The root workspace intentionally excludes "examples/CRISP/server", "examples/CRISP/program", and "examples/CRISP/wasm-crypto" to prevent double workspace membership, which is the correct approach for self-contained example workspaces.


**Applied to files:**
- `docs/pages/CRISP/setup.mdx`
- `examples/CRISP/Readme.md`
- `docs/pages/CRISP/introduction.mdx`

</details>
<details>
<summary>📚 Learning: 2025-11-12T10:08:30.720Z</summary>

Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 996
File: examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol:144-169
Timestamp: 2025-11-12T10:08:30.720Z
Learning: In the CRISP program (examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol), there are plans to move the merkle tree from the Enclave contract to the program contract itself in the future, which would allow direct calls to validateInput to be stored in the merkle tree.


**Applied to files:**
- `docs/pages/CRISP/setup.mdx`
- `examples/CRISP/Readme.md`
- `docs/pages/building-with-enclave.mdx`
- `docs/pages/CRISP/introduction.mdx`

</details>
<details>
<summary>📚 Learning: 2024-11-05T06:49:46.285Z</summary>

Learnt from: ryardley
Repo: gnosisguild/enclave PR: 173
File: packages/ciphernode/enclave_node/src/datastore.rs:14-16
Timestamp: 2024-11-05T06:49:46.285Z
Learning: In packages/ciphernode/enclave_node/src/datastore.rs, for internal functions like get_in_mem_store, adding extensive documentation and error handling may not be necessary if they are not client-facing.


**Applied to files:**
- `docs/pages/write-secure-program.mdx`

</details>
<details>
<summary>📚 Learning: 2024-10-22T02:10:34.864Z</summary>

Learnt from: ryardley
Repo: gnosisguild/enclave PR: 145
File: packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs:82-83
Timestamp: 2024-10-22T02:10:34.864Z
Learning: In the file packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs, when reviewing test functions like generate_pk_share, minor performance optimizations (e.g., minimizing mutex locks) are not a priority.


**Applied to files:**
- `docs/pages/write-secure-program.mdx`

</details>
<details>
<summary>📚 Learning: 2024-10-22T03:39:29.448Z</summary>

Learnt from: ryardley
Repo: gnosisguild/enclave PR: 145
File: packages/ciphernode/evm/src/enclave_sol_reader.rs:87-89
Timestamp: 2024-10-22T03:39:29.448Z
Learning: In the ciphernode project, specifically in packages/ciphernode/evm/src/enclave_sol_reader.rs, the method EnclaveSolReader::attach should be retained even if it directly calls EvmEventReader::attach without additional processing. Avoid suggesting its removal in future reviews.


**Applied to files:**
- `docs/pages/building-with-enclave.mdx`

</details>
<details>
<summary>📚 Learning: 2025-10-10T12:56:40.538Z</summary>

Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is acceptable in template README files and documentation for local testing/interaction purposes.


**Applied to files:**
- `docs/pages/CRISP/running-e3.mdx`

</details>
<details>
<summary>📚 Learning: 2025-09-11T13:09:03.800Z</summary>

Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3 deployment scripts, use (await signer.provider?.getNetwork())?.name ?? "localhost" instead of hre.globalOptions.network to reliably get the network name, as hre.globalOptions.network can be undefined in some contexts.


**Applied to files:**
- `docs/pages/CRISP/running-e3.mdx`

</details>

</details><details>
<summary>🪛 Gitleaks (8.30.0)</summary>

<details>
<summary>docs/pages/CRISP/running-e3.mdx</summary>

[high] 87-87: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

</details>
<details>
<summary>docs/pages/ciphernode-operators/running.mdx</summary>

[high] 186-186: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

</details>

</details>
<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>docs/pages/CRISP/setup.mdx</summary>

[style] ~177-~177: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ploading Your Program to IPFS  When you make changes to the guest program in `program/`, you ne...

(MAKE_CHANGES)

</details>
<details>
<summary>examples/CRISP/Readme.md</summary>

[style] ~237-~237: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ploading Your Program to IPFS  When you make changes to the guest program in `program/`, you ne...

(MAKE_CHANGES)

</details>
<details>
<summary>docs/pages/best-practices.mdx</summary>

[style] ~32-~32: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ... Secure Process, then assert   equality prior to any heavy math. - **Proof hooks**: When...

(EN_WORDINESS_PREMIUM_PRIOR_TO)

</details>
<details>
<summary>docs/pages/ciphernode-operators/index.mdx</summary>

[style] ~98-~98: Consider a more concise word here.
Context: ...## Getting Started  Follow these guides in order to become an active ciphernode operator:  ...

(IN_ORDER_TO_PREMIUM)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)</summary>

* GitHub Check: build_crisp_sdk
* GitHub Check: rust_unit
* GitHub Check: build_sdk
* GitHub Check: test_net
* GitHub Check: rust_integration
* GitHub Check: integration_prebuild
* GitHub Check: build_enclave_cli

</details>

<details>
<summary>🔇 Additional comments (19)</summary><blockquote>

<details>
<summary>docs/pages/write-secure-program.mdx (2)</summary><blockquote>

`42-43`: **LGTM!**

The updated comment correctly references Boundless as the production proving option and provides a helpful link to the Boundless documentation.

---

`63-63`: **LGTM!**

The heading update accurately reflects that the example now uses RISC Zero with Boundless.

</blockquote></details>
<details>
<summary>docs/pages/building-with-enclave.mdx (4)</summary><blockquote>

`139-153`: **Events correctly separated by emitting contract.**

The documentation now properly distinguishes between events emitted by the Enclave contract (`E3Requested`, `CiphertextOutputPublished`, `PlaintextOutputPublished`) and those emitted by the Program contract (`InputPublished`). This addresses the prior review feedback.

---

`44-58`: **LGTM!**

The request flow documentation is updated to reflect the new `E3RequestParams` struct pattern, which consolidates the request parameters into a single struct. The flow description is clear and accurate.

---

`96-97`: **LGTM!**

Good clarification that inputs can be accumulated with LazyIMT or another implementation chosen by the program. This addresses the prior reviewer feedback about mentioning LazyIMT.

---

`170-184`: **LGTM!**

The JavaScript example correctly demonstrates the new `E3RequestParams` struct pattern with proper field names and structure.

</blockquote></details>
<details>
<summary>docs/pages/compute-provider.mdx (2)</summary><blockquote>

`55-66`: **LGTM!**

The setup section correctly updates the guidance to use RISC Zero with Boundless as the compute provider, with appropriate links to the Boundless Foundry template.

---

`101-115`: **Clear and helpful Boundless configuration section.**

The new section provides a good overview of what's needed for Boundless integration, including RPC endpoints, private keys, optional IPFS via Pinata, and config file guidance. The internal link to the CRISP setup guide is correct and references the existing "Boundless Configuration (Production Proving)" section.

</blockquote></details>
<details>
<summary>examples/CRISP/Readme.md (2)</summary><blockquote>

`207-233`: **LGTM!**

The Boundless configuration section is well-structured with clear YAML example and helpful notes about requirements (RPC endpoint, private key, Pinata JWT). The configuration aligns with the broader documentation shift from Bonsai to Boundless.

---

`235-252`: **LGTM!**

The IPFS upload workflow section is properly formatted with a heading (addressing the prior review comment), and provides clear instructions for building, uploading, and updating the configuration. The `enclave program upload` command is consistent with the approach mentioned in the prior review feedback.

</blockquote></details>
<details>
<summary>docs/pages/best-practices.mdx (1)</summary><blockquote>

`1-65`: **Comprehensive best practices guide.**

This documentation page provides valuable operational guidance covering parameter selection, input validation, compute providers, key management, observability, and deployment. The content correctly references `IE3Program.validateInput` and properly links to the Ciphernode Operators and Use Cases documentation pages.

</blockquote></details>
<details>
<summary>docs/pages/ciphernode-operators/index.mdx (1)</summary><blockquote>

`1-103`: **LGTM: Well-structured operator overview.**

This documentation provides a clear and comprehensive introduction to Ciphernode operators. The contract architecture, lifecycle diagram, state descriptions, and requirements are all accurate and well-organized. The sequential guide structure helps operators onboard systematically.

</blockquote></details>
<details>
<summary>docs/pages/CRISP/introduction.mdx (2)</summary><blockquote>

`34-44`: **LGTM!**

The project structure documentation is clear and comprehensive, properly reflecting the multi-package layout with packages/, crates/, circuits/, and scripts/ directories.

---

`51-52`: No changes needed. The link `[CRISP SDK](/sdk)` is correct as written.

The CRISP client intentionally depends on `enclave-e3/sdk` (the general Enclave SDK), not a CRISP-specific SDK variant. The documentation correctly links to `/sdk`, which is the appropriate reference for this context. No `/CRISP/sdk` path exists or is needed.



> Likely an incorrect or invalid review comment.

</blockquote></details>
<details>
<summary>docs/pages/CRISP/setup.mdx (2)</summary><blockquote>

`93-103`: **LGTM!**

The six-step orchestration flow is clearly documented, explaining what `dev:up` does under the hood. This helps users understand the system without having to dive into the scripts.

---

`206-228`: **LGTM!**

The individual component commands section provides useful flexibility for developers who need to debug or customize specific services. The dependency chain (Hardhat → ciphernodes → program server → coordination server → client) is implicitly documented through the comments.

</blockquote></details>
<details>
<summary>docs/pages/CRISP/running-e3.mdx (3)</summary><blockquote>

`86-91`: **Example output looks good; Gitleaks alert is a false positive.**

The `0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512` flagged by Gitleaks is a contract address in example log output, not a secret. Contract addresses are public blockchain data.

---

`112-142`: **LGTM!**

The Manual Control section provides clear step-by-step commands with appropriate dependency handling using `wait-on`. This is valuable for developers who need to debug or customize individual components.

---

`198-206`: **LGTM!**

The troubleshooting section covers common issues and provides clear guidance. The reference to the Hardhat deployer key being pre-funded is helpful context for new users.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment thread docs/pages/ciphernode-operators/running.mdx
Comment thread docs/pages/CRISP/running-e3.mdx Outdated
Comment thread docs/pages/CRISP/running-e3.mdx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/pages/CRISP/introduction.mdx (1)

83-118: Remove or clarify documentation for non-existent contracts.

The documentation describes CRISPPolicy.sol and CRISPChecker.sol, but these contracts do not exist in the codebase. Only CRISPProgram.sol and CRISPVerifier.sol are present at /packages/crisp-contracts. Either remove references to the missing contracts or update the documentation to reflect the actual implementation structure.

♻️ Duplicate comments (2)
docs/pages/ciphernode-operators/running.mdx (1)

154-177: Contract addresses now consistent across examples.

The Docker configuration example now uses the same Sepolia contract addresses as the CLI example (lines 102-110), resolving the previously identified inconsistency.

docs/pages/CRISP/running-e3.mdx (1)

82-89: Include fee token approval logs in example output.

The example output is incomplete. Per a previous review, the actual init flow includes fee token approval steps (from commands.rs lines ~137-147), but the documented output omits:

  • "Fee required: X tokens"
  • "Approving fee token..."
  • Token allowance check result
  • Approval transaction hash

Update the example output to include these steps before the "E3 Program enabled" line so users see the complete initialization flow.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a96e325 and 7cb8150.

📒 Files selected for processing (3)
  • docs/pages/CRISP/introduction.mdx (2 hunks)
  • docs/pages/CRISP/running-e3.mdx (2 hunks)
  • docs/pages/ciphernode-operators/running.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 173
File: packages/ciphernode/enclave_node/src/datastore.rs:14-16
Timestamp: 2024-11-05T06:49:46.285Z
Learning: In `packages/ciphernode/enclave_node/src/datastore.rs`, for internal functions like `get_in_mem_store`, adding extensive documentation and error handling may not be necessary if they are not client-facing.
📚 Learning: 2025-10-10T12:56:40.538Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` is acceptable in template README files and documentation for local testing/interaction purposes.

Applied to files:

  • docs/pages/CRISP/running-e3.mdx
📚 Learning: 2025-09-11T13:09:03.800Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3 deployment scripts, use `(await signer.provider?.getNetwork())?.name ?? "localhost"` instead of `hre.globalOptions.network` to reliably get the network name, as `hre.globalOptions.network` can be undefined in some contexts.

Applied to files:

  • docs/pages/CRISP/running-e3.mdx
📚 Learning: 2025-11-05T14:12:57.814Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.

Applied to files:

  • docs/pages/CRISP/introduction.mdx
📚 Learning: 2025-08-25T10:28:56.174Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 657
File: Cargo.toml:32-34
Timestamp: 2025-08-25T10:28:56.174Z
Learning: The examples/CRISP directory has its own Cargo.toml workspace configuration with members like "server", "wasm-crypto", "program/core", "program/client", etc. The root workspace intentionally excludes "examples/CRISP/server", "examples/CRISP/program", and "examples/CRISP/wasm-crypto" to prevent double workspace membership, which is the correct approach for self-contained example workspaces.

Applied to files:

  • docs/pages/CRISP/introduction.mdx
📚 Learning: 2025-11-12T10:08:30.720Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 996
File: examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol:144-169
Timestamp: 2025-11-12T10:08:30.720Z
Learning: In the CRISP program (examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol), there are plans to move the merkle tree from the Enclave contract to the program contract itself in the future, which would allow direct calls to validateInput to be stored in the merkle tree.

Applied to files:

  • docs/pages/CRISP/introduction.mdx
📚 Learning: 2025-09-19T11:16:53.825Z
Learnt from: cedoor
Repo: gnosisguild/enclave PR: 752
File: packages/enclave-contracts/contracts/Enclave.sol:15-17
Timestamp: 2025-09-19T11:16:53.825Z
Learning: The Enclave contract in the gnosisguild/enclave repository has not been deployed yet as of September 2025, so storage layout considerations for upgradeable contracts don't apply to current changes.

Applied to files:

  • docs/pages/ciphernode-operators/running.mdx
🪛 Gitleaks (8.30.0)
docs/pages/CRISP/running-e3.mdx

[high] 85-85: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

docs/pages/ciphernode-operators/running.mdx

[high] 188-188: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build_sdk
  • GitHub Check: test_net
  • GitHub Check: build_e3_support_dev
  • GitHub Check: build_enclave_cli
  • GitHub Check: build_crisp_sdk
  • GitHub Check: integration_prebuild
  • GitHub Check: rust_unit
  • GitHub Check: rust_integration
  • GitHub Check: build_ciphernode_image
🔇 Additional comments (11)
docs/pages/ciphernode-operators/running.mdx (1)

1-333: Well-structured operational documentation.

The guide provides comprehensive coverage of three deployment methods with clear examples, configuration references, and operational guidance. The progression from easiest (DappNode) to most flexible (Docker) helps users choose the appropriate deployment method.

docs/pages/CRISP/running-e3.mdx (7)

35-54: LGTM! Clear orchestration documentation.

The consolidated startup flow with pnpm dev:up and the detailed explanation of what happens behind the scenes (Hardhat, contracts, Ciphernodes, program server, Rust backend, React client) is well-documented and user-friendly.


91-102: LGTM! MetaMask configuration is clear and accurate.

The setup correctly references the Hardhat deployer key (no Anvil confusion), provides the standard Hardhat development private key, and gives clear instructions for adding the local network with the correct chain ID (31337).


103-109: LGTM! Voting flow is clear and concise.

The section correctly references the client started by pnpm dev:up and accurately describes the voting round as being seeded by the CLI request.


110-141: LGTM! Comprehensive manual control documentation.

The optional manual steps are well-organized, showing exact commands for each component (Hardhat, Ciphernodes, program server, Rust server, React client) with appropriate wait-on conditions. The note about scripts/dev_services.sh orchestrating steps 2–5 is helpful for users who want partial automation.


142-183: LGTM! Helpful monitoring examples.

The section provides comprehensive example outputs from server logs, ciphernode logs, and final results. The example timestamps are older, but that's expected for documentation and helps users understand what to look for during the voting process.


196-205: LGTM! Accurate troubleshooting guidance.

The troubleshooting section correctly references the Hardhat faucet (not Anvil) and accurately notes that the account with the imported deployer key starts funded. The tips are practical and aligned with the Hardhat-based development environment.


28-31: The dev:setup script is correctly defined in examples/CRISP/package.json and executes bash ./scripts/setup.sh. The script file exists and performs all documented operations: installs dependencies via pnpm install, builds the CLI via cargo build --locked --bin cli, prepares environment files via cp .env.example .env, and compiles contracts via pnpm compile:contracts. No action needed.

Likely an incorrect or invalid review comment.

docs/pages/CRISP/introduction.mdx (3)

41-41: Verify the internal documentation link exists.

The reference to /noir-circuits on line 41 requires confirmation that a corresponding documentation page exists at that path. This verification needs to be completed by checking the repository's documentation structure.


34-34: Update line 52's SDK reference for accuracy.

Line 52 references "CRISP SDK" with a link to /sdk, but the SDK documentation page covers the general @enclave-e3/sdk, not the CRISP-specific SDK. The CRISP client actually depends on @crisp-e3/sdk (as correctly noted in the line 34 comment), which is the CRISP-specific implementation. Either clarify that the CRISP client uses the CRISP-specific SDK fork and point to appropriate CRISP SDK documentation, or update the prose to avoid suggesting the general SDK documentation applies to CRISP setup.


78-79: Documentation is accurate; no changes needed.

All claims in the documentation have been verified: scripts/compile_circuits.sh exists, compiles Noir circuits with nargo compile, writes verification keys using bb write_vk, generates the Solidity verifier with bb write_solidity_verifier, and correctly copies CRISPVerifier.sol to packages/crisp-contracts/contracts/.

Comment thread docs/pages/ciphernode-operators/running.mdx
Comment thread docs/pages/ciphernode-operators/running.mdx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/pages/sdk.mdx (1)

88-110: Fix the missing off in destructured variables.

Line 105 references the off function in the cleanup, but off is not included in the destructured variables from useEnclaveSDK at line 92. This will cause a ReferenceError.

Apply this diff to fix the example:

-  const { isInitialized, requestE3, onEnclaveEvent, EnclaveEventType } = useEnclaveSDK({
+  const { isInitialized, requestE3, onEnclaveEvent, off, EnclaveEventType } = useEnclaveSDK({
     autoConnect: true,
     contracts: {
       enclave: import.meta.env.VITE_ENCLAVE_ADDRESS,
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7cb8150 and 464933d.

📒 Files selected for processing (1)
  • docs/pages/sdk.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.
📚 Learning: 2025-11-05T14:12:57.814Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.

Applied to files:

  • docs/pages/sdk.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build_crisp_sdk
  • GitHub Check: integration_prebuild
  • GitHub Check: build_sdk
  • GitHub Check: build_ciphernode_image
  • GitHub Check: test_net
  • GitHub Check: rust_integration
  • GitHub Check: build_enclave_cli
  • GitHub Check: rust_unit
🔇 Additional comments (6)
docs/pages/sdk.mdx (6)

1-11: LGTM!

The front matter and overview clearly introduce the SDK packages and their purposes.


131-146: Good guidance on building application-specific SDKs.

This section correctly describes how CRISP builds its own SDK (@crisp-e3/sdk) with specialized functionality on top of or alongside the core Enclave SDK. This aligns with the architectural pattern where applications with complex requirements create dedicated SDKs.

Based on learnings, the distinction between @enclave-e3/sdk (general) and @crisp-e3/sdk (CRISP-specific) is correctly represented here.


112-116: Clear guidance on contract configuration.

The explanation of contract address configuration is accurate and well-presented.


148-168: Documentation is accurate and complete.

All advanced methods mentioned in the SDK documentation are properly implemented: getHistoricalEvents(), startEventPolling(), requestE3(), activateE3(), and publishInput() all exist in the codebase with gas limit support confirmed for the contract interaction methods. The referenced packages/enclave-sdk/README.md file is present, and the troubleshooting guidance aligns with the SDK's actual capabilities.


57-69: Review comment is accurate—requestE3 parameters match the current SDK implementation.

All parameter names in the code example (threshold, startWindow, duration, e3Program, e3ProgramParams, computeProviderParams, and customParams) correctly correspond to the SDK method signature defined in packages/enclave-sdk/src/enclave-sdk.ts. No corrections needed.


35-55: Add missing required parameters to SDK initialization example.

The EnclaveSDK constructor requires two additional parameters not shown:

  • protocol (required): The FheProtocol to use for Enclave requests
  • feeToken address in the contracts object (required)

Update the example to include these fields in the configuration object.

Comment thread docs/pages/sdk.mdx
Comment thread docs/pages/sdk.mdx
cedoor
cedoor previously approved these changes Dec 17, 2025
@hmzakhalid hmzakhalid merged commit fef2979 into main Dec 17, 2025
26 checks passed
@github-actions github-actions Bot deleted the chore/enclave-docs branch December 25, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants