Thank you for your interest in contributing to PRSpec! This project aims to improve Ethereum protocol security by automating specification compliance checking.
- Fork the repository and clone your fork.
- Create a virtual environment and install dependencies:
python -m venv venv && source venv/bin/activate pip install -r requirements.txt
- Copy
.env.exampleto.envand add your API key. - Run the test suite to make sure everything works:
python -m pytest tests/ -v
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes. Follow the existing code style.
- Add or update tests for any new functionality.
- Run the full test suite:
python -m pytest tests/ -v
- Submit a pull request against
main.
- New EIP file mappings: Add implementation file paths for EIPs we track (see
src/code_fetcher.py). - New client support: Add file registries for Prysm, Lighthouse, or other Ethereum clients.
- Parser improvements: Better regex or tree-sitter patterns for Go, C#, Java, Rust, Python.
- Report enhancements: Improved HTML/Markdown output, new visualizations.
- Add the client entry in
CodeFetcher.CLIENTSinsrc/code_fetcher.py. - Add a language parser in
src/parser.pyif the language isn't supported yet. - Verify file paths exist via the GitHub API.
- Add tests in
tests/test_multi_client.py.
- Add the EIP entry in
SpecFetcher.EIP_REGISTRYinsrc/spec_fetcher.py. - Add file mappings per client in
CodeFetcher.CLIENTSinsrc/code_fetcher.py. - Add EIP keywords in
CodeParser.EIP_KEYWORDSinsrc/parser.py. - Add tests.
- Python 3.9+ compatible.
- Type hints on all public methods.
- Docstrings on all classes and public methods.
- No unnecessary dependencies.
- All new code must have tests.
- Tests should not require an API key (use mocks for LLM calls).
- Run with:
python -m pytest tests/ -v
- Use GitHub Issues for bug reports and feature requests.
- For security vulnerabilities, see SECURITY.md.
By contributing, you agree that your contributions will be licensed under the MIT License.