Contributing
We welcome contributions to starknode-kit! This guide will help you get started with contributing to the project.
Ways to Contribute
There are many ways to contribute to starknode-kit:
- ๐ Report bugs - Help us identify and fix issues
- ๐ก Suggest features - Share your ideas for improvements
- ๐ Improve documentation - Help others understand and use the tool
- ๐ป Write code - Implement new features or fix bugs
- ๐งช Test - Test new releases and provide feedback
- ๐ Community support - Help other users in issues and discussions
Getting Started
1. Fork the Repository
Start by forking the repository on GitHub:
# Visit https://github.com/thebuidl-grid/starknode-kit and click 'Fork'
2. Clone Your Fork
git clone https://github.com/YOUR_USERNAME/starknode-kit.git cd starknode-kit
3. Set Up Development Environment
Make sure you have the required tools:
- Go 1.24 or later
- Make
- Git
# Check Go version go version # Install dependencies go mod download # Build the project make build
4. Create a Branch
Create a branch for your changes:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix
Development Workflow
Project Structure
starknode-kit/ โโโ cli/ # CLI commands and root setup โ โโโ commands/ # Individual command implementations โ โโโ options/ # Global options and config โโโ pkg/ # Main package code โ โโโ clients/ # Client implementations (Geth, Reth, etc.) โ โโโ monitoring/ # Monitoring dashboard โ โโโ types/ # Type definitions โ โโโ utils/ # Utility functions โ โโโ validator/ # Validator management โโโ main.go # Entry point โโโ Makefile # Build commands โโโ README.md # Project documentation
Making Changes
- Write your code - Implement your feature or fix
- Follow Go conventions - Use
gofmt
and follow Go best practices - Add tests - Write tests for your changes when applicable
- Update documentation - Update README or add docs as needed
Testing
Run tests before submitting:
# Run all tests go test ./... # Run tests with coverage go test -cover ./... # Run tests for specific package go test ./pkg/clients/
Code Style
Format your code with gofmt
:
# Format all Go files gofmt -w . # Check formatting gofmt -l .
Submitting Changes
1. Commit Your Changes
Write clear, descriptive commit messages:
git add . git commit -m "feat: add support for new client" # Follow conventional commits format: # feat: new feature # fix: bug fix # docs: documentation changes # refactor: code refactoring # test: adding or updating tests # chore: maintenance tasks
2. Push to Your Fork
git push origin feature/your-feature-name
3. Create a Pull Request
- Go to the original repository on GitHub
- Click "New Pull Request"
- Select your fork and branch
- Fill out the PR template with:
- Description of changes
- Related issues
- Testing performed
- Screenshots (if UI changes)
- Submit the pull request
Pull Request Guidelines
To increase the chances of your PR being accepted:
- โ Make focused, single-purpose changes
- โ Write clear commit messages
- โ Include tests for new features
- โ Update documentation as needed
- โ Follow existing code style
- โ Respond to review feedback promptly
- โ Don't include unrelated changes
- โ Don't submit untested code
- โ Don't break existing functionality
Reporting Bugs
When reporting bugs, include:
- Description - Clear description of the bug
- Steps to reproduce - How to trigger the bug
- Expected behavior - What should happen
- Actual behavior - What actually happens
- Environment - OS, Go version, starknode-kit version
- Logs - Relevant log output or error messages
# Example bug report template **Description** Brief description of the issue **Steps to Reproduce** 1. Run `starknode-kit start` 2. ... 3. Error occurs **Expected Behavior** What should happen **Actual Behavior** What actually happens **Environment** - OS: Ubuntu 22.04 - Go: 1.24 - starknode-kit: v1.0.0 **Logs** ``` Error log output here ```
Suggesting Features
When suggesting features, include:
- Clear description of the feature
- Use case and motivation
- Proposed implementation (if applicable)
- Potential impact on existing functionality
Code of Conduct
We are committed to providing a welcoming and inclusive environment. Please:
- โ Be respectful and considerate
- โ Welcome newcomers and help them learn
- โ Accept constructive criticism gracefully
- โ Focus on what's best for the community
- โ Don't harass or discriminate
- โ Don't be disruptive or disrespectful
Getting Help
If you need help with contributing:
- ๐ฌ Join our Telegram
- ๐ Open an issue
- ๐ก Start a discussion
Resources
๐ Thank You!
Thank you for considering contributing to starknode-kit! Your contributions help make this tool better for everyone.