chore: update crisp scripts and docs#1046
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughUpdates CRISP example docs and scripts to replace Anvil with Hardhat, remove legacy build steps, add a root Changes
Sequence Diagram(s)(Skipped — changes are documentation and small script updates without new runtime control-flow beyond existing dev start sequence.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧠 Learnings (3)📚 Learning: 2025-11-05T14:12:57.814ZApplied to files:
📚 Learning: 2025-08-25T10:28:56.174ZApplied to files:
📚 Learning: 2024-10-28T12:00:09.010ZApplied to files:
🪛 Gitleaks (8.29.0)docs/pages/CRISP/setup.mdx[high] 149-150: 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). (10)
🔇 Additional comments (4)
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. Comment |
There was a problem hiding this comment.
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 (4)
examples/CRISP/Readme.md (2)
118-129: Update stale comment referencing Anvil.The comment on line 118 still references Anvil, but the Quick Start output and instructions now use Hardhat. Update the comment for consistency.
-# Start all services (Anvil, Ciphernodes, Applications) +# Start all services (Hardhat, Ciphernodes, Applications)
165-204: Reconcile Manual Start section with Hardhat-based Quick Start workflow.The review comment is valid. The Quick Start section (lines ~120-145) uses
pnpm dev:up, which starts a "Hardhat node (local blockchain)," while the Manual Start section (lines 165–204) explicitly directs users to start Anvil (anvilcommand). These are two different local blockchain implementations, creating a genuine inconsistency between the primary recommended workflow and the manual alternative.To resolve: either update the Manual Start steps to use Hardhat instead of Anvil, or add clear documentation noting that Manual Start is a legacy/alternative approach with guidance on ensuring compatibility between the two setups (environment variables, contract addresses, RPC endpoints).
docs/pages/CRISP/setup.mdx (2)
19-19: Clarify the "Hardhat + Foundry hybrid" description.Line 19 states "Hardhat + Foundry hybrid setup" but doesn't explain what aspects use each tool. Clarify which components use Hardhat vs. Foundry to avoid confusion.
158-339: Update Manual Start section to align with Hardhat migration or clearly mark as legacy.The Manual Start section (lines 158-339) contradicts the Quick Start guidance by directing users to run
anvildirectly (line 200) instead of using the Hardhat-based workflow. Multiple Anvil references are present:
- Line 197-200: Direct Anvil invocation
- Line 203: Keep Anvil running
- Line 284: "based on default deployment addresses using local Anvil node"
- Line 293: "Anvil's default private key"
- Line 323: "Based on Default Anvil Deployments"
Meanwhile, Quick Start explicitly uses Hardhat (lines 126-156:
pnpm dev:setup+pnpm dev:up), and the intro describes a "Hardhat-based architecture" (line 11).Recommended actions:
- Update Manual Start to use the Hardhat setup workflow instead of direct Anvil
- Remove Manual Start if it's now obsolete
- Add a clear deprecation/legacy notice if Manual Start serves a specific educational purpose not covered by Quick Start
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
docs/pages/CRISP/setup.mdx(1 hunks)examples/CRISP/Readme.md(1 hunks)examples/CRISP/package.json(1 hunks)examples/CRISP/packages/crisp-contracts/README.md(1 hunks)examples/CRISP/scripts/build.sh(0 hunks)examples/CRISP/scripts/setup.sh(2 hunks)
💤 Files with no reviewable changes (1)
- examples/CRISP/scripts/build.sh
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-10-29T23:35:30.146Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 936
File: scripts/run-crisp-test.sh:1-3
Timestamp: 2025-10-29T23:35:30.146Z
Learning: In the scripts/run-crisp-test.sh file, the use of `rm -rf *` is acceptable as it's intentionally designed as a definitive reset-and-test script for clean checkouts.
Applied to files:
examples/CRISP/package.json
📚 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/packages/crisp-contracts/README.md
📚 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:
examples/CRISP/packages/crisp-contracts/README.mdexamples/CRISP/scripts/setup.sh
📚 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:
examples/CRISP/scripts/setup.sh
📚 Learning: 2024-10-28T12:00:09.010Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 156
File: packages/ciphernode/enclave/src/commands/wallet/set.rs:17-23
Timestamp: 2024-10-28T12:00:09.010Z
Learning: In the `enclave` package of the `ciphernode` project, prefer using `println!` over logging macros like `error!` from the `tracing` crate for error output in CLI commands.
Applied to files:
examples/CRISP/scripts/setup.sh
🪛 Gitleaks (8.29.0)
docs/pages/CRISP/setup.mdx
[high] 149-150: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
🪛 markdownlint-cli2 (0.18.1)
examples/CRISP/packages/crisp-contracts/README.md
6-6: Reference links and images should use a label that is defined
Missing link or image reference definition: "hardhat"
(MD052, reference-links-images)
⏰ 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). (10)
- GitHub Check: Validate PR Title
- GitHub Check: integration_prebuild
- GitHub Check: build_enclave_cli
- GitHub Check: build_e3_support_dev
- GitHub Check: test_net
- GitHub Check: test_contracts
- GitHub Check: build_sdk
- GitHub Check: crisp_rust_unit
- GitHub Check: rust_unit
- GitHub Check: rust_integration
🔇 Additional comments (4)
examples/CRISP/scripts/setup.sh (1)
14-14: LGTM.The addition of the crisp-contracts compilation step is well-placed and aligns with the shift to Hardhat-based testing across the project.
examples/CRISP/packages/crisp-contracts/README.md (1)
8-20: LGTM.The addition of clear test running instructions (
pnpm test:contractsandpnpm test) is helpful and aligns with the Hardhat-based testing workflow.examples/CRISP/package.json (1)
18-18: LGTM.The addition of the
test:contractsscript provides a convenient shorthand for running Hardhat contract tests from the CRISP root directory, aligning with the broader migration to Hardhat-based tooling.docs/pages/CRISP/setup.mdx (1)
149-150: Note: Exposed private key is intentional documentation.Line 149–150 exposes the default Hardhat private key. The gitleaks detector flagged this, but this is the well-known Hardhat test key, appropriate for documentation. No action needed, but be aware that this key has no real value (it's only valid on local Hardhat nodes).
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
63fc8ec to
ed7d148
Compare
Closes #896
Related: #895 (comment)
This PR remove the unused
build.shscript, updates thesetup.shscript and related CRISP docs.Summary by CodeRabbit
Documentation
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.