Thank you for contributing to protocol-grade infrastructure. This guide defines the standards required for all contributions. Non-conforming PRs will be closed without review.
- Code of Conduct
- Conventional Commits
- Branch Strategy
- Pull Request Workflow
- Code Review Expectations
- Development Setup
- Testing Requirements
- Security-Sensitive Changes
All contributors must adhere to the Contributor Covenant. Violations result in immediate removal.
All commit messages must conform to Conventional Commits v1.0.
<type>(<scope>): <short summary>
[optional body — wrap at 72 chars]
[optional footer: BREAKING CHANGE, Closes #N, Refs #N]
| Type | When to use |
|---|---|
feat |
New feature or capability |
fix |
Bug fix |
refactor |
Code restructuring without behavior change |
perf |
Performance improvement |
test |
Adding or correcting tests |
docs |
Documentation only |
chore |
Tooling, deps, CI changes |
security |
Security hardening (non-breaking) |
audit |
Audit trail or ZK-proof updates |
revert |
Reverts a previous commit |
contracts · relayer · dashboard · governance · zk · ci · deps · docs
feat(contracts): add ZK-audit hook interface to core state machine
Implements the hook interface defined in #3. All state transitions
now emit a structured audit event consumable by the ZK proof layer.
Closes #3
security(relayer): enforce Ed25519 signature verification on all receipts
BREAKING CHANGE: receipt schema v1 is no longer accepted; callers
must upgrade to schema v2 before this release.
A commitlint hook runs on every commit. Violations block the push. Configure locally:
npm run prepare # installs husky hooksmain ← protected; requires 2 approvals + passing CI
└─ milestone/M1-core-contracts
└─ feat/contracts-zk-audit-hook ← your branch
└─ milestone/M2-relayer
└─ hotfix/critical-patch-description ← hotfixes only
- Branch from the relevant
milestone/*branch, never directly frommain. - Name branches:
<type>/<short-slug>(e.g.,feat/zk-audit-hook,fix/receipt-nonce-collision). - Delete branches after merge.
- All tests pass locally:
npm test - Linter passes:
npm run lint - New code has tests (unit + integration where applicable)
- Commit history is clean — squash WIP commits
- PR references the issue it closes:
Closes #N
Follow the same Conventional Commits format:
feat(contracts): implement ZK-audit hook interface
## Summary
<!-- One paragraph: what does this PR do and why? -->
## Changes
<!-- Bullet list of significant changes -->
## Testing
<!-- How was this tested? Include commands. -->
## Security Considerations
<!-- Any auth, crypto, or data-handling implications? -->
## Checklist
- [ ] Tests added / updated
- [ ] Docs updated if behavior changed
- [ ] No secrets committed
- [ ] Breaking changes noted in footer| Size | Lines Changed | Policy |
|---|---|---|
| XS | < 50 | Merge same day |
| S | 50–200 | 1 reviewer |
| M | 200–500 | 2 reviewers |
| L | 500–1000 | 2 reviewers + architecture review |
| XL | > 1000 | Must be pre-approved; break it up |
- Respond to review comments within 48 hours.
- Don't resolve threads you didn't open.
- Mark the PR
Draftif it's not ready; don't open for review prematurely.
Review within 72 hours of assignment. Check:
- Correctness — Does it do what the issue requires?
- Security — New attack surface? Input validation? Auth bypass?
- Protocol integrity — Does this maintain auditability and ZK-readiness?
- Test quality — Are tests asserting behavior or just achieving coverage?
- Commit hygiene — Are commits atomic and correctly scoped?
| Verdict | Meaning |
|---|---|
| ✅ Approve | Ready to merge as-is |
| 💬 Comment | Non-blocking feedback |
| 🔄 Request Changes | Must be addressed before merge |
| 🚫 NACK | Architectural objection — escalate to maintainers |
- Squash merge for feature branches (single clean commit on
main). - Merge commit for
milestone/*intomain(preserves history). - Only maintainers with write access may merge into
main.
# Install all deps
npm ci
# Install Rust toolchain (for contracts)
rustup target add wasm32-unknown-unknown
cargo install stellar-cli --locked
# Install hooks
npm run prepare
# Run full test suite
npm test
# Run contract tests only
cd contracts && cargo test
# Run relayer tests only
cd relayer && npm test| Layer | Minimum Requirement |
|---|---|
| Smart contracts | Unit tests for every public function; fuzz tests for state transitions |
| Relayer | Unit + integration tests; mock Horizon responses |
| Dashboard API | Unit tests + OpenAPI contract tests |
| E2E | Smoke test must pass on testnet before PR merge |
Coverage threshold: 80% line coverage enforced in CI. Security-critical paths require 100%.
Any change touching:
- Cryptographic key handling
- Signature verification
- Access control / authorization
- ZK proof generation or verification
- Treasury or governance logic
Must include:
- A threat model section in the PR description.
- A second reviewer with security background.
- Reference to the relevant SECURITY.md disclosure policy.
For vulnerabilities discovered during development, follow SECURITY.md — do not open a public issue.