Thank you for considering contributing to Simplicity Blockchain. This document outlines the process for contributing to the project and helps to make the contribution process straightforward and effective for everyone involved.
By participating in this project, you agree to abide by our Code of Conduct. Please report unacceptable behavior to the project maintainers.
- Be respectful and inclusive
- Be collaborative
- Focus on the best possible outcomes for the community
- Give and gracefully accept constructive feedback
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/simplicity-blockchain.git cd simplicity-blockchain
- Set up a remote upstream:
git remote add upstream https://github.com/original-owner/simplicity-blockchain.git
- Install dependencies:
pip install -r requirements.txt pip install -r dev-requirements.txt # Development dependencies
- Create a new branch for your feature or bugfix:
git checkout -b feature/descriptive-branch-name
To test with data persistence:
- Create a Firebase project at firebase.google.com
- Generate and download a service account key (JSON)
- Place the JSON file in the project root directory
- Set the environment variable for the credential file:
# Linux/macOS export GOOGLE_APPLICATION_CREDENTIALS="path/to/your-firebase-credentials.json" # Windows (Command Prompt) set GOOGLE_APPLICATION_CREDENTIALS=path\to\your-firebase-credentials.json # Windows (PowerShell) $env:GOOGLE_APPLICATION_CREDENTIALS="path\to\your-firebase-credentials.json"
main
- Main branch containing stable codedevelop
- Development branch for ongoing workfeature/*
- Feature branchesbugfix/*
- Bug fix branchesdocs/*
- Documentation updates
- Ensure your branch is up to date with the upstream:
git fetch upstream git rebase upstream/develop
- Make your changes
- Write or update tests as necessary
- Run the test suite:
pytest
- Follow the code style guidelines
- Commit your changes with clear, descriptive commit messages:
git commit -m "feat: add support for transaction batching"
We follow the Conventional Commits specification:
feat
: A new featurefix
: A bug fixdocs
: Documentation changesstyle
: Code style changes (formatting, indentation)refactor
: Code refactoringtest
: Adding or updating testschore
: Maintenance tasks
- Push your branch to your fork:
git push origin feature/your-feature
- Submit a pull request to the
develop
branch of the original repository - Fill in the PR template with all relevant information
- Request a review from one of the maintainers
- Update your PR as needed based on feedback
- Follow PEP 8 conventions
- Maximum line length of 88 characters (compatible with Black formatter)
- Use type hints where appropriate
- Use docstrings (Google style) for functions, classes, and modules
Before submitting changes, run:
# Format code
black .
# Check style
flake8 .
# Sort imports
isort .
# Type checking
mypy .
- Update documentation for any new or modified functionality
- Include docstrings for all public classes and functions
- Follow the Google docstring format:
def function_with_types_in_docstring(param1, param2): """Example function with types documented in the docstring. Args: param1 (int): The first parameter. param2 (str): The second parameter. Returns: bool: The return value. True for success, False otherwise. """ return True
- Write unit tests for all new functionality
- Ensure all tests pass before submitting a pull request
- Maintain or improve code coverage
- Test edge cases and error conditions
When filing a bug report, include:
- A clear title and description
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment details (OS, Python version, etc.)
- Logs or error messages
When submitting a feature request:
- Describe the feature in detail
- Explain why it would be valuable
- Provide examples of how it would be used
- Indicate if you're willing to work on implementing it
- Maintainers will review your PR for:
- Correctness
- Test coverage
- Code quality
- Documentation
- Adherence to project standards
- Address feedback through additional commits
- Once approved, a maintainer will merge your PR
We welcome contributions in several areas:
- Consensus algorithm improvements
- Block validation enhancements
- Transaction processing optimizations
- Cryptographic implementation security
- Node discovery mechanisms
- P2P communication protocols
- Network resilience and fault tolerance
- TTL and node health monitoring
- API improvements
- CLI tools
- Transaction verification UX
- Wallet functionality
- Code comments
- Examples and tutorials
- Diagrams and visualizations
- Interactive demos
- Transaction throughput
- Database optimizations
- Memory usage improvements
- Caching strategies
- GitHub Issues: For bug reports, feature requests, and discussions
- Pull Requests: For code contributions
- Discussions: For general questions and community interaction
- Email: For security concerns or private communications
By contributing, you agree that your contributions will be licensed under the project's license.
Thank you for contributing to Simplicity Blockchain!