Skip to Content
DocumentationContributing

Contributing

Prerequisites

  • Python 3.11+ with uv 
  • Node.js 20+ with npm
  • circom 2.2.2+

Setup

git clone https://github.com/clearproof/clearproof.git cd clearproof uv sync --all-extras npm install bash scripts/compile_circuits.sh

Running tests

uv run pytest tests/ -v # All Python uv run pytest tests/unit/ -v # Unit only uv run pytest tests/integration/ -v # Integration uv run pytest tests/compliance/ -v # Compliance (sanctions, tiers, revocation) npm run build # TypeScript type-check npm run test:ts # TypeScript tests cd packages/contracts && npx hardhat test # Contracts (26 tests)

Code style

  • Python: Ruff (line length 120, target 3.11). Run make lint and make format.
  • TypeScript: Strict mode. Run npm run build to type-check all packages.

PR process

  1. Branch from main with a descriptive name
  2. Write tests for new functionality
  3. Ensure CI passes
  4. Open a PR with a clear description

Circuit guidelines

  • Range-check all private inputs
  • Domain-separate hash functions
  • Verify constraint count after changes
  • Test with edge cases and boundary values
  • Document public signals

Good first issues

  • Test coverage for edge cases
  • SDK error message improvements
  • Documentation improvements
  • CLI commands for common operations