Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 1.83 KB

DEVELOPMENT.md

File metadata and controls

83 lines (59 loc) · 1.83 KB

Development Guide

Overview

This guide provides comprehensive information for developers who want to contribute to or build with SVMKit. Whether you're looking to submit a PR, build your own fork, or integrate SVMKit into your project, you'll find everything you need here.

Requirements

Core Tools

Installation

# macOS (using Homebrew)
brew install go golangci-lint make

# Ubuntu/Debian
sudo apt-get update
sudo apt-get install golang-1.22 make
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin

# Verify installations
go version
~/go/bin/golangci-lint --version
make --version

Project Structure

svmkit/
├── agave/       # Agave validator implementation
│   ├── assets/  # Validator deployment assets
│
├── runner/      # Deployment and execution system
│   ├── assets/  # Runner deployment assets
│
└── solana/      # Core Solana functionality
    └── assets/  # Solana-specific scripts

Development Workflow

1. Setting Up Development Environment

Clone repository

git clone https://github.com/abklabs/svmkit.git
cd svmkit

2. Testing

# Run all tests
make test

# Run specific test
go test ./pkg/agave -run TestValidatorEnv

Common Development Tasks

Adding a New Validator Fork

  1. Add fork configuration in pkg/agave/validator.go:

    Copyconst (
        VariantNewFork Variant = "newfork"
    )
  2. Implement fork-specific logic in pkg/agave/assets/

  3. Update build scripts in build/

  4. Add tests

  5. Update documentation