Remove redundant documentation files

Clean up AI-generated markdown files that duplicated information
already covered in README.md
This commit is contained in:
Zach Kelling
2025-12-10 01:58:48 +00:00
parent afefff5fcc
commit 4ee9566f35
10 changed files with 0 additions and 2527 deletions
-236
View File
@@ -1,236 +0,0 @@
# Multi-Network Integration for Netrunner
## Overview
This integration enables the Lux Netrunner to orchestrate multiple heterogeneous networks running in parallel with shared BadgerDB for fully ACID cross-chain transactions with low latency.
## Architecture
### Core Components
1. **MultiNetworkManager** (`multinetwork/manager.go`)
- Manages multiple network instances
- Coordinates parallel consensus validation
- Handles cross-chain transaction orchestration
- Provides shared BadgerDB for ACID guarantees
2. **Network Types**
- **Primary Networks**: Mainnet (96369), Testnet (96368)
- **Subnets (L1s/L2s)**: Zoo, Hanzo, SPC running on primary networks
3. **Shared Database**
- Single BadgerDB instance shared across all networks
- ACID transactions for cross-chain operations
- Low-latency atomic operations
4. **Parallel Consensus**
- Each network runs its own consensus engine
- Snowman consensus for linear chains
- Avalanche consensus for DAG chains
- Configurable parameters per network
## Features
### 1. Multi-Network Orchestration
```bash
# Start all networks in parallel
netrunner multinet start
# Configure networks
netrunner multinet configure
# Check status
netrunner multinet status
```
### 2. Cross-Chain ACID Transactions
```go
// Atomic cross-chain transfer
tx := &CrossChainTx{
SourceNet: 96369, // Mainnet
SourceChain: "C", // C-Chain
DestNet: 96368, // Testnet
DestChain: "C", // C-Chain
Amount: 1000,
Asset: "LUX",
}
manager.SubmitCrossChainTx(tx)
```
### 3. Shared Database Access
All networks share a single BadgerDB instance, enabling:
- Atomic multi-network operations
- Cross-chain state consistency
- Low-latency inter-network communication
- ACID guarantees for complex transactions
### 4. Subnet Management
Subnets are managed as children of primary networks:
```go
zooConfig := NetworkConfig{
NetworkID: 200200,
Name: "Zoo Network",
Type: NetworkTypeSubnet,
ParentID: 96369, // Runs on Mainnet
Validators: 5,
}
```
## Implementation Details
### Database Structure
```
/shared-db/
├── balances/
│ ├── 96369/C/LUX # Mainnet C-Chain LUX balances
│ ├── 96368/C/LUX # Testnet C-Chain LUX balances
│ ├── 200200/C/ZOO # Zoo subnet balances
│ └── 36963/C/AI # Hanzo subnet balances
├── transactions/
│ ├── cross-chain/ # Cross-chain transaction records
│ └── pending/ # Pending transactions
└── consensus/
├── 96369/ # Mainnet consensus state
└── 96368/ # Testnet consensus state
```
### Consensus Configuration
```go
type ConsensusParams struct {
K: 1, // For single validator testing
Alpha: 1,
BetaVirtuous: 1,
BetaRogue: 2,
ConcurrentPolls: 4,
OptimalProcessing: 10,
MaxProcessing: 1000,
MaxTimeProcessing: 120s,
}
```
### Network Endpoints
- **Mainnet**: `http://localhost:9630`
- P-Chain: `/ext/P`
- X-Chain: `/ext/X`
- C-Chain: `/ext/bc/C/rpc`
- Zoo Subnet: `/ext/bc/[zoo-chain-id]/rpc`
- Hanzo Subnet: `/ext/bc/[hanzo-chain-id]/rpc`
- **Testnet**: `http://localhost:9620`
- P-Chain: `/ext/P`
- X-Chain: `/ext/X`
- C-Chain: `/ext/bc/C/rpc`
- Test Subnets: `/ext/bc/[subnet-chain-id]/rpc`
## Usage Examples
### 1. Start Multiple Networks
```bash
# Using default configuration
netrunner multinetwork start
# Using custom configuration
netrunner multinetwork start --configs networks.json --shared-db /path/to/db
```
### 2. Submit Cross-Chain Transaction
```bash
# Transfer from Mainnet C-Chain to Testnet C-Chain
netrunner multinetwork crosschain 96369 C 96368 C 1000
# Transfer from Zoo subnet to Hanzo subnet
netrunner multinetwork crosschain 200200 C 36963 C 500
```
### 3. Monitor Status
```bash
# Check all networks
netrunner multinetwork status
# Watch logs
tail -f /tmp/multinetwork/*/logs/*.log
```
## Benefits
1. **Unified Management**: Single process manages all networks
2. **Resource Efficiency**: Shared database reduces storage overhead
3. **Low Latency**: Direct memory access for cross-chain operations
4. **ACID Guarantees**: Atomic cross-chain transactions
5. **Parallel Validation**: All networks validate simultaneously
6. **Simplified Testing**: Easy multi-network test environments
## Testing
### Unit Tests
```bash
cd netrunner/multinetwork
go test -v ./...
```
### Integration Tests
```bash
# Start test networks
netrunner multinetwork start --test-mode
# Run cross-chain tests
go test -v ./integration/...
```
### Performance Benchmarks
```bash
# Benchmark cross-chain transaction throughput
go test -bench=BenchmarkCrossChainTx ./multinetwork/...
# Benchmark parallel consensus
go test -bench=BenchmarkParallelConsensus ./multinetwork/...
```
## Configuration File Format
```json
[
{
"networkID": 96369,
"name": "Lux Mainnet",
"type": "primary",
"httpPort": 9630,
"stakingPort": 9631,
"dataDir": "/data/mainnet",
"validators": 5,
"chains": [
{
"chainID": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"vmID": "rWhpuQPF1kb72esV2momhMuTYGkEb1oL29pt2EBXWmSy4kxnT",
"isEVM": false
}
]
},
{
"networkID": 200200,
"name": "Zoo Network",
"type": "subnet",
"parentID": 96369,
"validators": 5
}
]
```
## Future Enhancements
1. **Dynamic Network Addition**: Add/remove networks at runtime
2. **Cross-Subnet Bridges**: Direct subnet-to-subnet transfers
3. **State Channels**: Off-chain scaling for high-frequency transactions
4. **Zero-Knowledge Proofs**: Privacy-preserving cross-chain transfers
5. **Rollup Integration**: L2 rollups for scalability
6. **MEV Protection**: Flashbots-style private mempools
## Conclusion
This integration transforms the Lux Netrunner into a powerful multi-network orchestrator capable of:
- Running multiple consensus algorithms in parallel
- Providing ACID guarantees for cross-chain operations
- Managing complex network topologies with subnets
- Enabling low-latency inter-network communication
The shared BadgerDB approach ensures data consistency while parallel consensus validation maintains network independence and security.
-1
View File
@@ -1 +0,0 @@
LLM.md
-176
View File
@@ -1,176 +0,0 @@
# Multinet Support in Netrunner
## Quick Start
The netrunner now supports running multiple networks in parallel with a shared BadgerDB for ACID cross-chain transactions.
## Building
```bash
cd /home/z/work/lux/netrunner
go build -o netrunner .
```
## Usage
### Start Multiple Networks
```bash
# Start both Lux mainnet and testnet with all subnets
netrunner multinet start
# With custom configuration
netrunner multinet start --configs networks.json
# With custom shared database path
netrunner multinet start --shared-db /path/to/shared/db
```
### Configure Networks
```bash
# Generate default configuration file
netrunner multinet configure
# This creates multinetwork-config.json with:
# - Lux Mainnet (96369)
# - Lux Testnet (96368)
# - Zoo Network (subnet on mainnet)
# - Hanzo Network (subnet on mainnet)
```
### Check Status
```bash
# Show status of all networks
netrunner multinet status
```
### Cross-Chain Transactions
```bash
# Transfer 1000 LUX from mainnet to testnet
netrunner multinet crosschain 96369 C 96368 C 1000
# Transfer between subnets (through parent network)
netrunner multinet crosschain 200200 C 36963 C 500
```
## Network Architecture
```
┌─────────────────────────────────────────┐
│ NETRUNNER MULTINET │
│ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ MAINNET │ │ TESTNET │ │
│ │ (96369) │ │ (96368) │ │
│ │ │ │ │ │
│ │ P/X/C │ │ P/X/C │ │
│ │ Chains │ │ Chains │ │
│ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │
│ ┌─────▼─────┐ ┌────▼────┐ │
│ │ SUBNETS │ │ SUBNETS │ │
│ │ │ │ │ │
│ │ • Zoo │ │ • Zoo-T │ │
│ │ • Hanzo │ │ • Hanzo-T│ │
│ │ • SPC │ │ • SPC-T │ │
│ └───────────┘ └─────────┘ │
│ │
│ ┌─────────────────────────────────┐ │
│ │ SHARED BADGERDB (ACID) │ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────────┘
```
## Key Features
1. **Parallel Validation**: Both mainnet and testnet validate simultaneously
2. **Shared Database**: Single BadgerDB for all networks enables ACID transactions
3. **Low Latency**: Direct memory access for cross-chain operations
4. **Subnet Support**: L1s/L2s run as subnets on their parent networks
5. **Unified CLI**: Single `netrunner` command manages everything
## API Endpoints
When running multinet, access networks at their configured ports:
- **Mainnet** (port 9630):
- P-Chain: `http://localhost:9630/ext/P`
- X-Chain: `http://localhost:9630/ext/X`
- C-Chain: `http://localhost:9630/ext/bc/C/rpc`
- Subnets: `http://localhost:9630/ext/bc/{subnet-chain-id}/rpc`
- **Testnet** (port 9620):
- P-Chain: `http://localhost:9620/ext/P`
- X-Chain: `http://localhost:9620/ext/X`
- C-Chain: `http://localhost:9620/ext/bc/C/rpc`
- Subnets: `http://localhost:9620/ext/bc/{subnet-chain-id}/rpc`
## Configuration File
Create `multinetwork-config.json`:
```json
[
{
"networkID": 96369,
"name": "Lux Mainnet",
"type": "primary",
"httpPort": 9630,
"stakingPort": 9631,
"dataDir": "/tmp/multinet/mainnet",
"validators": 5
},
{
"networkID": 96368,
"name": "Lux Testnet",
"type": "primary",
"httpPort": 9620,
"stakingPort": 9621,
"dataDir": "/tmp/multinet/testnet",
"validators": 3
},
{
"networkID": 200200,
"name": "Zoo Network",
"type": "subnet",
"parentID": 96369,
"validators": 5
}
]
```
## Development
### Build the netrunner
```bash
cd /home/z/work/lux/netrunner
go build -o netrunner .
```
### Run tests
```bash
go test ./multinet/...
```
### Clean up
```bash
# Stop all networks
pkill -f netrunner
# Remove data
rm -rf /tmp/multinet*
```
## Architecture Benefits
1. **Single Process**: One netrunner manages both networks
2. **Shared State**: Cross-chain transactions are atomic
3. **Resource Efficient**: Shared database reduces overhead
4. **Easy Testing**: Quickly spin up multi-network environments
5. **Production Ready**: Same code runs local and production
## Notes
- Subnets (Zoo, Hanzo, SPC) are L1s/L2s that run ON the primary networks
- They are NOT separate primary networks themselves
- Access subnets through their parent network's RPC endpoint
- The shared BadgerDB enables truly atomic cross-chain operations
-138
View File
@@ -1,138 +0,0 @@
# Netrunner - Refactored Design
## Core Philosophy
Multi-network support is now a **built-in feature**, not a separate subcommand.
## Command Structure
```bash
# BEFORE (subcommand approach):
netrunner multinet start
netrunner multinet configure
netrunner multinet status
netrunner multinet crosschain
# AFTER (integrated approach):
netrunner start --networks all
netrunner config init
netrunner status
netrunner tx --from mainnet:C --to testnet:C --amount 1000
```
## Usage Examples
### 1. Starting Networks
```bash
# Single network (default behavior)
netrunner start # Starts mainnet by default
# Multiple networks (built-in feature)
netrunner start --networks all # Start all networks
netrunner start --networks mainnet,testnet # Start specific networks
# With advanced features
netrunner start --networks all --parallel --shared-db
```
### 2. Configuration
```bash
# No need for separate multinet configure
netrunner config init # Generate config for all networks
netrunner config show # Show current configuration
netrunner config set mainnet.port 9630 # Modify specific settings
```
### 3. Status Checking
```bash
# Works for single or multiple networks automatically
netrunner status # Shows status of all running networks
netrunner status mainnet # Status of specific network
netrunner status --json # JSON output for scripts
```
### 4. Cross-Chain Transactions
```bash
# Simplified syntax
netrunner tx --from mainnet:C --to testnet:C --amount 1000 --asset LUX
# Short form
netrunner tx mainnet:C testnet:C 1000
```
## Implementation
The key changes:
1. **Remove multinet subcommand** - Features integrated into main commands
2. **Smart detection** - Commands automatically detect if multiple networks are running
3. **Progressive disclosure** - Simple by default, powerful when needed
4. **Unified state** - Shared DB is automatic when multiple networks are running
## Benefits
### User Experience
-**Simpler** - No need to learn separate multinet commands
-**Intuitive** - Flags like `--networks all` are self-explanatory
-**Discoverable** - All features visible in main help
-**Consistent** - Same patterns for single or multiple networks
### Technical
-**Cleaner codebase** - Less command duplication
-**Better defaults** - Smart behavior based on context
-**Easier testing** - Unified command structure
-**Future-proof** - Easy to add more networks
## Migration Guide
For users familiar with the subcommand approach:
| Old Command | New Command |
|------------|-------------|
| `netrunner multinet start` | `netrunner start --networks all` |
| `netrunner multinet configure` | `netrunner config init` |
| `netrunner multinet status` | `netrunner status` |
| `netrunner multinet crosschain 96369 C 96368 C 1000` | `netrunner tx mainnet:C testnet:C 1000` |
## Configuration File
The configuration remains the same but is now in `netrunner.yaml`:
```yaml
networks:
mainnet:
id: 96369
http_port: 9630
staking_port: 9631
validators: 5
testnet:
id: 96368
http_port: 9620
staking_port: 9621
validators: 3
zoo:
id: 200200
type: subnet
parent: mainnet
validators: 5
features:
shared_db: true # Enable shared BadgerDB
parallel: true # Parallel validation
cross_chain_tx: true # Cross-chain transactions
```
## Summary
By making multi-network support a core feature rather than a subcommand:
- The CLI becomes more intuitive
- Commands are shorter and easier to remember
- The same commands work regardless of how many networks are running
- Advanced features are available through flags, not separate command trees
This follows the principle of **"Make simple things simple, and complex things possible"**.
-399
View File
@@ -1,399 +0,0 @@
# Lux Netrunner Release Workflow Analysis
**Date**: 2025-11-12
**Current Version**: v1.13.5-lux.3
**Repository**: luxfi/netrunner
## Current State Analysis
### Existing Workflow (`.github/workflows/release.yml`)
- ✅ Triggers on tag push (`tags: ["*"]`)
- ✅ Uses GoReleaser for builds
- ✅ Supports Linux amd64/arm64, Darwin amd64/arm64
-**Missing Windows support**
-**Old Go version** (1.19 vs project requires 1.25.4)
-**Complex osxcross setup** (may fail, outdated SDK)
-**No semantic version validation**
-**No changelog generation**
- ⚠️ **gh CLI error**: Tried to query ava-labs/netrunner instead of luxfi/netrunner
### Existing GoReleaser Config (`.goreleaser.yml`)
- ✅ Supports Linux/Darwin amd64/arm64
- ✅ CGO enabled with portable BLST
- ✅ Cross-compilation setup for ARM64
- ✅ Version injection via ldflags
-**No Windows in config**
-**No archive configuration** (defaults may not match requirements)
-**No checksum configuration**
-**osxcross clang references** (oa64-clang, o64-clang) may not work in GitHub Actions
### Issues Identified
1. **Go Version Mismatch**: Workflow uses Go 1.19, project requires 1.25.4
2. **Windows Not Supported**: goreleaser.yml doesn't include Windows targets
3. **osxcross Complexity**: Manual SDK download/build (30+ min), fragile
4. **No Version Validation**: Doesn't prevent v2.x.x tags (Go module breaking change)
5. **gh CLI Misconfiguration**: Queried wrong repo (ava-labs vs luxfi)
6. **No Releases Exist**: Despite having tags, no GitHub releases created
## Recommended Solution
### Option 1: Enhanced GoReleaser (RECOMMENDED)
**Pros**:
- Leverages existing `.goreleaser.yml`
- Automatic archive creation, checksums, changelog
- Built-in GitHub release creation
- Industry standard tool
- Minimal workflow maintenance
**Cons**:
- CGO cross-compilation for Darwin is complex
- May need goreleaser-cross Docker image for full cross-compilation
**Implementation**:
- Update `.goreleaser.yml` to include Windows
- Use `goreleaser/goreleaser-cross-action` for CGO cross-compilation
- Add semantic version validation step
- Configure proper archive formats and checksums
### Option 2: Manual Build Matrix
**Pros**:
- Full control over build process
- No external tool dependencies
- Easier debugging
**Cons**:
- More YAML to maintain
- Manual archive creation
- Manual checksum generation
- No automatic changelog
## Proposed Changes
### 1. Update `.goreleaser.yml`
```yaml
builds:
- id: netrunner
main: ./main.go
binary: netrunner
flags:
- -v
ldflags:
- -X 'github.com/luxfi/netrunner/cmd.Version={{.Version}}'
goos:
- linux
- darwin
- windows # ADD WINDOWS
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=1
- CGO_CFLAGS=-O -D__BLST_PORTABLE__
overrides:
- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-gnu-gcc
- goos: darwin
goarch: arm64
goarm: 8
- goos: darwin
goarch: amd64
goamd64: v1
- goos: windows # WINDOWS OVERRIDE
goarch: amd64
env:
- CC=x86_64-w64-mingw32-gcc
- goos: windows
goarch: arm64
env:
- CC=aarch64-w64-mingw32-gcc
ignore:
- goos: windows
goarch: arm64 # Skip Windows ARM64 if no cross-compiler
archives:
- id: netrunner
format: tar.gz
format_overrides:
- goos: windows
format: zip
name_template: "netrunner_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- README.md
checksum:
name_template: 'SHA256SUMS'
algorithm: sha256
release:
github:
owner: luxfi
name: netrunner
draft: false
prerelease: auto
mode: append
header: |
## Lux Netrunner {{ .Tag }}
Network orchestration and testing framework for Lux blockchain.
footer: |
**Full Changelog**: https://github.com/luxfi/netrunner/compare/{{ .PreviousTag }}...{{ .Tag }}
```
### 2. Update `.github/workflows/release.yml`
```yaml
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
validate-version:
runs-on: ubuntu-latest
steps:
- name: Validate Semantic Version
run: |
TAG="${GITHUB_REF#refs/tags/}"
echo "Validating tag: $TAG"
# Must start with v
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$ ]]; then
echo "Error: Tag must follow semantic versioning (v1.2.3 or v1.2.3-suffix)"
exit 1
fi
# Extract major version
MAJOR=$(echo "$TAG" | sed -E 's/^v([0-9]+)\..*/\1/')
# Prevent v2.x.x+ (Go module breaking change)
if [ "$MAJOR" -ge 2 ]; then
echo "Error: Major version must be < 2 (Go module constraint)"
echo "For v2+, update go.mod to github.com/luxfi/netrunner/v2"
exit 1
fi
echo "Version validation passed: $TAG"
release:
needs: validate-version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true
- name: Run Tests
run: go test -v ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-cross-action@v4
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
## Testing the Workflow
### Local Testing (requires goreleaser)
```bash
# Install goreleaser
brew install goreleaser/tap/goreleaser # macOS
# or
go install github.com/goreleaser/goreleaser@latest
# Test build without releasing
cd /Users/z/work/lux/netrunner
goreleaser build --snapshot --clean
# Test full release process (no push)
goreleaser release --snapshot --clean --skip-publish
```
### Dry Run on GitHub
```bash
# Create a test tag
git tag -a v1.14.0-rc.1 -m "Release candidate for testing"
git push origin v1.14.0-rc.1
# Monitor workflow at:
# https://github.com/luxfi/netrunner/actions
# Delete test release if successful
gh release delete v1.14.0-rc.1 --yes
git tag -d v1.14.0-rc.1
git push origin :refs/tags/v1.14.0-rc.1
```
## Recommended First Release
### Version: v1.14.0
**Rationale**:
- Current: v1.13.5-lux.3
- Next minor: v1.14.0
- Clean version (no suffix) for major release
- Includes all recent improvements and fixes
**Pre-Release Checklist**:
- [ ] Merge all pending changes
- [ ] Update CHANGELOG.md
- [ ] Run full test suite
- [ ] Test build locally with goreleaser
- [ ] Update documentation with new version
- [ ] Create tag: `git tag -a v1.14.0 -m "Release v1.14.0"`
- [ ] Push tag: `git push origin v1.14.0`
- [ ] Verify GitHub release created
- [ ] Test downloading and running binaries
## Migration Plan
### Phase 1: Update Configuration (This Session)
1. ✅ Analyze current workflow
2. ⏳ Update `.goreleaser.yml` with Windows support
3. ⏳ Update `.github/workflows/release.yml` with new workflow
4. ⏳ Test locally with goreleaser --snapshot
### Phase 2: Test Release (Next)
1. Create release candidate tag (v1.14.0-rc.1)
2. Verify all platforms build successfully
3. Download and test binaries on each platform
4. Fix any issues found
5. Delete RC release and tag
### Phase 3: Production Release
1. Create v1.14.0 tag
2. Monitor workflow execution
3. Verify release artifacts
4. Update documentation
5. Announce release
## Cross-Compilation Notes
### CGO Challenges
**Problem**: CGO requires platform-specific compilers
- Linux ARM64: `aarch64-linux-gnu-gcc`
- Darwin ARM64: Native on arm64 runner or osxcross
- Darwin AMD64: Native on amd64 runner or osxcross
- Windows AMD64: `x86_64-w64-mingw32-gcc`
**Solution**: Use `goreleaser/goreleaser-cross-action`
- Provides pre-configured cross-compilation environment
- Includes all necessary toolchains
- Handles osxcross complexity
- Supports CGO for all platforms
### Alternative: Native Runners
For maximum reliability, use platform-specific runners:
```yaml
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
- os: ubuntu-latest
goos: linux
goarch: arm64
- os: macos-latest
goos: darwin
goarch: amd64
- os: macos-14 # M1 runner
goos: darwin
goarch: arm64
- os: windows-latest
goos: windows
goarch: amd64
```
**Trade-offs**:
- More workflow complexity
- Longer total runtime (sequential builds)
- Higher GitHub Actions minutes usage
- But: No cross-compilation issues
## Platform-Specific Considerations
### Linux
- ✅ Easy cross-compilation with apt packages
- ✅ Static binaries possible
- Target: glibc 2.17+ (CentOS 7+)
### macOS
- ⚠️ osxcross is complex but works
- ⚠️ SDK licensing (GitHub has enterprise license)
- Alternative: Use native macOS runners
- Target: macOS 11+ (Intel and Apple Silicon)
### Windows
- ⚠️ CGO requires mingw-w64 toolchain
- ⚠️ Limited testing (no Windows VM in project)
- Consider: Windows CGO may not be required
- Target: Windows 10+ (64-bit)
### Can We Disable CGO for Windows?
**Investigation needed**:
```bash
# Try building without CGO on Windows
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o netrunner.exe
```
If successful, simplify goreleaser.yml:
```yaml
- goos: windows
goarch: amd64
env:
- CGO_ENABLED=0 # Disable CGO for Windows
```
## Success Criteria
### Workflow Must:
1. ✅ Build for all 5 platforms (Linux amd64/arm64, Darwin amd64/arm64, Windows amd64)
2. ✅ Create archives (.tar.gz for Unix, .zip for Windows)
3. ✅ Generate SHA256SUMS file
4. ✅ Create GitHub release automatically
5. ✅ Include changelog
6. ✅ Mark latest release
7. ✅ Validate semantic versioning
8. ✅ Prevent v2.x.x releases without module path update
### Binaries Must:
1. ✅ Run on target platforms
2. ✅ Show correct version (`netrunner version`)
3. ✅ Be reproducible (same input = same output)
4. ✅ Include proper licensing info
## Next Steps
1. **Update `.goreleaser.yml`** with Windows support and proper configuration
2. **Update `.github/workflows/release.yml`** with improved workflow
3. **Test locally** with `goreleaser build --snapshot --clean`
4. **Create RC tag** for workflow testing
5. **Validate binaries** on all platforms
6. **Create v1.14.0 release**
## References
- GoReleaser Docs: https://goreleaser.com/
- goreleaser-cross: https://github.com/goreleaser/goreleaser-cross
- GitHub Actions: https://docs.github.com/en/actions
- Semantic Versioning: https://semver.org/
- Go Modules: https://go.dev/ref/mod#major-version-suffixes
-470
View File
@@ -1,470 +0,0 @@
# Lux Netrunner v1.14.0 Release Checklist
**Date**: 2025-11-12
**Target Version**: v1.14.0
**Current Version**: v1.13.5-lux.3
## Pre-Release Setup
### 1. Documentation Review
- [ ] Read `/Users/z/work/lux/netrunner/RELEASE_ANALYSIS.md`
- [ ] Read `/Users/z/work/lux/netrunner/RELEASE_TESTING.md`
- [ ] Read `/Users/z/work/lux/netrunner/RELEASE_WORKFLOW_SUMMARY.md`
- [ ] Understand workflow changes
- [ ] Review goreleaser.yml changes
### 2. Local Environment
- [ ] Go 1.25+ installed (`go version`)
- [ ] Git configured (`git config --list`)
- [ ] GitHub CLI installed (`gh --version`)
- [ ] GitHub CLI authenticated (`gh auth status`)
- [ ] Working directory clean (`git status`)
- [ ] On main branch (`git checkout main`)
- [ ] Latest changes pulled (`git pull origin main`)
### 3. Optional: Install goreleaser
```bash
brew install goreleaser/tap/goreleaser
goreleaser --version
```
## Phase 1: Local Testing (Optional but Recommended)
### Test Build
```bash
cd /Users/z/work/lux/netrunner
# Snapshot build (no tag required)
goreleaser build --snapshot --clean
# Verify build succeeded
ls -lh dist/
```
**Expected Output**:
```
dist/netrunner_v1.14.0-next_linux_amd64/
dist/netrunner_v1.14.0-next_linux_arm64/
dist/netrunner_v1.14.0-next_darwin_amd64/
dist/netrunner_v1.14.0-next_darwin_arm64/
dist/netrunner_v1.14.0-next_windows_amd64/
```
- [ ] Build completed without errors
- [ ] All 5 platform directories present
- [ ] Binary sizes reasonable (15-20 MB)
### Test Local Binary
```bash
# Test your platform's binary
./dist/netrunner_v1.14.0-next_darwin_arm64/netrunner version
./dist/netrunner_v1.14.0-next_darwin_arm64/netrunner --help
./dist/netrunner_v1.14.0-next_darwin_arm64/netrunner server --help
```
- [ ] Binary executes without errors
- [ ] Version shows correctly
- [ ] Help commands work
- [ ] No missing libraries
### Test Full Release (Local)
```bash
# Simulate full release
goreleaser release --snapshot --clean --skip-publish
# Verify archives
ls -lh dist/*.tar.gz dist/*.zip
```
**Expected Archives**:
- `netrunner_v1.14.0-next_linux_amd64.tar.gz`
- `netrunner_v1.14.0-next_linux_arm64.tar.gz`
- `netrunner_v1.14.0-next_darwin_amd64.tar.gz`
- `netrunner_v1.14.0-next_darwin_arm64.tar.gz`
- `netrunner_v1.14.0-next_windows_amd64.zip`
- `SHA256SUMS`
- [ ] All 5 archives created
- [ ] SHA256SUMS file present
- [ ] Archives extract successfully
- [ ] Checksums validate: `sha256sum -c dist/SHA256SUMS`
## Phase 2: Release Candidate Testing
### Create RC Tag
```bash
cd /Users/z/work/lux/netrunner
# Ensure clean state
git status
git pull origin main
# Create RC tag
git tag -a v1.14.0-rc.1 -m "Release candidate v1.14.0-rc.1
Testing multi-platform release workflow:
- Windows support
- Enhanced automation
- Comprehensive documentation"
# Push tag (triggers workflow)
git push origin v1.14.0-rc.1
```
- [ ] Tag created locally
- [ ] Tag pushed to GitHub
- [ ] Workflow triggered (check GitHub Actions)
### Monitor Workflow
```bash
# Watch workflow execution
gh run watch
# Or view in browser
gh workflow view release --web
```
**Monitor Progress**:
- [ ] ✅ validate-version job passes (~10 seconds)
- [ ] ✅ test job passes (~40 seconds)
- [ ] ✅ release job passes (~5-10 minutes)
**If any job fails**: Check logs with `gh run view --log`, fix issues, delete tag, recreate.
### Verify RC Release
```bash
# List releases
gh release list
# View RC release
gh release view v1.14.0-rc.1
# Download assets
gh release download v1.14.0-rc.1 --dir ./test-release-rc1
cd test-release-rc1
```
- [ ] Release created on GitHub
- [ ] All 6 assets present (5 binaries + checksums)
- [ ] Release notes formatted correctly
- [ ] Changelog generated properly
- [ ] Marked as pre-release (if RC tag detected)
### Verify Assets
```bash
cd test-release-rc1
# Verify checksums
sha256sum -c SHA256SUMS
# or on macOS
shasum -a 256 -c SHA256SUMS
```
- [ ] All checksums valid
- [ ] File sizes reasonable (15-20 MB compressed)
- [ ] Archive names follow pattern: `netrunner_v1.14.0-rc.1_{os}_{arch}.{ext}`
### Test Downloaded Binaries
**Linux AMD64**:
```bash
tar -xzf netrunner_v1.14.0-rc.1_linux_amd64.tar.gz
./netrunner version
# Expected: netrunner version v1.14.0-rc.1
```
- [ ] Extracts successfully
- [ ] Binary executes
- [ ] Version correct
**macOS (your platform)**:
```bash
tar -xzf netrunner_v1.14.0-rc.1_darwin_arm64.tar.gz
./netrunner version
./netrunner --help
```
- [ ] Extracts successfully
- [ ] Binary executes
- [ ] No Gatekeeper issues (unsigned is expected)
- [ ] Help works
**Windows** (if available or skip):
```bash
unzip netrunner_v1.14.0-rc.1_windows_amd64.zip
./netrunner.exe version # In WSL or Windows
```
- [ ] Extracts successfully
- [ ] Binary executes (or skipped if no Windows access)
### Integration Test (Optional)
```bash
# Start a test network with RC binary
./netrunner server --port=:8080 --grpc-gateway-port=:8081 &
SERVER_PID=$!
# Basic health check
sleep 2
curl http://localhost:8081/health
# Cleanup
kill $SERVER_PID
```
- [ ] Server starts successfully
- [ ] Health endpoint responds
- [ ] No crashes or errors
### RC Decision
If all checks pass:
- [ ] RC testing successful
If any checks fail:
- [ ] Issues documented
- [ ] Delete RC release: `gh release delete v1.14.0-rc.1 --yes`
- [ ] Delete tags: `git tag -d v1.14.0-rc.1 && git push origin :refs/tags/v1.14.0-rc.1`
- [ ] Fix issues
- [ ] Repeat Phase 2 with v1.14.0-rc.2
### Cleanup RC
```bash
# Delete RC release (once satisfied)
gh release delete v1.14.0-rc.1 --yes
# Delete local tag
git tag -d v1.14.0-rc.1
# Delete remote tag
git push origin :refs/tags/v1.14.0-rc.1
# Cleanup downloaded files
cd ..
rm -rf test-release-rc1
```
- [ ] RC release deleted from GitHub
- [ ] RC tag deleted locally and remotely
- [ ] Test files cleaned up
## Phase 3: Production Release
### Pre-Production Checks
- [ ] All RC tests passed
- [ ] No critical issues found
- [ ] Documentation updated with v1.14.0
- [ ] CHANGELOG.md prepared (if exists)
- [ ] README.md version references updated
- [ ] All changes committed and pushed
### Create Production Tag
```bash
cd /Users/z/work/lux/netrunner
# Final sync
git checkout main
git pull origin main
git status # Ensure clean
# Create production tag
git tag -a v1.14.0 -m "Release v1.14.0
Multi-platform release with comprehensive automation.
## What's New
- Windows support (amd64)
- Enhanced CI/CD with semantic versioning
- Automated checksums and archives
- Structured changelog generation
- Comprehensive release documentation
## Platforms
- Linux (amd64, arm64)
- macOS (Intel, Apple Silicon)
- Windows (amd64)
## Installation
See https://github.com/luxfi/netrunner/releases/tag/v1.14.0
Full changelog: https://github.com/luxfi/netrunner/compare/v1.13.5-lux.3...v1.14.0"
# Push tag
git push origin v1.14.0
```
- [ ] Production tag created
- [ ] Tag message detailed
- [ ] Tag pushed to GitHub
### Monitor Production Release
```bash
# Watch workflow
gh run watch
# Or view in browser
gh workflow view release --web
```
- [ ] ✅ validate-version passes
- [ ] ✅ test passes
- [ ] ✅ release passes
- [ ] No errors in logs
### Verify Production Release
```bash
# View release
gh release view v1.14.0
# Verify assets
gh release view v1.14.0 --json assets --jq '.assets[].name'
```
**Expected Assets**:
```
netrunner_v1.14.0_linux_amd64.tar.gz
netrunner_v1.14.0_linux_arm64.tar.gz
netrunner_v1.14.0_darwin_amd64.tar.gz
netrunner_v1.14.0_darwin_arm64.tar.gz
netrunner_v1.14.0_windows_amd64.zip
SHA256SUMS
```
- [ ] All 6 assets present
- [ ] Release marked as "Latest"
- [ ] Release notes formatted correctly
- [ ] Changelog populated
- [ ] Download URLs work
### Download and Verify Production
```bash
# Download production release
gh release download v1.14.0 --dir ./release-v1.14.0
cd release-v1.14.0
# Verify checksums
sha256sum -c SHA256SUMS
# Test your platform
tar -xzf netrunner_v1.14.0_darwin_arm64.tar.gz
./netrunner version
```
- [ ] All checksums valid
- [ ] Binary version shows v1.14.0
- [ ] No issues running binary
## Phase 4: Post-Release
### Documentation Updates
- [ ] Update `/Users/z/work/lux/netrunner/README.md` with v1.14.0 install URLs
- [ ] Update `/Users/z/work/lux/netrunner/CLAUDE.md` with release notes
- [ ] Update any version references in docs
- [ ] Commit and push documentation updates
### Announcement (Optional)
- [ ] Draft release announcement
- [ ] Post to Discord/Slack (if applicable)
- [ ] Update project website (if applicable)
- [ ] Tweet/social media (if applicable)
### Monitoring
- [ ] Watch for issue reports
- [ ] Monitor download statistics
- [ ] Check for platform-specific problems
- [ ] Document any unexpected behaviors
### Repository Cleanup
```bash
# Remove local test artifacts
cd /Users/z/work/lux/netrunner
rm -rf dist/
rm -rf release-v1.14.0/
```
- [ ] Local test files removed
- [ ] Working directory clean
## Success Criteria
✅ Release is successful when:
1. Workflow completes without errors
2. All 5 platform binaries built and uploaded
3. SHA256SUMS file present and valid
4. Release marked as "Latest" on GitHub
5. Binaries run on target platforms
6. Version output matches tag
7. No critical issues reported within 24 hours
## Rollback Plan (If Needed)
If critical issue discovered post-release:
1. **Document Issue**:
```bash
# Create issue on GitHub
gh issue create --title "Critical issue in v1.14.0" --body "..."
```
2. **Create Hotfix** (if fixable quickly):
```bash
# Fix issue, commit
git commit -am "fix: critical issue in v1.14.0"
git push origin main
# Create hotfix release
git tag -a v1.14.1 -m "Hotfix release v1.14.1"
git push origin v1.14.1
```
3. **Mark Release as Broken** (if not fixable):
```bash
# Edit release notes to add warning
gh release edit v1.14.0 --notes "⚠️ **DO NOT USE** - Critical issue found. Use v1.13.5-lux.3 or wait for v1.14.1"
```
4. **Revert to Previous** (worst case):
```bash
# Mark as pre-release (removes "Latest" badge)
gh release edit v1.14.0 --prerelease
# Users will see v1.13.5-lux.3 as latest
```
## Future Releases
For subsequent releases (v1.15.0, v1.16.0, etc.):
1. ✅ Workflow is now automated - no setup needed
2. ✅ Just create tag and push: `git tag -a v1.15.0 -m "..." && git push origin v1.15.0`
3. ✅ Workflow handles everything automatically
4. ⚠️ Still test RC first if major changes
## Notes
- **First Release**: v1.14.0 is the first automated multi-platform release
- **Breaking Changes**: If introducing breaking changes, document in release notes
- **Platform Support**: Can add more platforms by editing `.goreleaser.yml`
- **Build Time**: Expect 5-10 minutes for full release build
- **Rate Limits**: GitHub has rate limits - wait between RC and production
## Questions/Issues
If problems arise during release:
1. Check workflow logs: `gh run view --log`
2. Review documentation in `/Users/z/work/lux/netrunner/RELEASE_*.md`
3. Test locally with goreleaser snapshot
4. Check goreleaser-cross-action issues
5. Verify GitHub token permissions
## Completed Checklist Summary
When finished, you should have:
- ✅ Tested workflow locally (optional)
- ✅ Tested RC (v1.14.0-rc.1)
- ✅ Verified all platforms
- ✅ Created production release (v1.14.0)
- ✅ Verified production artifacts
- ✅ Updated documentation
- ✅ Monitored for issues
**Congratulations!** 🎉 First multi-platform automated release complete!
-224
View File
@@ -1,224 +0,0 @@
# Lux Netrunner Release - Quick Start Guide
**TL;DR**: Create tag → Push tag → Done! 🚀
## The Shortest Path to Release
```bash
# 1. Test locally (optional but recommended)
goreleaser build --snapshot --clean
./dist/netrunner_*/netrunner version
# 2. Create RC tag
git tag -a v1.14.0-rc.1 -m "RC for v1.14.0"
git push origin v1.14.0-rc.1
# 3. Watch workflow (open in browser)
gh workflow view release --web
# 4. Download and test
gh release download v1.14.0-rc.1
sha256sum -c SHA256SUMS
./netrunner version
# 5. If good, clean up RC
gh release delete v1.14.0-rc.1 --yes
git tag -d v1.14.0-rc.1
git push origin :refs/tags/v1.14.0-rc.1
# 6. Create production release
git tag -a v1.14.0 -m "Release v1.14.0"
git push origin v1.14.0
# 7. Verify
gh release view v1.14.0
```
## What You Get
### Platforms (5 total)
- ✅ Linux amd64
- ✅ Linux arm64
- ✅ macOS Intel (amd64)
- ✅ macOS Apple Silicon (arm64)
- ✅ Windows amd64
### Artifacts
```
netrunner_v1.14.0_linux_amd64.tar.gz
netrunner_v1.14.0_linux_arm64.tar.gz
netrunner_v1.14.0_darwin_amd64.tar.gz
netrunner_v1.14.0_darwin_arm64.tar.gz
netrunner_v1.14.0_windows_amd64.zip
SHA256SUMS
```
### Features
- ✅ Automatic checksums (SHA256)
- ✅ Structured changelog (feat/fix/perf)
- ✅ Release notes with download instructions
- ✅ Semantic version validation
- ✅ Test suite runs before release
- ✅ Cross-platform compilation
## Workflow Jobs
```
validate-version (10s)
test (40s)
release (5-10min)
```
**Total Time**: ~6-11 minutes
## Version Rules
**Valid**:
- `v1.14.0`
- `v1.14.0-rc.1`
- `v1.14.0-alpha.2`
- `v1.14.0+build.123`
**Invalid**:
- `1.14.0` (missing 'v')
- `v1.14` (incomplete semver)
- `v2.0.0` (v2+ requires module path change)
- `release-1.14.0` (not semver)
## Common Commands
```bash
# Local test (no tag needed)
goreleaser build --snapshot --clean
# Create tag
git tag -a v1.14.0 -m "Release v1.14.0"
# Push tag (triggers release)
git push origin v1.14.0
# Watch workflow
gh run watch
# View release
gh release view v1.14.0
# Download release
gh release download v1.14.0
# Delete release
gh release delete v1.14.0 --yes
# Delete tag
git tag -d v1.14.0
git push origin :refs/tags/v1.14.0
```
## When Things Go Wrong
### Workflow fails validation
**Why**: Tag format invalid
**Fix**: Delete tag, recreate with correct format
### Tests fail
**Why**: Code has failing tests
**Fix**: Fix tests, push, recreate tag
### Build fails
**Why**: Cross-compilation error
**Fix**: Check workflow logs, may need goreleaser.yml adjustment
### Binary doesn't run
**Why**: Missing dependencies or wrong platform
**Fix**: Test on actual hardware, check CGO settings
## Pro Tips
1. **Always test RC first**: `v1.14.0-rc.1` before `v1.14.0`
2. **Use goreleaser locally**: Catch issues before pushing
3. **Keep changelog clean**: Use conventional commits (feat/fix/docs)
4. **Monitor workflow**: Don't walk away after push
5. **Verify checksums**: Always `sha256sum -c SHA256SUMS`
## Files to Know
- `.goreleaser.yml` - Build configuration
- `.github/workflows/release.yml` - Workflow automation
- `RELEASE_ANALYSIS.md` - Detailed architecture
- `RELEASE_TESTING.md` - Comprehensive testing guide
- `RELEASE_CHECKLIST.md` - Step-by-step checklist
## Next Release (Future)
For v1.15.0 and beyond:
```bash
git tag -a v1.15.0 -m "Release v1.15.0"
git push origin v1.15.0
# That's it! 🎉
```
Everything else is automated.
## Install goreleaser (One-Time)
```bash
# macOS/Linux
brew install goreleaser/tap/goreleaser
# Or via Go
go install github.com/goreleaser/goreleaser@latest
# Verify
goreleaser --version
```
## Expected Timeline
| Phase | Time |
|-------|------|
| Local test (optional) | 2 min |
| RC creation | 1 min |
| RC workflow | 6-11 min |
| RC testing | 5 min |
| RC cleanup | 1 min |
| Production creation | 1 min |
| Production workflow | 6-11 min |
| Production testing | 3 min |
| **Total** | **25-41 minutes** |
Without RC testing: **7-12 minutes**
## Help
Detailed help available in:
- `RELEASE_CHECKLIST.md` - Full checklist
- `RELEASE_TESTING.md` - Testing scenarios
- `RELEASE_ANALYSIS.md` - Architecture details
Quick help:
```bash
# Workflow status
gh run list --workflow=release.yml
# View logs
gh run view --log
# Release list
gh release list
# Asset list
gh release view v1.14.0 --json assets
```
## Summary
1. ✅ Workflow is fully automated
2. ✅ Push tag → Get release
3. ✅ 5 platforms supported
4. ✅ Checksums included
5. ✅ Changelog generated
6. ✅ Tests run automatically
7. ✅ Version validated
8. ✅ Ready for v1.14.0! 🚀
-443
View File
@@ -1,443 +0,0 @@
# Release Workflow Testing Guide
**Project**: Lux Netrunner
**Repository**: luxfi/netrunner
**Date**: 2025-11-12
## Prerequisites
### Local Testing (Optional but Recommended)
Install goreleaser for local testing:
```bash
# macOS
brew install goreleaser/tap/goreleaser
# Linux
brew install goreleaser/tap/goreleaser
# or
go install github.com/goreleaser/goreleaser@latest
# Verify installation
goreleaser --version
```
### GitHub Setup
Ensure you have:
- Push access to luxfi/netrunner repository
- GitHub CLI installed (`brew install gh` or see https://cli.github.com/)
- Authenticated with `gh auth login`
## Testing Workflow Locally
### 1. Test Build Without Release
```bash
cd /Users/z/work/lux/netrunner
# Snapshot build (no git tags required)
goreleaser build --snapshot --clean
# Output will be in ./dist/
ls -lh dist/
```
Expected output:
```
netrunner_v1.14.0-next_linux_amd64/
netrunner_v1.14.0-next_linux_arm64/
netrunner_v1.14.0-next_darwin_amd64/
netrunner_v1.14.0-next_darwin_arm64/
netrunner_v1.14.0-next_windows_amd64/
```
### 2. Test Full Release Process (Local)
```bash
# Simulate full release without publishing
goreleaser release --snapshot --clean --skip-publish
# Check generated artifacts
ls -lh dist/
```
Expected artifacts:
- `netrunner_v1.14.0-next_linux_amd64.tar.gz`
- `netrunner_v1.14.0-next_linux_arm64.tar.gz`
- `netrunner_v1.14.0-next_darwin_amd64.tar.gz`
- `netrunner_v1.14.0-next_darwin_arm64.tar.gz`
- `netrunner_v1.14.0-next_windows_amd64.zip`
- `SHA256SUMS`
### 3. Test Binary Functionality
```bash
# Test current platform binary (example for macOS arm64)
./dist/netrunner_v1.14.0-next_darwin_arm64/netrunner version
# Expected output:
# netrunner version v1.14.0-next
# Test help command
./dist/netrunner_v1.14.0-next_darwin_arm64/netrunner --help
# Test server start (quick test)
./dist/netrunner_v1.14.0-next_darwin_arm64/netrunner server --help
```
### 4. Verify Checksums
```bash
cd dist/
# Verify all checksums
sha256sum -c SHA256SUMS
# Or verify specific file
sha256sum netrunner_v1.14.0-next_linux_amd64.tar.gz
grep "netrunner_v1.14.0-next_linux_amd64.tar.gz" SHA256SUMS
```
## Testing on GitHub (Release Candidate)
### Step 1: Create RC Tag
```bash
cd /Users/z/work/lux/netrunner
# Ensure you're on latest main
git checkout main
git pull origin main
# Create release candidate tag
git tag -a v1.14.0-rc.1 -m "Release candidate v1.14.0-rc.1 for testing"
# Push tag to trigger workflow
git push origin v1.14.0-rc.1
```
### Step 2: Monitor Workflow
```bash
# Watch workflow execution
gh workflow view release
# Or open in browser
gh workflow view release --web
# Check run status
gh run list --workflow=release.yml --limit 1
# View logs if needed
gh run view --log
```
### Step 3: Verify Release
```bash
# List releases
gh release list
# View specific release
gh release view v1.14.0-rc.1
# Download all assets
gh release download v1.14.0-rc.1 --dir ./test-release
# Verify checksums
cd test-release
sha256sum -c SHA256SUMS
```
### Step 4: Test Downloaded Binaries
```bash
cd test-release
# Extract Linux binary
tar -xzf netrunner_v1.14.0-rc.1_linux_amd64.tar.gz
./netrunner version
# Extract macOS binary (if on macOS)
tar -xzf netrunner_v1.14.0-rc.1_darwin_arm64.tar.gz
./netrunner version
# Extract Windows binary (if on Windows or WSL)
unzip netrunner_v1.14.0-rc.1_windows_amd64.zip
./netrunner.exe version
```
### Step 5: Clean Up RC Release
If testing successful:
```bash
# Delete release
gh release delete v1.14.0-rc.1 --yes
# Delete local tag
git tag -d v1.14.0-rc.1
# Delete remote tag
git push origin :refs/tags/v1.14.0-rc.1
# Clean up downloaded files
rm -rf test-release
```
## Production Release Process
### Pre-Release Checklist
- [ ] All tests passing locally (`go test ./...`)
- [ ] All tests passing on CI
- [ ] CHANGELOG.md updated
- [ ] Version number decided (v1.14.0)
- [ ] RC testing completed successfully
- [ ] Documentation updated with new version
### Create Production Release
```bash
cd /Users/z/work/lux/netrunner
# Ensure clean working directory
git status
# Ensure on latest main
git checkout main
git pull origin main
# Create production tag
git tag -a v1.14.0 -m "Release v1.14.0
Features:
- Windows support added
- Enhanced cross-platform builds
- Improved release automation
See CHANGELOG.md for full details."
# Push tag (this triggers release workflow)
git push origin v1.14.0
```
### Monitor Release
```bash
# Watch workflow
gh run watch
# Or view in browser
gh workflow view release --web
```
### Verify Production Release
```bash
# View release
gh release view v1.14.0
# Verify all assets present
gh release view v1.14.0 --json assets --jq '.assets[].name'
```
Expected assets:
- `netrunner_v1.14.0_linux_amd64.tar.gz`
- `netrunner_v1.14.0_linux_arm64.tar.gz`
- `netrunner_v1.14.0_darwin_amd64.tar.gz`
- `netrunner_v1.14.0_darwin_arm64.tar.gz`
- `netrunner_v1.14.0_windows_amd64.zip`
- `SHA256SUMS`
### Post-Release Checklist
- [ ] Release appears on GitHub releases page
- [ ] All 5 platform binaries present
- [ ] SHA256SUMS file present
- [ ] Release notes generated correctly
- [ ] Changelog formatted properly
- [ ] Download links work
- [ ] Checksums verify correctly
- [ ] Binaries run on target platforms
## Platform-Specific Testing
### Linux (amd64)
```bash
# Download and test
curl -LO https://github.com/luxfi/netrunner/releases/download/v1.14.0/netrunner_v1.14.0_linux_amd64.tar.gz
curl -LO https://github.com/luxfi/netrunner/releases/download/v1.14.0/SHA256SUMS
sha256sum -c SHA256SUMS --ignore-missing
tar -xzf netrunner_v1.14.0_linux_amd64.tar.gz
./netrunner version
./netrunner --help
```
### Linux (arm64)
```bash
# On ARM64 system or emulator
curl -LO https://github.com/luxfi/netrunner/releases/download/v1.14.0/netrunner_v1.14.0_linux_arm64.tar.gz
curl -LO https://github.com/luxfi/netrunner/releases/download/v1.14.0/SHA256SUMS
sha256sum -c SHA256SUMS --ignore-missing
tar -xzf netrunner_v1.14.0_linux_arm64.tar.gz
./netrunner version
```
### macOS (Intel)
```bash
# On Intel Mac
curl -LO https://github.com/luxfi/netrunner/releases/download/v1.14.0/netrunner_v1.14.0_darwin_amd64.tar.gz
curl -LO https://github.com/luxfi/netrunner/releases/download/v1.14.0/SHA256SUMS
shasum -a 256 -c SHA256SUMS --ignore-missing
tar -xzf netrunner_v1.14.0_darwin_amd64.tar.gz
./netrunner version
```
### macOS (Apple Silicon)
```bash
# On M1/M2/M3 Mac
curl -LO https://github.com/luxfi/netrunner/releases/download/v1.14.0/netrunner_v1.14.0_darwin_arm64.tar.gz
curl -LO https://github.com/luxfi/netrunner/releases/download/v1.14.0/SHA256SUMS
shasum -a 256 -c SHA256SUMS --ignore-missing
tar -xzf netrunner_v1.14.0_darwin_arm64.tar.gz
./netrunner version
```
### Windows (amd64)
```powershell
# PowerShell
Invoke-WebRequest -Uri https://github.com/luxfi/netrunner/releases/download/v1.14.0/netrunner_v1.14.0_windows_amd64.zip -OutFile netrunner.zip
Invoke-WebRequest -Uri https://github.com/luxfi/netrunner/releases/download/v1.14.0/SHA256SUMS -OutFile SHA256SUMS
Expand-Archive netrunner.zip
.\netrunner\netrunner.exe version
```
## Troubleshooting
### Issue: Workflow fails at validation step
**Cause**: Tag doesn't match semantic versioning pattern
**Solution**: Delete tag and recreate with proper format
```bash
git tag -d v1.14.0-invalid
git push origin :refs/tags/v1.14.0-invalid
git tag -a v1.14.0 -m "Release v1.14.0"
git push origin v1.14.0
```
### Issue: Workflow fails at test step
**Cause**: Tests failing
**Solution**: Fix tests before creating tag
```bash
go test ./... # Run locally first
git commit -am "fix: resolve test failures"
git push origin main
git tag -a v1.14.0 -m "Release v1.14.0"
git push origin v1.14.0
```
### Issue: GoReleaser fails on cross-compilation
**Cause**: Missing cross-compiler or CGO issue
**Solution**: Check goreleaser-cross-action logs, may need to disable CGO for problematic platform
### Issue: Binary doesn't run on target platform
**Cause**: Missing dynamic libraries or incompatible build
**Solution**:
- Verify CGO_ENABLED setting
- Check ldflags for static linking
- Test on actual target platform, not emulator
### Issue: Checksums don't match
**Cause**: File corruption during download or generation
**Solution**: Re-download from GitHub release, verify no proxy/CDN caching issues
## Success Criteria
A release is successful when:
1.**Workflow completes** without errors
2.**All platforms built** (5 binaries present)
3.**Release created** on GitHub
4.**Checksums valid** for all artifacts
5.**Binaries run** on target platforms
6.**Version correct** in binary output
7.**Archives extract** without errors
8.**Changelog generated** properly
9.**Release marked latest** (if not pre-release)
10.**Download links work** from GitHub
## Automation Improvements (Future)
Consider adding:
1. **Binary smoke tests** in workflow (run `--version` on each platform)
2. **Automated platform testing** via matrix of runners
3. **Integration test** execution before release
4. **Docker image** builds alongside binaries
5. **Homebrew tap** update automation
6. **Announcement posting** to Discord/Slack
7. **Documentation versioning** automation
## Useful Commands Reference
```bash
# Local testing
goreleaser build --snapshot --clean
goreleaser release --snapshot --clean --skip-publish
# Tag management
git tag -a v1.14.0 -m "Release v1.14.0"
git push origin v1.14.0
git tag -d v1.14.0
git push origin :refs/tags/v1.14.0
# GitHub CLI
gh release list
gh release view v1.14.0
gh release download v1.14.0
gh release delete v1.14.0 --yes
# Workflow monitoring
gh workflow list
gh workflow view release
gh run list --workflow=release.yml
gh run watch
# Checksum verification
sha256sum -c SHA256SUMS
sha256sum netrunner_v1.14.0_linux_amd64.tar.gz
shasum -a 256 -c SHA256SUMS # macOS
```
## Next Steps After First Release
1. Update installation documentation with release URLs
2. Test installation instructions on clean systems
3. Gather feedback on binary compatibility
4. Monitor issue tracker for platform-specific problems
5. Document any platform-specific quirks discovered
6. Plan next release with improvements
## References
- GoReleaser Docs: https://goreleaser.com/
- GitHub Actions Docs: https://docs.github.com/en/actions
- GitHub CLI Manual: https://cli.github.com/manual/
- Semantic Versioning: https://semver.org/
-328
View File
@@ -1,328 +0,0 @@
# Lux Netrunner Release Workflow - Implementation Summary
**Date**: 2025-11-12
**Status**: ✅ Complete - Ready for Testing
**Next Version**: v1.14.0
## Overview
Created comprehensive multi-platform release workflow for Lux Netrunner with full automation, semantic version validation, and support for all major platforms.
## Files Created/Modified
### 1. `.goreleaser.yml` (Updated)
**Changes**:
- ✅ Added Windows amd64 support
- ✅ Added archives configuration (tar.gz for Unix, zip for Windows)
- ✅ Added SHA256SUMS checksum generation
- ✅ Added structured changelog generation
- ✅ Enhanced release notes template
- ✅ Added `-s -w` ldflags for smaller binaries
- ✅ Configured proper archive naming: `netrunner_v1.14.0_linux_amd64.tar.gz`
**Platforms Supported**:
- Linux (amd64, arm64)
- Darwin/macOS (amd64, arm64)
- Windows (amd64)
**Total**: 5 platform variants
### 2. `.github/workflows/release.yml` (Updated)
**Changes**:
- ✅ Updated trigger to semantic version pattern (`v*.*.*`)
- ✅ Added version validation job (prevents v2.x.x without module update)
- ✅ Added test job (runs before release)
- ✅ Updated Go version from 1.19 to 1.25
- ✅ Replaced osxcross setup with goreleaser-cross-action
- ✅ Added coverage artifact upload
- ✅ Added GitHub Actions summary output
**Jobs**:
1. **validate-version**: Semantic version check, major version constraint
2. **test**: Run unit tests with race detection and coverage
3. **release**: Build all platforms and create GitHub release
### 3. `RELEASE_ANALYSIS.md` (Created)
**Contents**:
- Current state analysis
- Issues identified
- Recommended solutions
- Detailed implementation plan
- Cross-compilation notes
- Platform considerations
- Success criteria
- Migration plan
### 4. `RELEASE_TESTING.md` (Created)
**Contents**:
- Local testing instructions
- RC (release candidate) testing process
- Production release checklist
- Platform-specific testing commands
- Troubleshooting guide
- Success criteria
- Useful commands reference
### 5. `RELEASE_WORKFLOW_SUMMARY.md` (This File)
**Contents**:
- Implementation summary
- Quick start guide
- File changes overview
- Testing recommendations
## Key Improvements
### Workflow Enhancements
1. **Semantic Version Validation**: Prevents invalid version tags
2. **Major Version Protection**: Blocks v2.x.x without module path update
3. **Pre-Release Testing**: Runs full test suite before building
4. **Coverage Tracking**: Uploads test coverage reports
5. **Clean Builds**: Uses `--clean` instead of deprecated `--rm-dist`
6. **Modern Actions**: Updated to latest GitHub Actions versions
### Build Improvements
1. **Windows Support**: Added Windows amd64 builds (.zip archives)
2. **Smaller Binaries**: Added `-s -w` ldflags to strip debug info
3. **Proper Archives**: Configured format per platform
4. **Checksums**: Automatic SHA256SUMS generation
5. **Structured Changelog**: Groups commits by type (feat/fix/perf)
6. **Rich Release Notes**: Templated headers and footers
### Developer Experience
1. **Local Testing**: Full goreleaser snapshot support
2. **RC Testing**: Documented release candidate workflow
3. **Clear Errors**: Helpful validation error messages
4. **Monitoring**: GitHub Actions summary with release link
5. **Documentation**: Comprehensive guides for all scenarios
## Architecture Decisions
### Why GoReleaser?
- Industry standard for Go project releases
- Automatic archive creation and checksums
- Built-in changelog generation
- Supports complex cross-compilation scenarios
- Minimal workflow YAML to maintain
### Why goreleaser-cross-action?
- Eliminates fragile osxcross setup (30+ min build)
- Provides pre-configured cross-compilation toolchains
- Supports CGO for all platforms
- Maintained by goreleaser team
- Faster builds (uses Docker image)
### Why Semantic Version Validation?
- Prevents accidental v2.x.x tags (Go module breaking change)
- Enforces consistent version format
- Catches typos before release
- Documents versioning requirements
### Why Separate Test Job?
- Fail fast if tests don't pass
- Avoid wasting time on builds if code is broken
- Generate coverage reports before release
- Can be expanded with integration tests
## Quick Start
### Local Testing (Recommended First Step)
```bash
cd /Users/z/work/lux/netrunner
# Install goreleaser (one-time)
brew install goreleaser/tap/goreleaser
# Test build without releasing
goreleaser build --snapshot --clean
# Test on your platform
./dist/netrunner_v1.14.0-next_darwin_arm64/netrunner version
```
### Create Release Candidate
```bash
# Create RC tag
git tag -a v1.14.0-rc.1 -m "Release candidate v1.14.0-rc.1"
git push origin v1.14.0-rc.1
# Monitor workflow
gh workflow view release --web
# Download and test
gh release download v1.14.0-rc.1 --dir ./test-release
cd test-release
sha256sum -c SHA256SUMS
```
### Create Production Release
```bash
# After RC testing successful
gh release delete v1.14.0-rc.1 --yes
git tag -d v1.14.0-rc.1
git push origin :refs/tags/v1.14.0-rc.1
# Create production tag
git tag -a v1.14.0 -m "Release v1.14.0"
git push origin v1.14.0
# Monitor and verify
gh run watch
gh release view v1.14.0
```
## Version Recommendation
### Recommended First Release: v1.14.0
**Rationale**:
- Current version: v1.13.5-lux.3
- Next minor bump: v1.14.0
- Clean version (no suffix)
- Major milestone (Windows support + automation)
**What's Included**:
- All recent bug fixes and improvements
- Windows platform support
- Enhanced CI/CD automation
- Comprehensive documentation
## Testing Checklist
Before creating v1.14.0:
- [ ] Run local snapshot build: `goreleaser build --snapshot --clean`
- [ ] Test local binary: `./dist/.../netrunner version`
- [ ] Run all tests: `go test ./...`
- [ ] Create RC tag: `v1.14.0-rc.1`
- [ ] Verify workflow passes all jobs
- [ ] Download all 5 platform binaries
- [ ] Verify checksums: `sha256sum -c SHA256SUMS`
- [ ] Test binary on Linux (amd64 or arm64)
- [ ] Test binary on macOS (Intel or Apple Silicon)
- [ ] Test binary on Windows (or WSL)
- [ ] Verify release notes formatting
- [ ] Verify changelog grouped correctly
- [ ] Clean up RC: delete release and tag
- [ ] Create production tag: `v1.14.0`
- [ ] Verify final release
- [ ] Update installation docs with v1.14.0 URLs
## Expected Output
### Workflow Execution
```
✅ validate-version
└─ Check semantic version format (1s)
✅ test
├─ Checkout (2s)
├─ Set up Go (5s)
├─ Run unit tests (30s)
└─ Upload coverage (2s)
✅ release
├─ Checkout (2s)
├─ Set up Go (5s)
├─ Run GoReleaser (5-10min)
└─ Summary (1s)
```
### GitHub Release Assets
```
netrunner_v1.14.0_linux_amd64.tar.gz (15 MB)
netrunner_v1.14.0_linux_arm64.tar.gz (14 MB)
netrunner_v1.14.0_darwin_amd64.tar.gz (15 MB)
netrunner_v1.14.0_darwin_arm64.tar.gz (14 MB)
netrunner_v1.14.0_windows_amd64.zip (15 MB)
SHA256SUMS (400 B)
```
### Release Notes
```markdown
## Lux Netrunner v1.14.0
Network orchestration and testing framework for Lux blockchain.
### Downloads
[Links to all platform binaries]
### Verifying Checksums
[Instructions with examples]
## Features
- feat: add Windows support
- feat: enhanced CI/CD automation
## Bug fixes
- fix: ...
---
**Full Changelog**: https://github.com/luxfi/netrunner/compare/v1.13.5-lux.3...v1.14.0
```
## Known Limitations
1. **Windows ARM64**: Not included (no stable cross-compiler yet)
2. **FreeBSD/OpenBSD**: Not included (can be added if needed)
3. **CGO Dependency**: Requires cross-compilers, increases build time
4. **Docker Image**: Not built automatically (future enhancement)
## Future Enhancements
Consider adding:
1. **Docker Images**: Multi-arch Docker builds
2. **Homebrew Tap**: Auto-update homebrew formula
3. **Snap/AppImage**: Linux package formats
4. **Binary Signing**: Code signing for macOS/Windows
5. **Notarization**: macOS notarization for Gatekeeper
6. **SBOM Generation**: Software Bill of Materials
7. **Vulnerability Scanning**: Trivy/Grype in workflow
## Troubleshooting
### Workflow fails with "tag must follow semantic versioning"
**Fix**: Use `v1.14.0` format, not `1.14.0` or `v1.14` or `release-1.14.0`
### Workflow fails with "Major version must be < 2"
**Fix**: Don't create v2.x.x tags. For v2, update go.mod module path first.
### Tests fail in workflow
**Fix**: Run `go test ./...` locally and fix before pushing tag
### GoReleaser cross-compilation fails
**Fix**: Check goreleaser-cross-action logs, may need to adjust CC env vars
### Binary doesn't run on target platform
**Fix**: Test on actual hardware, not emulator. Check CGO settings.
## Support
For issues with the release workflow:
1. Check `/Users/z/work/lux/netrunner/RELEASE_TESTING.md` for detailed testing
2. Check `/Users/z/work/lux/netrunner/RELEASE_ANALYSIS.md` for architecture details
3. Review workflow logs: `gh run view --log`
4. Test locally first: `goreleaser build --snapshot --clean`
## References
- GoReleaser: https://goreleaser.com/
- goreleaser-cross: https://github.com/goreleaser/goreleaser-cross
- GitHub Actions: https://docs.github.com/en/actions
- Semantic Versioning: https://semver.org/
## Conclusion
The release workflow is now complete and ready for testing. Follow the testing checklist to create v1.14.0-rc.1, verify all platforms work, then create the production v1.14.0 release.
All documentation is in place, workflow is tested with goreleaser's validation, and the process is fully automated. Once the first release is successful, future releases will be as simple as:
```bash
git tag -a v1.15.0 -m "Release v1.15.0"
git push origin v1.15.0
```
The workflow will handle everything else automatically.
-112
View File
@@ -1,112 +0,0 @@
# Netrunner Usage Guide
## Simple, Intuitive Commands
Netrunner now has multi-network support built-in as a core feature, not a subcommand.
## Starting Networks
### Single Network (Default)
```bash
# Start mainnet (default)
netrunner start
# Start specific network
netrunner start --networks testnet
# Start with custom configuration
netrunner start --config config.json
```
### Multiple Networks (Built-in Feature)
```bash
# Start both mainnet and testnet
netrunner start --networks mainnet,testnet
# Start all networks
netrunner start --networks all
# Enable parallel validation with shared DB
netrunner start --networks all --parallel --shared-db
```
## Network Status
```bash
# Check status of running networks
netrunner status
# Detailed status with validators
netrunner status --verbose
```
## Cross-Chain Transactions
```bash
# Submit cross-chain transaction (when running multiple networks)
netrunner tx --from mainnet:C --to testnet:C --amount 1000
# Between subnets
netrunner tx --from zoo --to hanzo --amount 500
```
## Configuration
```bash
# Generate default config
netrunner config init
# Show current config
netrunner config show
# Edit config
netrunner config set mainnet.validators 10
```
## Examples
### Development Setup (Single Network)
```bash
# Quick start for development
netrunner start
```
### Testing Setup (Multiple Networks)
```bash
# Start both networks for testing cross-chain features
netrunner start --networks all --shared-db
```
### Production Setup
```bash
# Start with custom config and monitoring
netrunner start --config production.json --metrics --log-level info
```
## Key Design Principles
1. **No unnecessary subcommands** - Multi-network is a feature, not a separate mode
2. **Smart defaults** - Single network by default, multi-network when needed
3. **Progressive enhancement** - Simple commands for simple tasks, flags for advanced features
4. **Intuitive flags** - `--networks all` instead of `multinet start`
## Comparison
### Old (subcommand approach):
```bash
netrunner multinet start
netrunner multinet configure
netrunner multinet status
```
### New (integrated approach):
```bash
netrunner start --networks all
netrunner config init
netrunner status
```
## Benefits
- **Simpler**: No need to remember separate multinet subcommand
- **Consistent**: Same commands work for single or multiple networks
- **Discoverable**: `netrunner --help` shows all features
- **Flexible**: Flags enable advanced features when needed
- **Backward Compatible**: Existing single-network commands still work