Skip to main content

Purpose and Scope

This document provides an overview of all development tools available in the go-stablenet codebase.
The tools covered here support the entire lifecycle of building, testing, debugging, operating, and maintaining StableNet nodes and networks.
The development tools are organized into four major categories, each of which is described in detail in its own subdocument.
  • Building and CI/CD
    Build system, cross-compilation, and CI/CD pipeline
  • devp2p CLI Tools
    DNS-based discovery, P2P network diagnostics, and testing tools
  • Data Import and Export Utilities
    Blockchain data management tools (chain, history, snapshots)
  • Testing and Debugging
    Test frameworks, protocol validation, and static analysis tools
Rather than describing individual commands in detail, this document serves as a high-level guide to understanding the overall tool ecosystem and how the tools relate to each other.

Tool Categories

Development tools are distributed across the codebase, with the following primary entry points.

Build System Architecture

The core of the build system is build/ci.go, which acts as the single control point for all build, test, and release tasks.

Key Components

  • build/ci.go
    Main orchestrator for building, testing, archiving, and uploading
  • build.GoToolchain
    Manages Go compiler configuration, including cross-compilation
  • build.Environment
    Collects commit, date, branch, and tag metadata from CI or local Git environments
  • build.ChecksumDB
    Verifies external dependency integrity using build/checksums.txt
This build system supports the following via -arch and -cc flags:
  • Architectures: amd64, 386, arm, arm64
  • Platforms: linux, darwin, windows, freebsd

CI/CD Pipeline Architecture

Continuous Integration (CI) is split by platform characteristics.
  • Travis CI: Linux / macOS
  • AppVeyor: Windows
This separation ensures consistent multi-platform release quality from a single codebase.

Pipeline Stages

  1. Code Push Trigger
    Triggered on pushes to the master branch or version tags
  2. Parallel Builds
    Parallel jobs per platform and architecture
  3. Test Execution
    Basic tests on all builds, race detection in scheduled jobs
  4. Artifact Generation
    Creation of signed binary archives in zip / tar.gz formats

Development Tool Invocation Flow

The following shows how developers typically interact with tools locally and in CI environments.

Quick Reference: Available Tools

Build and Release Tools

Network and Discovery Tools

Chain Management Tools

Testing and Verification Tools

Build Flags and Configuration

Cross-Compilation Flags

CI Environment Variables

In CI environments, commit metadata, signing keys, and upload tokens are injected via environment variables.
  • TRAVIS_COMMIT, APPVEYOR_REPO_COMMIT
  • AZURE_BLOBSTORE_TOKEN
  • LINUX_SIGNING_KEY, OSX_SIGNING_KEY
  • AWS_ACCESS_KEY_ID (for DNS management)

Tool Dependencies and Versions

All external tool dependencies have pinned versions and SHA256 checksums in build/checksums.txt. When required, tools are automatically downloaded and verified via build.ChecksumDB.
For practical usage examples and detailed instructions, refer to the following subdocuments:
  • Building and CI/CD
  • devp2p CLI Tools
  • Data Import and Export Utilities
  • Testing and Debugging