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.shRunning 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 lintandmake format. - TypeScript: Strict mode. Run
npm run buildto type-check all packages.
PR process
- Branch from
mainwith a descriptive name - Write tests for new functionality
- Ensure CI passes
- 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