zeus

A mobile Bitcoin wallet fit for the gods. ⚡️ Est. 563345

View the Project on GitHub ZeusLN/zeus

ZEUS Code Review Guidelines

Why Code Review Matters

Code review is essential for maintaining the quality and security of ZEUS. Since ZEUS handles users’ Bitcoin and Lightning funds, thorough review helps prevent bugs that could result in financial loss.

Review is also a bottleneck in open source development. By contributing quality reviews, you provide immediate value to the project while learning the codebase.

For New Contributors: Review First

If you’re new to ZEUS, consider starting with code review before writing code:

Benefits of Reviewing First

How to Review a Pull Request

1. Understand the Context

Before diving into code:

2. Check Out and Build

# Fetch the PR locally
git fetch origin pull/PR_NUMBER/head:pr-PR_NUMBER
git checkout pr-PR_NUMBER

# Install dependencies and build
yarn install

# Run tests
yarn verify

3. Test the Changes

4. Review the Code

Correctness

Security

ZEUS handles Bitcoin funds. Be vigilant about:

Code Quality

Architecture

Performance

User Experience

5. Review Commits Individually

6. Check CI Status

Providing Feedback

Be Constructive

Be Specific

Bad: “This needs improvement”

Good: “This function handles both parsing and validation. Consider splitting it into two functions for better testability.”

Use Appropriate Terminology

Example Comments

**Nitpick**: Consider renaming `data` to `channelDetails` for clarity.

**Suggestion**: This could be extracted into a custom hook to make it
reusable in other components.

**Security concern**: This logs the invoice which may contain sensitive
payment details. Consider removing or redacting the log.

**Question**: Is there a reason we're not using the existing `formatSats`
utility here?

Review Approval Terminology

Use these terms to communicate your review status:

ACK (Acknowledged)

Full approval. You have:

Example: ACK 3a4b5c6 - Tested on iOS and Android, works as expected.

tACK (Tested ACK)

You have tested the changes but haven’t done a full code review.

Example: tACK - Tested the new channel open flow on Android, works correctly.

cACK (Concept ACK)

You agree with the concept/approach but haven’t reviewed the implementation in detail.

Example: cACK - I agree we need better error handling for failed payments.

NACK (Negative ACK)

You recommend against merging. Should include a detailed explanation.

Example: NACK - This approach could lead to stuck payments in edge cases. See my detailed comment above.

Needs Changes

Specific changes are required before you can approve.

Review Checklist

Use this checklist when reviewing PRs:

Code Quality

Security

Testing

User Experience

Git

Documentation

Responding to Reviews

As a PR author, when receiving review feedback:

  1. Thank the reviewer for their time
  2. Address all comments - respond or make changes
  3. Use fixup commits during review for easy re-review
  4. Don’t take it personally - feedback is about the code
  5. Ask for clarification if feedback is unclear
  6. Squash fixups before final merge

Review Etiquette

For Reviewers

For Contributors

Time Expectations

Complex changes may require multiple review rounds. This is normal and helps ensure quality.

Getting Your PRs Reviewed

To help get faster reviews:

  1. Keep PRs small and focused - easier to review
  2. Write a clear description - help reviewers understand context
  3. Include screenshots/videos for UI changes
  4. Ensure CI passes before requesting review
  5. Respond promptly to feedback
  6. Be active in the community - review others’ PRs too

Questions?

If you have questions about the review process: