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

  1. Write your code - Implement your feature or fix
  2. Follow Go conventions - Use gofmt and follow Go best practices
  3. Add tests - Write tests for your changes when applicable
  4. 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

  1. Go to the original repository on GitHub
  2. Click "New Pull Request"
  3. Select your fork and branch
  4. Fill out the PR template with:
    • Description of changes
    • Related issues
    • Testing performed
    • Screenshots (if UI changes)
  5. 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:

  1. Description - Clear description of the bug
  2. Steps to reproduce - How to trigger the bug
  3. Expected behavior - What should happen
  4. Actual behavior - What actually happens
  5. Environment - OS, Go version, starknode-kit version
  6. 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:

Resources

๐ŸŽ‰ Thank You!

Thank you for considering contributing to starknode-kit! Your contributions help make this tool better for everyone.