Thank you for your interest in contributing to PrivacyLayer! This project is building the first ZK-proof shielded pool on Stellar Soroban, and we welcome contributions from developers of all skill levels.
Browse the Issues tab to find tasks:
- Look for
good first issuelabels if you're new - Check
bountylabels for paid tasks (USDC via Drips Wave) - Filter by component:
circuits,contracts,sdk,frontend,documentation
Comment on the issue saying "I'd like to work on this" and wait for assignment confirmation before starting work.
See the Getting Started section in the README for prerequisites.
# Clone your fork
git clone https://github.com/YOUR_USERNAME/PrivacyLayer.git
cd PrivacyLayer
# Add upstream remote
git remote add upstream https://github.com/ANAVHEOBA/PrivacyLayer.git
# Create a feature branch
git checkout -b feature/your-feature-nameFollow the coding standards for each component (see below).
# Test circuits
cd circuits/commitment && nargo test
cd ../withdraw && nargo test
cd ../merkle && nargo test
# Test contracts
cd contracts && cargo test
# Test SDK (when available)
cd sdk && npm testgit add .
git commit -m "feat: add your feature description"
git push origin feature/your-feature-nameThen open a PR on GitHub:
- Reference the issue number (e.g., "Closes #42")
- Describe what you changed and why
- Include screenshots/logs if relevant
- Ensure all tests pass
- Use descriptive variable names
- Add comments explaining cryptographic operations
- Keep constraint count minimal
- Write tests for edge cases (zero values, max values, invalid inputs)
- Follow Noir naming conventions:
snake_casefor functions and variables
Example:
// Good
fn compute_commitment(nullifier: Field, secret: Field) -> Field {
// Use Poseidon hash for commitment
poseidon2_hash([nullifier, secret])
}
// Bad
fn cc(n: Field, s: Field) -> Field {
poseidon2_hash([n, s])
}- Follow Rust naming conventions:
snake_casefor functions,PascalCasefor types - Use
Result<T, Error>for error handling - Add doc comments (
///) for public functions - Keep functions small and focused
- Write unit tests for each function
- Write integration tests for user flows
Example:
/// Deposits a commitment into the privacy pool.
///
/// # Arguments
/// * `env` - The contract environment
/// * `commitment` - The Poseidon hash commitment
///
/// # Returns
/// The leaf index where the commitment was inserted
///
/// # Errors
/// Returns `Error::Paused` if the contract is paused
pub fn deposit(env: Env, commitment: U256) -> Result<u32, Error> {
// Implementation
}- Use TypeScript strict mode
- Follow Airbnb style guide
- Add JSDoc comments for public APIs
- Write unit tests with Jest
- Use async/await for asynchronous operations
- Export types for all public interfaces
Example:
/**
* Generates a new note for depositing into the privacy pool.
*
* @returns A note containing nullifier, secret, and commitment
*/
export async function generateNote(): Promise<Note> {
// Implementation
}- Use React functional components with hooks
- Follow Next.js best practices
- Use Tailwind CSS for styling
- Make UI accessible (ARIA labels, keyboard navigation)
- Add loading states and error handling
- Write component tests with React Testing Library
All PRs must include tests:
- Circuits: Test valid inputs, edge cases, and expected failures
- Contracts: Unit tests for each function + integration tests for user flows
- SDK: Unit tests with mocked contract calls
- Frontend: Component tests for UI interactions
This project handles cryptographic operations and user funds. Please:
- Never commit private keys or secrets
- Validate all user inputs
- Use constant-time operations for sensitive comparisons
- Report security vulnerabilities privately (see SECURITY.md)
- Don't introduce dependencies without review
- GitHub Issues: For bugs, features, and tasks
- Pull Requests: For code review and discussion
- GitHub Discussions: For questions and brainstorming (if enabled)
PrivacyLayer is funded via Drips Wave. Contributors earn USDC for completing bounty issues:
- Look for issues tagged with
bounty - Claim the issue by commenting
- Complete the work and submit a PR
- Once merged, receive USDC payment via Drips
Bounty amounts are listed in each issue. Payment is processed after PR merge.
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Assume good intentions
- No harassment, discrimination, or spam
- Fork the repository
- Clone your fork locally
- Create a feature branch
- Make your changes
- Test thoroughly
- Commit with clear messages
- Push to your fork
- Open a pull request
- Respond to review feedback
- Celebrate when merged! 🎉
- Check existing issues and discussions
- Ask in the issue you're working on
- Open a new discussion for general questions
Thank you for contributing to PrivacyLayer! 🙏