From 7634a43be2ae2028e7d3d5cf105f7430cf940a26 Mon Sep 17 00:00:00 2001 From: JayWebtech Date: Tue, 16 Sep 2025 11:53:18 +0100 Subject: [PATCH 01/18] feat : add docs --- .gitignore | 34 + docs/.gitbook.yaml | 35 + docs/DEPLOYMENT.md | 316 +++++++++ docs/README.md | 75 +++ docs/SUMMARY.md | 35 + docs/api-reference/commands.md | 473 ++++++++++++++ docs/api-reference/configuration-schema.md | 605 ++++++++++++++++++ docs/api-reference/environment-variables.md | 323 ++++++++++ docs/book.json | 24 + docs/client-management/adding-clients.md | 318 +++++++++ docs/getting-started/configuration.md | 361 +++++++++++ docs/getting-started/hardware-requirements.md | 193 ++++++ docs/getting-started/installation.md | 116 ++++ docs/getting-started/quick-start.md | 205 ++++++ docs/operations/monitoring.md | 353 ++++++++++ docs/operations/running-nodes.md | 383 +++++++++++ docs/operations/troubleshooting.md | 538 ++++++++++++++++ docs/operations/updates.md | 503 +++++++++++++++ docs/package.json | 33 + docs/styles/website.css | 282 ++++++++ 20 files changed, 5205 insertions(+) create mode 100644 docs/.gitbook.yaml create mode 100644 docs/DEPLOYMENT.md create mode 100644 docs/README.md create mode 100644 docs/SUMMARY.md create mode 100644 docs/api-reference/commands.md create mode 100644 docs/api-reference/configuration-schema.md create mode 100644 docs/api-reference/environment-variables.md create mode 100644 docs/book.json create mode 100644 docs/client-management/adding-clients.md create mode 100644 docs/getting-started/configuration.md create mode 100644 docs/getting-started/hardware-requirements.md create mode 100644 docs/getting-started/installation.md create mode 100644 docs/getting-started/quick-start.md create mode 100644 docs/operations/monitoring.md create mode 100644 docs/operations/running-nodes.md create mode 100644 docs/operations/troubleshooting.md create mode 100644 docs/operations/updates.md create mode 100644 docs/package.json create mode 100644 docs/styles/website.css diff --git a/.gitignore b/.gitignore index 75713e0..2adc832 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,37 @@ starknode-kit.exe *.exe *.so *.dylib + +# Node.js dependencies +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +package-lock.json +yarn.lock + +# Documentation build outputs +docs/_book/ +docs/.gitbook/ +docs/dist/ +docs/build/ + +# IDE and editor files +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Temporary files +*.tmp +*.temp diff --git a/docs/.gitbook.yaml b/docs/.gitbook.yaml new file mode 100644 index 0000000..1681f65 --- /dev/null +++ b/docs/.gitbook.yaml @@ -0,0 +1,35 @@ +# GitBook configuration for Starknode Kit documentation + +root: ./ +structure: + readme: README.md + summary: SUMMARY.md + +plugins: + - search + - sharing + - fontsettings + - highlight + - livereload + - expandable-chapters + - anchors + - github + - edit-link + - copy-code-button + +pluginsConfig: + github: + url: https://github.com/thebuidl-grid/starknode-kit + edit-link: + base: https://github.com/thebuidl-grid/starknode-kit/edit/main/docs + label: Edit This Page + sharing: + facebook: false + twitter: true + google: false + weibo: false + instapaper: false + vk: false + all: + - twitter + - linkedin diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md new file mode 100644 index 0000000..d1b32aa --- /dev/null +++ b/docs/DEPLOYMENT.md @@ -0,0 +1,316 @@ +# Documentation Deployment Guide + +This guide covers how to deploy the Starknode Kit documentation using GitBook and other platforms. + +## GitBook Deployment + +### Option 1: GitBook.com (Recommended) + +1. **Create GitBook Account** + - Go to [GitBook.com](https://www.gitbook.com) + - Sign up with your GitHub account + +2. **Import Repository** + - Click "New Space" + - Select "Import from GitHub" + - Choose `thebuidl-grid/starknode-kit` + - Select the `docs` folder as the root + +3. **Configure Settings** + - Set title: "Starknode Kit Documentation" + - Set description: "Complete guide for Ethereum and Starknet node management" + - Enable public access + +4. **Custom Domain (Optional)** + - Go to Space Settings > Domains + - Add your custom domain (e.g., `docs.starknode-kit.com`) + - Update DNS records as instructed + +### Option 2: Self-Hosted GitBook + +1. **Install GitBook CLI** + ```bash + npm install -g gitbook-cli + ``` + +2. **Install Dependencies** + ```bash + cd docs + npm install + gitbook install + ``` + +3. **Build Documentation** + ```bash + gitbook build + ``` + +4. **Serve Locally** + ```bash + gitbook serve + ``` + +5. **Deploy to Web Server** + ```bash + # Copy built files to web server + rsync -av _book/ user@server:/var/www/docs/ + ``` + +## GitHub Pages Deployment + +### Automatic Deployment with GitHub Actions + +1. **Create GitHub Action** + ```yaml + # .github/workflows/docs.yml + name: Deploy Documentation + + on: + push: + branches: [ main ] + paths: [ 'docs/**' ] + + jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install GitBook + run: npm install -g gitbook-cli + + - name: Build Documentation + run: | + cd docs + gitbook install + gitbook build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/_book + ``` + +2. **Enable GitHub Pages** + - Go to repository Settings > Pages + - Select "GitHub Actions" as source + - The documentation will be available at `https://thebuidl-grid.github.io/starknode-kit` + +## Netlify Deployment + +1. **Connect Repository** + - Go to [Netlify](https://netlify.com) + - Connect your GitHub repository + +2. **Build Settings** + - Build command: `cd docs && gitbook build` + - Publish directory: `docs/_book` + +3. **Deploy** + - Netlify will automatically build and deploy + - Custom domain can be configured in site settings + +## Vercel Deployment + +1. **Install Vercel CLI** + ```bash + npm install -g vercel + ``` + +2. **Configure Project** + ```json + // vercel.json + { + "builds": [ + { + "src": "docs/package.json", + "use": "@vercel/static-build", + "config": { + "distDir": "_book" + } + } + ] + } + ``` + +3. **Deploy** + ```bash + cd docs + vercel --prod + ``` + +## Docker Deployment + +1. **Create Dockerfile** + ```dockerfile + FROM node:16-alpine + + WORKDIR /app + + # Install GitBook + RUN npm install -g gitbook-cli + + # Copy documentation + COPY docs/ ./docs/ + + # Build documentation + WORKDIR /app/docs + RUN gitbook install && gitbook build + + # Serve with nginx + FROM nginx:alpine + COPY --from=0 /app/docs/_book /usr/share/nginx/html + EXPOSE 80 + ``` + +2. **Build and Run** + ```bash + docker build -t starknode-kit-docs . + docker run -p 8080:80 starknode-kit-docs + ``` + +## Continuous Integration + +### GitHub Actions Workflow + +```yaml +name: Documentation CI/CD + +on: + push: + branches: [ main ] + paths: [ 'docs/**' ] + pull_request: + branches: [ main ] + paths: [ 'docs/**' ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install dependencies + run: | + cd docs + npm install + npm install -g gitbook-cli + + - name: Build documentation + run: | + cd docs + gitbook install + gitbook build + + - name: Test build + run: | + cd docs + ls -la _book/ + + deploy: + needs: test + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v3 + + - name: Deploy to production + run: | + # Add deployment commands here + echo "Deploying to production..." +``` + +## Monitoring and Analytics + +### Google Analytics + +Add to `book.json`: +```json +{ + "pluginsConfig": { + "google-analytics": { + "token": "GA_TRACKING_ID" + } + } +} +``` + +### Search Engine Optimization + +1. **Add meta tags** to `README.md` +2. **Create sitemap** for better indexing +3. **Use descriptive URLs** and headings +4. **Add structured data** for rich snippets + +## Maintenance + +### Regular Updates + +1. **Content Updates** + - Review and update documentation monthly + - Keep examples current with latest versions + - Update screenshots and diagrams + +2. **Technical Updates** + - Update GitBook plugins regularly + - Test builds on different platforms + - Monitor for broken links + +3. **Performance Monitoring** + - Monitor page load times + - Check for broken links + - Review user feedback + +### Backup Strategy + +1. **Repository Backup** + - Documentation is stored in Git repository + - Regular backups to multiple locations + +2. **Build Artifacts** + - Store built documentation as releases + - Keep multiple versions for rollback + +## Troubleshooting + +### Common Issues + +**Build Failures** +```bash +# Clear cache and rebuild +rm -rf node_modules +npm install +gitbook install +gitbook build +``` + +**Plugin Issues** +```bash +# Update plugins +gitbook update +``` + +**Deployment Issues** +- Check build logs +- Verify file permissions +- Test locally first + +## Getting Help + +For deployment issues: + +- Check GitBook documentation +- Review platform-specific guides +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..d394eff --- /dev/null +++ b/docs/README.md @@ -0,0 +1,75 @@ +# Starknode Kit Documentation + +Welcome to the comprehensive documentation for **Starknode Kit** - a powerful CLI tool for setting up, managing, and maintaining Ethereum and Starknet nodes. + +## 🚀 Quick Start + +Get up and running with Starknode Kit in minutes: + +```bash +# Install Starknode Kit +curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh | bash + +# Initialize configuration +starknode-kit init + +# Add your first client +starknode-kit add --consensus_client lighthouse --execution_client geth + +# Start your node +starknode-kit start +``` + +## 📚 Documentation Structure + +### Getting Started +- [Installation and Setup](getting-started/installation.md) +- [Hardware Requirements](getting-started/hardware-requirements.md) +- [Quick Start Guide](getting-started/quick-start.md) +- [Configuration](getting-started/configuration.md) + +### Client Management +- [Adding Clients](client-management/adding-clients.md) +- [Ethereum Clients](client-management/ethereum-clients.md) +- [Starknet Clients](client-management/starknet-clients.md) +- [Client Configuration](client-management/client-configuration.md) + +### Operations +- [Running Nodes](operations/running-nodes.md) +- [Monitoring](operations/monitoring.md) +- [Updates and Maintenance](operations/updates.md) +- [Troubleshooting](operations/troubleshooting.md) + +### Advanced Topics +- [Network Configuration](advanced/network-configuration.md) +- [Performance Optimization](advanced/performance.md) +- [Security Best Practices](advanced/security.md) +- [Custom Configurations](advanced/custom-configurations.md) + +### API Reference +- [Command Reference](api-reference/commands.md) +- [Configuration Schema](api-reference/configuration-schema.md) +- [Environment Variables](api-reference/environment-variables.md) + +## 🌟 Key Features + +- **🔧 Multi-Client Support**: Manage Ethereum (Geth, Reth, Lighthouse, Prysm) and Starknet (Juno) clients +- **⚡ Easy Setup**: One-command installation and configuration +- **📊 Real-time Monitoring**: Built-in monitoring dashboard +- **🔄 Auto-Updates**: Automatic client updates and maintenance +- **🌐 Network Flexibility**: Support for mainnet, testnets, and custom networks +- **🛡️ Production Ready**: Designed for both development and production environments + +## 🤝 Community and Support + +- **Telegram**: [Join our community](https://t.me/+SCPbza9fk8dkYWI0) +- **GitHub**: [Report issues and contribute](https://github.com/thebuidl-grid/starknode-kit) +- **Documentation**: This comprehensive guide + +## 📄 License + +This project is licensed under the MIT License - see the [LICENSE](https://github.com/thebuidl-grid/starknode-kit/blob/main/LICENSE) file for details. + +--- + +*Built with ❤️ by The Buidl Grid* \ No newline at end of file diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..fa70d8b --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,35 @@ +# Table of Contents + +## Getting Started + +* [Installation and Setup](getting-started/installation.md) +* [Hardware Requirements](getting-started/hardware-requirements.md) +* [Quick Start Guide](getting-started/quick-start.md) +* [Configuration](getting-started/configuration.md) + +## Client Management + +* [Adding Clients](client-management/adding-clients.md) +* [Ethereum Clients](client-management/ethereum-clients.md) +* [Starknet Clients](client-management/starknet-clients.md) +* [Client Configuration](client-management/client-configuration.md) + +## Operations + +* [Running Nodes](operations/running-nodes.md) +* [Monitoring](operations/monitoring.md) +* [Updates and Maintenance](operations/updates.md) +* [Troubleshooting](operations/troubleshooting.md) + +## Advanced Topics + +* [Network Configuration](advanced/network-configuration.md) +* [Performance Optimization](advanced/performance.md) +* [Security Best Practices](advanced/security.md) +* [Custom Configurations](advanced/custom-configurations.md) + +## API Reference + +* [Command Reference](api-reference/commands.md) +* [Configuration Schema](api-reference/configuration-schema.md) +* [Environment Variables](api-reference/environment-variables.md) diff --git a/docs/api-reference/commands.md b/docs/api-reference/commands.md new file mode 100644 index 0000000..ed53018 --- /dev/null +++ b/docs/api-reference/commands.md @@ -0,0 +1,473 @@ +# Command Reference + +Complete reference for all Starknode Kit commands, flags, and options. + +## Global Commands + +### `starknode-kit --help` + +Display help information for the Starknode Kit CLI. + +```bash +starknode-kit --help +``` + +**Output**: Shows available commands and global flags. + +--- + +## Core Commands + +### `init` + +Create a default configuration file. + +```bash +starknode-kit init +``` + +**Description**: Initializes a new configuration file with default settings. + +**Files Created**: +- `~/.starknode-kit/config.yaml` + +**Example**: +```bash +starknode-kit init +# Creates default configuration file +``` + +--- + +### `add` + +Add an Ethereum or Starknet client to the configuration. + +```bash +starknode-kit add [flags] +``` + +**Flags**: +- `-e, --execution_client string`: Execution client (geth, reth) +- `-c, --consensus_client string`: Consensus client (lighthouse, prysm) +- `-s, --starknet_client string`: Starknet client (juno) + +**Examples**: +```bash +# Add execution client +starknode-kit add --execution_client geth + +# Add consensus client +starknode-kit add --consensus_client lighthouse + +# Add Starknet client +starknode-kit add --starknet_client juno + +# Add client pair +starknode-kit add --execution_client geth --consensus_client lighthouse + +# Add all clients +starknode-kit add --execution_client geth --consensus_client lighthouse --starknet_client juno +``` + +--- + +### `config` + +Show and modify the current configuration. + +```bash +starknode-kit config [flags] [options] +``` + +**Flags**: +- `-n, --network string`: Set network (mainnet, sepolia, holesky) +- `--validate`: Validate configuration file + +**Options**: +- `el client= port=`: Configure execution client +- `cl client= port=`: Configure consensus client +- `starknet client= port=`: Configure Starknet client + +**Examples**: +```bash +# Show current configuration +starknode-kit config + +# Set network +starknode-kit config -n sepolia + +# Configure execution client +starknode-kit config el client=geth port=8545,8546 + +# Configure consensus client +starknode-kit config cl client=lighthouse port=9000,9001 + +# Validate configuration +starknode-kit config --validate +``` + +--- + +### `start` + +Start the configured Ethereum clients. + +```bash +starknode-kit start +``` + +**Description**: Starts execution and consensus clients. Does not start Starknet clients. + +**Examples**: +```bash +# Start all configured clients +starknode-kit start +``` + +**Note**: Use `starknode-kit run juno` to start Starknet clients. + +--- + +### `stop` + +Stop all running clients. + +```bash +starknode-kit stop +``` + +**Description**: Gracefully stops all running clients. + +**Examples**: +```bash +# Stop all clients +starknode-kit stop +``` + +--- + +### `run` + +Run local Starknet infrastructure services. + +```bash +starknode-kit run +``` + +**Subcommands**: +- `juno`: Run a Juno Starknet node + +**Examples**: +```bash +# Run Juno node +starknode-kit run juno +``` + +--- + +### `monitor` + +Launch the real-time monitoring dashboard. + +```bash +starknode-kit monitor [flags] +``` + +**Flags**: +- `--interval duration`: Refresh interval (default: 5s) +- `--basic`: Basic monitoring mode +- `--restart`: Restart monitoring service + +**Examples**: +```bash +# Start monitoring dashboard +starknode-kit monitor + +# Custom refresh interval +starknode-kit monitor --interval 10s + +# Basic monitoring mode +starknode-kit monitor --basic +``` + +--- + +### `remove` + +Remove a configured client. + +```bash +starknode-kit remove [flags] +``` + +**Flags**: +- `-e, --execution_client string`: Remove execution client +- `-c, --consensus_client string`: Remove consensus client +- `-s, --starknet_client string`: Remove Starknet client + +**Examples**: +```bash +# Remove execution client +starknode-kit remove --execution_client geth + +# Remove consensus client +starknode-kit remove --consensus_client lighthouse + +# Remove Starknet client +starknode-kit remove --starknet_client juno +``` + +--- + +### `update` + +Check for and install client updates. + +```bash +starknode-kit update [flags] +``` + +**Flags**: +- `-e, --execution_client string`: Update specific execution client +- `-c, --consensus_client string`: Update specific consensus client +- `-s, --starknet_client string`: Update specific Starknet client + +**Examples**: +```bash +# Update all clients +starknode-kit update + +# Update specific client +starknode-kit update --execution_client geth +starknode-kit update --consensus_client lighthouse +starknode-kit update --starknet_client juno +``` + +--- + +## Utility Commands + +### `completion` + +Generate shell completion scripts. + +```bash +starknode-kit completion +``` + +**Supported Shells**: +- `bash` +- `zsh` +- `fish` +- `powershell` + +**Examples**: +```bash +# Generate bash completion +starknode-kit completion bash + +# Install bash completion +starknode-kit completion bash > /etc/bash_completion.d/starknode-kit + +# Generate zsh completion +starknode-kit completion zsh > ~/.zsh/completions/_starknode-kit +``` + +--- + +## Global Flags + +### `-h, --help` + +Show help information for any command. + +```bash +starknode-kit --help +``` + +**Examples**: +```bash +starknode-kit add --help +starknode-kit config --help +starknode-kit start --help +``` + +--- + +## Command Combinations + +### Complete Setup Workflow + +```bash +# 1. Initialize configuration +starknode-kit init + +# 2. Add clients +starknode-kit add --execution_client geth --consensus_client lighthouse --starknet_client juno + +# 3. Configure network +starknode-kit config -n mainnet + +# 4. Start Ethereum clients +starknode-kit start + +# 5. Start Starknet client (in separate terminal) +starknode-kit run juno + +# 6. Monitor everything +starknode-kit monitor +``` + +### Development Workflow + +```bash +# 1. Set up testnet +starknode-kit config -n sepolia + +# 2. Add development clients +starknode-kit add --execution_client geth --consensus_client prysm + +# 3. Start clients +starknode-kit start + +# 4. Monitor progress +starknode-kit monitor +``` + +### Maintenance Workflow + +```bash +# 1. Check for updates +starknode-kit update + +# 2. Stop clients +starknode-kit stop + +# 3. Update clients +starknode-kit update + +# 4. Restart clients +starknode-kit start + +# 5. Verify status +starknode-kit monitor +``` + +--- + +## Exit Codes + +| Code | Description | +|------|-------------| +| `0` | Success | +| `1` | General error | +| `2` | Configuration error | +| `3` | Client error | +| `4` | Network error | +| `5` | Permission error | + +--- + +## Environment Variables + +### Configuration + +- `STARKNODE_CONFIG_PATH`: Custom config file path +- `STARKNODE_LOG_LEVEL`: Log level (debug, info, warn, error) +- `STARKNODE_DATA_DIR`: Custom data directory + +### Client Configuration + +- `GETH_CACHE`: Geth cache size +- `LIGHTHOUSE_MAX_PEERS`: Lighthouse max peers +- `JUNO_ETH_NODE`: Juno Ethereum node URL + +**Examples**: +```bash +# Set custom config path +export STARKNODE_CONFIG_PATH=/custom/path/config.yaml + +# Set log level +export STARKNODE_LOG_LEVEL=debug + +# Set Geth cache +export GETH_CACHE=4096 +``` + +--- + +## Configuration File Format + +The configuration file is in YAML format: + +```yaml +network: mainnet +execution_client: + name: geth + port: [8545, 8546] + execution_type: full + additional_args: [] +consensus_client: + name: lighthouse + port: [9000, 9001] + consensus_checkpoint: "" + additional_args: [] +starknet_client: + name: juno + port: [6060, 6061] + eth_node_url: "http://localhost:8545" + additional_args: [] +``` + +--- + +## Troubleshooting Commands + +### Debug Information + +```bash +# Show detailed configuration +starknode-kit config --validate + +# Check client status +starknode-kit config + +# Monitor with debug logs +starknode-kit monitor --interval 1s +``` + +### Log Analysis + +```bash +# View client logs +tail -f ~/.starknode-kit/logs/geth.log +tail -f ~/.starknode-kit/logs/lighthouse.log +tail -f ~/.starknode-kit/logs/juno.log + +# Search for errors +grep -i error ~/.starknode-kit/logs/*.log +``` + +--- + +## Getting Help + +For command-specific help: + +```bash +# General help +starknode-kit --help + +# Command help +starknode-kit --help + +# Subcommand help +starknode-kit run --help +``` + +For additional support: + +- Check the [Troubleshooting Guide](../operations/troubleshooting.md) +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/api-reference/configuration-schema.md b/docs/api-reference/configuration-schema.md new file mode 100644 index 0000000..0a6bac7 --- /dev/null +++ b/docs/api-reference/configuration-schema.md @@ -0,0 +1,605 @@ +# Configuration Schema + +Complete reference for the Starknode Kit configuration file format and all available options. + +## Configuration File Location + +- **Linux/macOS**: `~/.starknode-kit/config.yaml` +- **Windows**: `%USERPROFILE%\.starknode-kit\config.yaml` + +## Schema Overview + +```yaml +# Network configuration +network: string + +# Execution client configuration +execution_client: + name: string + port: [number, number] + execution_type: string + additional_args: [string] + env_vars: {string: string} + resource_limits: + memory: string + cpu: string + +# Consensus client configuration +consensus_client: + name: string + port: [number, number] + consensus_checkpoint: string + additional_args: [string] + env_vars: {string: string} + resource_limits: + memory: string + cpu: string + +# Starknet client configuration +starknet_client: + name: string + port: [number, number] + eth_node_url: string + additional_args: [string] + env_vars: {string: string} + resource_limits: + memory: string + cpu: string +``` + +## Network Configuration + +### `network` + +**Type**: `string` +**Required**: Yes +**Default**: `mainnet` + +**Valid Values**: +- `mainnet` - Ethereum mainnet +- `sepolia` - Sepolia testnet +- `holesky` - Holesky testnet +- `goerli` - Goerli testnet (deprecated) + +**Example**: +```yaml +network: mainnet +``` + +## Execution Client Configuration + +### `execution_client` + +**Type**: `object` +**Required**: No + +#### `execution_client.name` + +**Type**: `string` +**Required**: Yes + +**Valid Values**: +- `geth` - Go Ethereum client +- `reth` - Rust Ethereum client + +**Example**: +```yaml +execution_client: + name: geth +``` + +#### `execution_client.port` + +**Type**: `[number, number]` +**Required**: No +**Default**: `[8545, 8546]` + +**Description**: HTTP and WebSocket RPC ports + +**Example**: +```yaml +execution_client: + port: [8545, 8546] +``` + +#### `execution_client.execution_type` + +**Type**: `string` +**Required**: No +**Default**: `full` + +**Valid Values**: +- `full` - Full node with recent state +- `archive` - Complete historical data +- `light` - Minimal data, relies on peers + +**Example**: +```yaml +execution_client: + execution_type: full +``` + +#### `execution_client.additional_args` + +**Type**: `[string]` +**Required**: No +**Default**: `[]` + +**Description**: Additional command line arguments + +**Example**: +```yaml +execution_client: + additional_args: + - "--maxpeers" + - "50" + - "--cache" + - "4096" +``` + +#### `execution_client.env_vars` + +**Type**: `{string: string}` +**Required**: No +**Default**: `{}` + +**Description**: Environment variables for the client + +**Example**: +```yaml +execution_client: + env_vars: + GETH_CACHE: "4096" + GETH_MAXPEERS: "50" +``` + +#### `execution_client.resource_limits` + +**Type**: `object` +**Required**: No + +##### `execution_client.resource_limits.memory` + +**Type**: `string` +**Required**: No + +**Description**: Memory limit (e.g., "8Gi", "4G") + +**Example**: +```yaml +execution_client: + resource_limits: + memory: "8Gi" +``` + +##### `execution_client.resource_limits.cpu` + +**Type**: `string` +**Required**: No + +**Description**: CPU limit (e.g., "4", "2.5") + +**Example**: +```yaml +execution_client: + resource_limits: + cpu: "4" +``` + +## Consensus Client Configuration + +### `consensus_client` + +**Type**: `object` +**Required**: No + +#### `consensus_client.name` + +**Type**: `string` +**Required**: Yes + +**Valid Values**: +- `lighthouse` - Rust-based consensus client +- `prysm` - Go-based consensus client + +**Example**: +```yaml +consensus_client: + name: lighthouse +``` + +#### `consensus_client.port` + +**Type**: `[number, number]` +**Required**: No +**Default**: `[9000, 9001]` (Lighthouse), `[13000, 3500]` (Prysm) + +**Description**: P2P and HTTP API ports + +**Example**: +```yaml +consensus_client: + port: [9000, 9001] +``` + +#### `consensus_client.consensus_checkpoint` + +**Type**: `string` +**Required**: No +**Default**: `""` + +**Description**: Checkpoint URL for faster sync + +**Example**: +```yaml +consensus_client: + consensus_checkpoint: "https://mainnet.checkpoint.sigp.io" +``` + +#### `consensus_client.additional_args` + +**Type**: `[string]` +**Required**: No +**Default**: `[]` + +**Description**: Additional command line arguments + +**Example**: +```yaml +consensus_client: + additional_args: + - "--max-peers" + - "50" + - "--target-peers" + - "25" +``` + +#### `consensus_client.env_vars` + +**Type**: `{string: string}` +**Required**: No +**Default**: `{}` + +**Description**: Environment variables for the client + +**Example**: +```yaml +consensus_client: + env_vars: + LIGHTHOUSE_MAX_PEERS: "50" + LIGHTHOUSE_TARGET_PEERS: "25" +``` + +#### `consensus_client.resource_limits` + +**Type**: `object` +**Required**: No + +##### `consensus_client.resource_limits.memory` + +**Type**: `string` +**Required**: No + +**Description**: Memory limit (e.g., "4Gi", "2G") + +**Example**: +```yaml +consensus_client: + resource_limits: + memory: "4Gi" +``` + +##### `consensus_client.resource_limits.cpu` + +**Type**: `string` +**Required**: No + +**Description**: CPU limit (e.g., "2", "1.5") + +**Example**: +```yaml +consensus_client: + resource_limits: + cpu: "2" +``` + +## Starknet Client Configuration + +### `starknet_client` + +**Type**: `object` +**Required**: No + +#### `starknet_client.name` + +**Type**: `string` +**Required**: Yes + +**Valid Values**: +- `juno` - Go-based Starknet full node + +**Example**: +```yaml +starknet_client: + name: juno +``` + +#### `starknet_client.port` + +**Type**: `[number, number]` +**Required**: No +**Default**: `[6060, 6061]` + +**Description**: HTTP and WebSocket RPC ports + +**Example**: +```yaml +starknet_client: + port: [6060, 6061] +``` + +#### `starknet_client.eth_node_url` + +**Type**: `string` +**Required**: Yes + +**Description**: Ethereum node URL for L1 verification + +**Example**: +```yaml +starknet_client: + eth_node_url: "http://localhost:8545" +``` + +#### `starknet_client.additional_args` + +**Type**: `[string]` +**Required**: No +**Default**: `[]` + +**Description**: Additional command line arguments + +**Example**: +```yaml +starknet_client: + additional_args: + - "--max-peers" + - "50" + - "--log-level" + - "info" +``` + +#### `starknet_client.env_vars` + +**Type**: `{string: string}` +**Required**: No +**Default**: `{}` + +**Description**: Environment variables for the client + +**Example**: +```yaml +starknet_client: + env_vars: + JUNO_MAX_PEERS: "50" + JUNO_LOG_LEVEL: "info" +``` + +#### `starknet_client.resource_limits` + +**Type**: `object` +**Required**: No + +##### `starknet_client.resource_limits.memory` + +**Type**: `string` +**Required**: No + +**Description**: Memory limit (e.g., "4Gi", "2G") + +**Example**: +```yaml +starknet_client: + resource_limits: + memory: "4Gi" +``` + +##### `starknet_client.resource_limits.cpu` + +**Type**: `string` +**Required**: No + +**Description**: CPU limit (e.g., "2", "1.5") + +**Example**: +```yaml +starknet_client: + resource_limits: + cpu: "2" +``` + +## Complete Configuration Examples + +### Development Setup + +```yaml +network: sepolia +execution_client: + name: geth + port: [8545, 8546] + execution_type: full + additional_args: + - "--maxpeers" + - "25" + - "--cache" + - "2048" +consensus_client: + name: lighthouse + port: [9000, 9001] + additional_args: + - "--max-peers" + - "25" +starknet_client: + name: juno + port: [6060, 6061] + eth_node_url: "http://localhost:8545" + additional_args: + - "--max-peers" + - "25" +``` + +### Production Setup + +```yaml +network: mainnet +execution_client: + name: reth + port: [8545, 8546] + execution_type: full + additional_args: + - "--max-peers" + - "100" + - "--cache" + - "8192" + resource_limits: + memory: "16Gi" + cpu: "8" +consensus_client: + name: lighthouse + port: [9000, 9001] + consensus_checkpoint: "https://mainnet.checkpoint.sigp.io" + additional_args: + - "--max-peers" + - "50" + - "--target-peers" + - "25" + resource_limits: + memory: "8Gi" + cpu: "4" +starknet_client: + name: juno + port: [6060, 6061] + eth_node_url: "http://localhost:8545" + additional_args: + - "--max-peers" + - "50" + resource_limits: + memory: "8Gi" + cpu: "4" +``` + +### Archive Node Setup + +```yaml +network: mainnet +execution_client: + name: geth + port: [8545, 8546] + execution_type: archive + additional_args: + - "--cache" + - "16384" + - "--maxpeers" + - "100" + resource_limits: + memory: "32Gi" + cpu: "16" +consensus_client: + name: lighthouse + port: [9000, 9001] + execution_type: archive + additional_args: + - "--max-peers" + - "50" + resource_limits: + memory: "16Gi" + cpu: "8" +``` + +## Validation Rules + +### Required Fields + +- `network` - Must be a valid network name +- `execution_client.name` - Must be a valid execution client +- `consensus_client.name` - Must be a valid consensus client +- `starknet_client.name` - Must be a valid Starknet client +- `starknet_client.eth_node_url` - Must be a valid URL + +### Port Validation + +- Ports must be in range 1024-65535 +- Ports must not conflict with system ports +- HTTP and WebSocket ports must be different + +### Resource Limits + +- Memory must be in format "XGi" or "XG" +- CPU must be a positive number +- Limits must not exceed system resources + +## Environment Variables + +### Configuration Override + +Environment variables can override configuration file settings: + +```bash +# Override network +export STARKNODE_NETWORK=sepolia + +# Override execution client +export STARKNODE_EXECUTION_CLIENT=geth + +# Override consensus client +export STARKNODE_CONSENSUS_CLIENT=lighthouse +``` + +### Client-Specific Variables + +```bash +# Geth variables +export GETH_CACHE=4096 +export GETH_MAXPEERS=50 + +# Lighthouse variables +export LIGHTHOUSE_MAX_PEERS=50 +export LIGHTHOUSE_TARGET_PEERS=25 + +# Juno variables +export JUNO_MAX_PEERS=50 +export JUNO_LOG_LEVEL=info +``` + +## Configuration Management + +### Validation + +```bash +# Validate configuration +starknode-kit config --validate +``` + +### Backup + +```bash +# Backup configuration +cp ~/.starknode-kit/config.yaml ~/.starknode-kit/config.yaml.backup +``` + +### Reset + +```bash +# Reset to defaults +rm ~/.starknode-kit/config.yaml +starknode-kit init +``` + +## Getting Help + +For configuration issues: + +- Check the [Troubleshooting Guide](../operations/troubleshooting.md) +- Review client-specific documentation +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/api-reference/environment-variables.md b/docs/api-reference/environment-variables.md new file mode 100644 index 0000000..9fbd1e7 --- /dev/null +++ b/docs/api-reference/environment-variables.md @@ -0,0 +1,323 @@ +# Environment Variables + +Complete reference for all environment variables used by Starknode Kit and its clients. + +## Starknode Kit Variables + +### Configuration + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `STARKNODE_CONFIG_PATH` | Custom config file path | `~/.starknode-kit/config.yaml` | `/custom/path/config.yaml` | +| `STARKNODE_LOG_LEVEL` | Log level for Starknode Kit | `info` | `debug`, `info`, `warn`, `error` | +| `STARKNODE_DATA_DIR` | Custom data directory | `~/.starknode-kit/` | `/custom/data/path/` | +| `STARKNODE_NETWORK` | Override network setting | From config | `mainnet`, `sepolia`, `holesky` | +| `STARKNODE_EXECUTION_CLIENT` | Override execution client | From config | `geth`, `reth` | +| `STARKNODE_CONSENSUS_CLIENT` | Override consensus client | From config | `lighthouse`, `prysm` | +| `STARKNODE_STARKNET_CLIENT` | Override Starknet client | From config | `juno` | + +### Monitoring + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `STARKNODE_MONITOR_INTERVAL` | Monitoring refresh interval | `5s` | `10s`, `30s` | +| `STARKNODE_MONITOR_LOG_LEVEL` | Monitoring log level | `info` | `debug`, `info`, `warn` | +| `STARKNODE_MONITOR_METRICS` | Enable metrics collection | `true` | `true`, `false` | +| `STARKNODE_MONITOR_BASIC` | Use basic monitoring mode | `false` | `true`, `false` | + +## Execution Client Variables + +### Geth Variables + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `GETH_CACHE` | Memory cache size (MB) | `1024` | `4096`, `8192` | +| `GETH_MAXPEERS` | Maximum number of peers | `50` | `100`, `25` | +| `GETH_LIGHTKDF` | Use light KDF for key derivation | `false` | `true`, `false` | +| `GETH_NETWORKID` | Network ID | `1` (mainnet) | `11155111` (sepolia) | +| `GETH_DATADIR` | Data directory | `~/.starknode-kit/data/geth/` | `/custom/path/` | +| `GETH_HTTP_PORT` | HTTP RPC port | `8545` | `8547` | +| `GETH_WS_PORT` | WebSocket RPC port | `8546` | `8548` | +| `GETH_P2P_PORT` | P2P networking port | `30303` | `30305` | +| `GETH_HTTP_ADDR` | HTTP RPC address | `localhost` | `0.0.0.0` | +| `GETH_WS_ADDR` | WebSocket RPC address | `localhost` | `0.0.0.0` | +| `GETH_HTTP_API` | HTTP RPC API modules | `eth,net,web3` | `eth,net,web3,admin` | +| `GETH_WS_API` | WebSocket RPC API modules | `eth,net,web3` | `eth,net,web3,admin` | +| `GETH_HTTP_CORS` | HTTP RPC CORS origins | `*` | `http://localhost:3000` | +| `GETH_WS_ORIGINS` | WebSocket RPC origins | `*` | `http://localhost:3000` | +| `GETH_HTTP_VHOSTS` | HTTP RPC virtual hosts | `localhost` | `localhost,example.com` | +| `GETH_WS_VHOSTS` | WebSocket RPC virtual hosts | `localhost` | `localhost,example.com` | +| `GETH_METRICS` | Enable metrics | `false` | `true`, `false` | +| `GETH_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | +| `GETH_METRICS_PORT` | Metrics port | `6060` | `6061` | +| `GETH_PPROF` | Enable pprof | `false` | `true`, `false` | +| `GETH_PPROF_ADDR` | pprof address | `127.0.0.1` | `0.0.0.0` | +| `GETH_PPROF_PORT` | pprof port | `6060` | `6061` | + +### Reth Variables + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `RETH_DATADIR` | Data directory | `~/.starknode-kit/data/reth/` | `/custom/path/` | +| `RETH_HTTP_PORT` | HTTP RPC port | `8545` | `8547` | +| `RETH_WS_PORT` | WebSocket RPC port | `8546` | `8548` | +| `RETH_P2P_PORT` | P2P networking port | `30303` | `30305` | +| `RETH_HTTP_ADDR` | HTTP RPC address | `127.0.0.1` | `0.0.0.0` | +| `RETH_WS_ADDR` | WebSocket RPC address | `127.0.0.1` | `0.0.0.0` | +| `RETH_MAX_PEERS` | Maximum number of peers | `50` | `100`, `25` | +| `RETH_TARGET_PEERS` | Target number of peers | `25` | `50`, `15` | +| `RETH_CACHE_SIZE` | Cache size (MB) | `1024` | `4096`, `8192` | +| `RETH_NETWORK` | Network name | `mainnet` | `sepolia`, `holesky` | +| `RETH_CHAIN` | Chain specification | `mainnet` | `sepolia`, `holesky` | +| `RETH_HTTP_CORS` | HTTP RPC CORS origins | `*` | `http://localhost:3000` | +| `RETH_WS_ORIGINS` | WebSocket RPC origins | `*` | `http://localhost:3000` | +| `RETH_METRICS` | Enable metrics | `false` | `true`, `false` | +| `RETH_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | +| `RETH_METRICS_PORT` | Metrics port | `9001` | `9002` | + +## Consensus Client Variables + +### Lighthouse Variables + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `LIGHTHOUSE_DATADIR` | Data directory | `~/.starknode-kit/data/lighthouse/` | `/custom/path/` | +| `LIGHTHOUSE_P2P_PORT` | P2P networking port | `9000` | `9002` | +| `LIGHTHOUSE_HTTP_PORT` | HTTP API port | `9001` | `9003` | +| `LIGHTHOUSE_P2P_ADDR` | P2P address | `0.0.0.0` | `127.0.0.1` | +| `LIGHTHOUSE_HTTP_ADDR` | HTTP API address | `127.0.0.1` | `0.0.0.0` | +| `LIGHTHOUSE_MAX_PEERS` | Maximum number of peers | `50` | `100`, `25` | +| `LIGHTHOUSE_TARGET_PEERS` | Target number of peers | `25` | `50`, `15` | +| `LIGHTHOUSE_NETWORK` | Network name | `mainnet` | `sepolia`, `holesky` | +| `LIGHTHOUSE_CHECKPOINT_SYNC` | Checkpoint sync URL | `""` | `https://mainnet.checkpoint.sigp.io` | +| `LIGHTHOUSE_HTTP_CORS` | HTTP API CORS origins | `*` | `http://localhost:3000` | +| `LIGHTHOUSE_METRICS` | Enable metrics | `false` | `true`, `false` | +| `LIGHTHOUSE_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | +| `LIGHTHOUSE_METRICS_PORT` | Metrics port | `5054` | `5055` | +| `LIGHTHOUSE_LOG_LEVEL` | Log level | `info` | `debug`, `warn`, `error` | +| `LIGHTHOUSE_LOG_COLOR` | Colored log output | `true` | `true`, `false` | +| `LIGHTHOUSE_LOG_FILE` | Log file path | `~/.starknode-kit/logs/lighthouse.log` | `/custom/path/log.log` | + +### Prysm Variables + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `PRYSM_DATADIR` | Data directory | `~/.starknode-kit/data/prysm/` | `/custom/path/` | +| `PRYSM_P2P_PORT` | P2P networking port | `13000` | `13002` | +| `PRYSM_HTTP_PORT` | HTTP API port | `3500` | `3502` | +| `PRYSM_P2P_ADDR` | P2P address | `0.0.0.0` | `127.0.0.1` | +| `PRYSM_HTTP_ADDR` | HTTP API address | `127.0.0.1` | `0.0.0.0` | +| `PRYSM_MAX_PEERS` | Maximum number of peers | `50` | `100`, `25` | +| `PRYSM_TARGET_PEERS` | Target number of peers | `25` | `50`, `15` | +| `PRYSM_NETWORK` | Network name | `mainnet` | `sepolia`, `holesky` | +| `PRYSM_CHECKPOINT_SYNC` | Checkpoint sync URL | `""` | `https://beaconstate.info/` | +| `PRYSM_HTTP_CORS` | HTTP API CORS origins | `*` | `http://localhost:3000` | +| `PRYSM_METRICS` | Enable metrics | `false` | `true`, `false` | +| `PRYSM_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | +| `PRYSM_METRICS_PORT` | Metrics port | `8080` | `8081` | +| `PRYSM_LOG_LEVEL` | Log level | `info` | `debug`, `warn`, `error` | +| `PRYSM_LOG_FORMAT` | Log format | `text` | `text`, `json` | +| `PRYSM_LOG_FILE` | Log file path | `~/.starknode-kit/logs/prysm.log` | `/custom/path/log.log` | + +## Starknet Client Variables + +### Juno Variables + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `JUNO_DATADIR` | Data directory | `~/.starknode-kit/data/juno/` | `/custom/path/` | +| `JUNO_HTTP_PORT` | HTTP RPC port | `6060` | `6062` | +| `JUNO_WS_PORT` | WebSocket RPC port | `6061` | `6063` | +| `JUNO_HTTP_ADDR` | HTTP RPC address | `127.0.0.1` | `0.0.0.0` | +| `JUNO_WS_ADDR` | WebSocket RPC address | `127.0.0.1` | `0.0.0.0` | +| `JUNO_ETH_NODE` | Ethereum node URL | `http://localhost:8545` | `https://eth-mainnet.alchemyapi.io/v2/KEY` | +| `JUNO_MAX_PEERS` | Maximum number of peers | `50` | `100`, `25` | +| `JUNO_TARGET_PEERS` | Target number of peers | `25` | `50`, `15` | +| `JUNO_NETWORK` | Network name | `mainnet` | `sepolia`, `holesky` | +| `JUNO_CHAIN` | Chain specification | `mainnet` | `sepolia`, `holesky` | +| `JUNO_HTTP_CORS` | HTTP RPC CORS origins | `*` | `http://localhost:3000` | +| `JUNO_WS_ORIGINS` | WebSocket RPC origins | `*` | `http://localhost:3000` | +| `JUNO_METRICS` | Enable metrics | `false` | `true`, `false` | +| `JUNO_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | +| `JUNO_METRICS_PORT` | Metrics port | `9090` | `9091` | +| `JUNO_LOG_LEVEL` | Log level | `info` | `debug`, `warn`, `error` | +| `JUNO_LOG_COLOR` | Colored log output | `true` | `true`, `false` | +| `JUNO_LOG_FILE` | Log file path | `~/.starknode-kit/logs/juno.log` | `/custom/path/log.log` | +| `JUNO_DB_PATH` | Database path | `~/.starknode-kit/data/juno/db/` | `/custom/db/path/` | +| `JUNO_CACHE_SIZE` | Cache size (MB) | `1024` | `4096`, `8192` | +| `JUNO_SYNC_MODE` | Sync mode | `full` | `full`, `light` | +| `JUNO_VERIFY_L1` | Verify L1 state | `true` | `true`, `false` | + +## System Variables + +### Resource Limits + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `STARKNODE_MEMORY_LIMIT` | Total memory limit | `16Gi` | `32Gi`, `8Gi` | +| `STARKNODE_CPU_LIMIT` | Total CPU limit | `4` | `8`, `2` | +| `STARKNODE_DISK_LIMIT` | Disk usage limit | `2Ti` | `4Ti`, `1Ti` | + +### Network + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `STARKNODE_NETWORK_INTERFACE` | Network interface | `auto` | `eth0`, `wlan0` | +| `STARKNODE_BANDWIDTH_LIMIT` | Bandwidth limit | `unlimited` | `100Mbps`, `1Gbps` | +| `STARKNODE_FIREWALL` | Enable firewall | `false` | `true`, `false` | + +### Security + +| Variable | Description | Default | Example | +|----------|-------------|---------|---------| +| `STARKNODE_SSL_CERT` | SSL certificate path | `""` | `/path/to/cert.pem` | +| `STARKNODE_SSL_KEY` | SSL private key path | `""` | `/path/to/key.pem` | +| `STARKNODE_AUTH_TOKEN` | Authentication token | `""` | `your-secret-token` | +| `STARKNODE_RATE_LIMIT` | Rate limit (req/min) | `1000` | `500`, `2000` | + +## Usage Examples + +### Development Environment + +```bash +# Set development network +export STARKNODE_NETWORK=sepolia + +# Configure for development +export GETH_CACHE=2048 +export GETH_MAXPEERS=25 +export LIGHTHOUSE_MAX_PEERS=25 +export JUNO_MAX_PEERS=25 + +# Enable debug logging +export STARKNODE_LOG_LEVEL=debug +export GETH_LOG_LEVEL=debug +export LIGHTHOUSE_LOG_LEVEL=debug +export JUNO_LOG_LEVEL=debug +``` + +### Production Environment + +```bash +# Set production network +export STARKNODE_NETWORK=mainnet + +# Configure for production +export GETH_CACHE=8192 +export GETH_MAXPEERS=100 +export LIGHTHOUSE_MAX_PEERS=50 +export JUNO_MAX_PEERS=50 + +# Enable metrics +export GETH_METRICS=true +export LIGHTHOUSE_METRICS=true +export JUNO_METRICS=true + +# Set resource limits +export STARKNODE_MEMORY_LIMIT=32Gi +export STARKNODE_CPU_LIMIT=8 +``` + +### High-Performance Setup + +```bash +# Use Reth for better performance +export STARKNODE_EXECUTION_CLIENT=reth + +# Configure for high performance +export RETH_CACHE_SIZE=16384 +export RETH_MAX_PEERS=100 +export LIGHTHOUSE_MAX_PEERS=50 +export JUNO_MAX_PEERS=50 + +# Enable all optimizations +export RETH_METRICS=true +export LIGHTHOUSE_METRICS=true +export JUNO_METRICS=true +``` + +## Environment File + +Create a `.env` file in your home directory: + +```bash +# ~/.starknode-kit/.env +STARKNODE_NETWORK=mainnet +STARKNODE_LOG_LEVEL=info + +# Geth settings +GETH_CACHE=4096 +GETH_MAXPEERS=50 + +# Lighthouse settings +LIGHTHOUSE_MAX_PEERS=50 +LIGHTHOUSE_TARGET_PEERS=25 + +# Juno settings +JUNO_MAX_PEERS=50 +JUNO_ETH_NODE=http://localhost:8545 +``` + +Load environment variables: + +```bash +# Load from .env file +source ~/.starknode-kit/.env + +# Or use dotenv +export $(cat ~/.starknode-kit/.env | xargs) +``` + +## Validation + +### Check Environment Variables + +```bash +# List all Starknode Kit variables +env | grep STARKNODE + +# List all client variables +env | grep -E "(GETH|LIGHTHOUSE|JUNO|RETH|PRYSM)" +``` + +### Validate Configuration + +```bash +# Validate with environment variables +starknode-kit config --validate + +# Check if variables are being used +starknode-kit config +``` + +## Best Practices + +### Security + +- Never commit `.env` files to version control +- Use strong authentication tokens +- Restrict network access in production +- Regularly rotate secrets + +### Performance + +- Set appropriate cache sizes for your hardware +- Monitor resource usage +- Adjust peer counts based on network conditions +- Use metrics to optimize settings + +### Maintenance + +- Document custom environment variables +- Keep variables organized in `.env` files +- Test changes in development first +- Monitor for deprecated variables + +## Getting Help + +For environment variable issues: + +- Check the [Troubleshooting Guide](../operations/troubleshooting.md) +- Review client-specific documentation +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/book.json b/docs/book.json new file mode 100644 index 0000000..981927c --- /dev/null +++ b/docs/book.json @@ -0,0 +1,24 @@ +{ + "title": "Starknode Kit Documentation", + "description": "Complete guide for setting up, managing, and maintaining Ethereum and Starknet nodes with Starknode Kit", + "author": "The Buidl Grid", + "language": "en", + "structure": { + "readme": "README.md", + "summary": "SUMMARY.md" + }, + "plugins": [ + "theme-default", + "search", + "fontsettings", + "highlight" + ], + "pluginsConfig": { + "theme-default": { + "showLevel": true, + "styles": { + "website": "styles/website.css" + } + } + } +} \ No newline at end of file diff --git a/docs/client-management/adding-clients.md b/docs/client-management/adding-clients.md new file mode 100644 index 0000000..94e8d8c --- /dev/null +++ b/docs/client-management/adding-clients.md @@ -0,0 +1,318 @@ +# Adding Clients + +This guide covers how to add and configure different types of clients (Ethereum execution, consensus, and Starknet) to your Starknode Kit setup. + +## Overview + +Starknode Kit supports three types of clients: + +- **Execution Clients**: Handle transaction execution and state management +- **Consensus Clients**: Handle block validation and consensus +- **Starknet Clients**: Handle Starknet L2 operations + +## Adding Execution Clients + +### Supported Execution Clients + +| Client | Language | Description | +|--------|----------|-------------| +| **Geth** | Go | Most popular Ethereum client | +| **Reth** | Rust | High-performance Rust implementation | + +### Add Geth + +```bash +starknode-kit add --execution_client geth +``` + +### Add Reth + +```bash +starknode-kit add --execution_client reth +``` + +### Execution Client Features + +**Geth**: +- Mature and stable +- Extensive documentation +- Large community support +- Good for most use cases + +**Reth**: +- High performance +- Modern architecture +- Fast sync capabilities +- Growing ecosystem + +## Adding Consensus Clients + +### Supported Consensus Clients + +| Client | Language | Description | +|--------|----------|-------------| +| **Lighthouse** | Rust | High-performance consensus client | +| **Prysm** | Go | Feature-rich consensus client | + +### Add Lighthouse + +```bash +starknode-kit add --consensus_client lighthouse +``` + +### Add Prysm + +```bash +starknode-kit add --consensus_client prysm +``` + +### Consensus Client Features + +**Lighthouse**: +- Fast sync performance +- Low resource usage +- Strong security focus +- Good for production + +**Prysm**: +- Rich feature set +- Web UI included +- Extensive tooling +- Good for development + +## Adding Starknet Clients + +### Supported Starknet Clients + +| Client | Language | Description | +|--------|----------|-------------| +| **Juno** | Go | Full Starknet node implementation | + +### Add Juno + +```bash +starknode-kit add --starknet_client juno +``` + +### Juno Features + +- Complete JSON-RPC support +- Fast synchronization +- Small database footprint +- WebSocket interface +- Production-ready + +## Adding Client Pairs + +### Complete Ethereum Setup + +Add both execution and consensus clients together: + +```bash +# Geth + Lighthouse +starknode-kit add --execution_client geth --consensus_client lighthouse + +# Reth + Prysm +starknode-kit add --execution_client reth --consensus_client prysm + +# Geth + Prysm +starknode-kit add --execution_client geth --consensus_client prysm +``` + +### Full Stack Setup + +Add all three client types: + +```bash +starknode-kit add --execution_client geth --consensus_client lighthouse --starknet_client juno +``` + +## Client Installation Process + +When you add a client, Starknode Kit: + +1. **Downloads** the client binary +2. **Installs** it to the appropriate location +3. **Configures** default settings +4. **Updates** your configuration file +5. **Validates** the installation + +### Installation Locations + +- **Linux/macOS**: `~/.starknode-kit/bin/` +- **Windows**: `%USERPROFILE%\.starknode-kit\bin\` + +## Configuration After Adding + +### View Added Clients + +```bash +# Show all configured clients +starknode-kit config + +# Show specific client type +starknode-kit config el # Execution clients +starknode-kit config cl # Consensus clients +starknode-kit config starknet # Starknet clients +``` + +### Customize Client Settings + +After adding, you can customize settings: + +```bash +# Change ports +starknode-kit config el client=geth port=8545,8546 + +# Set execution type +starknode-kit config el client=geth execution_type=archive + +# Add custom arguments +starknode-kit config el client=geth additional_args="--maxpeers,50,--cache,4096" +``` + +## Client Compatibility + +### Recommended Combinations + +**Production**: +- Geth + Lighthouse + Juno +- Reth + Lighthouse + Juno + +**Development**: +- Geth + Prysm + Juno +- Reth + Prysm + Juno + +**High Performance**: +- Reth + Lighthouse + Juno + +### Network Compatibility + +All clients support: +- Ethereum Mainnet +- Sepolia Testnet +- Holesky Testnet +- Custom networks + +## Troubleshooting Client Addition + +### Common Issues + +**Download Fails** +```bash +# Check internet connection +ping google.com + +# Check available disk space +df -h +``` + +**Permission Denied** +```bash +# Fix permissions +chmod +x ~/.starknode-kit/bin/* +``` + +**Client Already Exists** +```bash +# Remove existing client first +starknode-kit remove --execution_client geth + +# Then add again +starknode-kit add --execution_client geth +``` + +### Verification + +Verify client installation: + +```bash +# Check if binary exists +ls -la ~/.starknode-kit/bin/ + +# Test client version +~/.starknode-kit/bin/geth version +~/.starknode-kit/bin/lighthouse --version +~/.starknode-kit/bin/juno --version +``` + +## Client Updates + +### Check for Updates + +```bash +starknode-kit update +``` + +### Update Specific Client + +```bash +# Update all clients +starknode-kit update + +# Update specific client type +starknode-kit update --execution_client geth +starknode-kit update --consensus_client lighthouse +starknode-kit update --starknet_client juno +``` + +## Removing Clients + +### Remove Execution Client + +```bash +starknode-kit remove --execution_client geth +``` + +### Remove Consensus Client + +```bash +starknode-kit remove --consensus_client lighthouse +``` + +### Remove Starknet Client + +```bash +starknode-kit remove --starknet_client juno +``` + +### Remove All Clients + +```bash +starknode-kit remove --execution_client geth --consensus_client lighthouse --starknet_client juno +``` + +## Best Practices + +### Client Selection + +**For Beginners**: +- Start with Geth + Lighthouse +- Use default configurations +- Focus on stability + +**For Production**: +- Use Reth + Lighthouse for performance +- Configure resource limits +- Set up monitoring + +**For Development**: +- Use Geth + Prysm for features +- Enable debug logging +- Use testnets + +### Configuration Management + +- Keep configurations in version control +- Document custom settings +- Test changes on testnets first +- Monitor performance after changes + +## Getting Help + +For client-related issues: + +- Check the [Troubleshooting Guide](../operations/troubleshooting.md) +- Review client-specific documentation +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md new file mode 100644 index 0000000..9ef6861 --- /dev/null +++ b/docs/getting-started/configuration.md @@ -0,0 +1,361 @@ +# Configuration + +Starknode Kit uses a YAML configuration file to manage your node setup. This guide covers all configuration options and how to customize them for your needs. + +## Configuration File Location + +The configuration file is located at: +- **Linux/macOS**: `~/.starknode-kit/config.yaml` +- **Windows**: `%USERPROFILE%\.starknode-kit\config.yaml` + +## Configuration Structure + +```yaml +network: mainnet # Network to connect to +execution_client: + name: geth + port: [8545, 8546] + execution_type: full +consensus_client: + name: lighthouse + port: [9000, 9001] + consensus_checkpoint: "" +starknet_client: + name: juno + port: [6060, 6061] + eth_node_url: "http://localhost:8545" +``` + +## Network Configuration + +### Supported Networks + +| Network | Description | Use Case | +|---------|-------------|----------| +| `mainnet` | Ethereum mainnet | Production | +| `sepolia` | Ethereum testnet | Testing | +| `goerli` | Ethereum testnet (deprecated) | Legacy testing | +| `holesky` | Ethereum testnet | Testing | + +### Setting Network + +```bash +# Set network via command line +starknode-kit config -n sepolia + +# Or edit config file directly +network: sepolia +``` + +## Execution Client Configuration + +### Supported Clients + +- **Geth**: Go Ethereum client +- **Reth**: Rust Ethereum client + +### Configuration Options + +```yaml +execution_client: + name: geth # or reth + port: [8545, 8546] # [HTTP, WebSocket] + execution_type: full # full, archive, light + additional_args: [] # Custom command line arguments +``` + +### Execution Types + +| Type | Description | Storage | Sync Speed | +|------|-------------|---------|------------| +| `full` | Full node with recent state | ~1.5 TB | Fast | +| `archive` | Complete historical data | ~3+ TB | Slow | +| `light` | Minimal data, relies on peers | ~50 GB | Very Fast | + +### Port Configuration + +```bash +# Set custom ports +starknode-kit config el client=geth port=8545,8546 + +# Default ports: +# Geth: 8545 (HTTP), 8546 (WebSocket) +# Reth: 8545 (HTTP), 8546 (WebSocket) +``` + +## Consensus Client Configuration + +### Supported Clients + +- **Lighthouse**: Rust-based consensus client +- **Prysm**: Go-based consensus client + +### Configuration Options + +```yaml +consensus_client: + name: lighthouse # or prysm + port: [9000, 9001] # [P2P, HTTP API] + consensus_checkpoint: "" # Optional checkpoint URL + additional_args: [] # Custom command line arguments +``` + +### Checkpoint Sync + +Speed up initial sync using a trusted checkpoint: + +```yaml +consensus_client: + name: lighthouse + consensus_checkpoint: "https://mainnet.checkpoint.sigp.io" +``` + +**Available checkpoints**: +- Lighthouse: `https://mainnet.checkpoint.sigp.io` +- Prysm: `https://beaconstate.info/` + +### Port Configuration + +```bash +# Set custom ports +starknode-kit config cl client=lighthouse port=9000,9001 + +# Default ports: +# Lighthouse: 9000 (P2P), 9001 (HTTP API) +# Prysm: 13000 (P2P), 3500 (HTTP API) +``` + +## Starknet Client Configuration + +### Supported Clients + +- **Juno**: Go-based Starknet full node + +### Configuration Options + +```yaml +starknet_client: + name: juno + port: [6060, 6061] # [HTTP, WebSocket] + eth_node_url: "http://localhost:8545" # Ethereum node URL + additional_args: [] # Custom command line arguments +``` + +### Ethereum Node Connection + +Juno requires an Ethereum node to verify L1 state: + +```yaml +starknet_client: + name: juno + eth_node_url: "http://localhost:8545" # Local Geth/Reth + # or + eth_node_url: "https://eth-mainnet.alchemyapi.io/v2/YOUR_KEY" # External provider +``` + +### Port Configuration + +```bash +# Set custom ports +starknode-kit config starknet client=juno port=6060,6061 + +# Default ports: +# Juno: 6060 (HTTP), 6061 (WebSocket) +``` + +## Advanced Configuration + +### Custom Command Line Arguments + +Add custom arguments to any client: + +```yaml +execution_client: + name: geth + additional_args: + - "--maxpeers" + - "50" + - "--cache" + - "4096" + +consensus_client: + name: lighthouse + additional_args: + - "--max-peers" + - "50" + - "--target-peers" + - "25" +``` + +### Environment Variables + +Set environment variables for clients: + +```yaml +execution_client: + name: geth + env_vars: + GETH_CACHE: "4096" + GETH_MAXPEERS: "50" +``` + +### Resource Limits + +Configure resource limits: + +```yaml +execution_client: + name: geth + resource_limits: + memory: "8Gi" + cpu: "4" +``` + +## Configuration Management + +### View Current Configuration + +```bash +# Show current config +starknode-kit config + +# Show specific client config +starknode-kit config el +starknode-kit config cl +starknode-kit config starknet +``` + +### Edit Configuration + +```bash +# Edit config file directly +nano ~/.starknode-kit/config.yaml + +# Or use command line +starknode-kit config -n sepolia +starknode-kit config el client=reth port=8545,8546 +``` + +### Validate Configuration + +```bash +# Check if config is valid +starknode-kit config --validate +``` + +## Configuration Examples + +### Development Setup + +```yaml +network: sepolia +execution_client: + name: geth + port: [8545, 8546] + execution_type: full +consensus_client: + name: lighthouse + port: [9000, 9001] +starknet_client: + name: juno + port: [6060, 6061] + eth_node_url: "http://localhost:8545" +``` + +### Production Setup + +```yaml +network: mainnet +execution_client: + name: reth + port: [8545, 8546] + execution_type: full + additional_args: + - "--max-peers" + - "100" +consensus_client: + name: lighthouse + port: [9000, 9001] + consensus_checkpoint: "https://mainnet.checkpoint.sigp.io" + additional_args: + - "--max-peers" + - "50" +starknet_client: + name: juno + port: [6060, 6061] + eth_node_url: "http://localhost:8545" +``` + +### Archive Node Setup + +```yaml +network: mainnet +execution_client: + name: geth + port: [8545, 8546] + execution_type: archive + additional_args: + - "--cache" + - "8192" +consensus_client: + name: lighthouse + port: [9000, 9001] + execution_type: archive +``` + +## Troubleshooting Configuration + +### Common Issues + +**Invalid YAML Syntax** +```bash +# Validate YAML syntax +starknode-kit config --validate +``` + +**Port Conflicts** +```bash +# Check port usage +netstat -tulpn | grep :8545 +``` + +**Missing Dependencies** +```bash +# Check if clients are installed +starknode-kit config +``` + +### Configuration Validation + +The configuration is validated when you run commands. Common validation errors: + +- Invalid network name +- Unsupported client combinations +- Port conflicts +- Missing required fields + +## Best Practices + +### Security +- Use non-default ports in production +- Restrict RPC access to localhost +- Use strong authentication for external access + +### Performance +- Match execution type to your use case +- Use checkpoint sync for faster initial sync +- Configure appropriate resource limits + +### Reliability +- Use stable network configurations +- Set up monitoring for configuration changes +- Keep backups of working configurations + +## Getting Help + +For configuration issues: + +- Check the [Troubleshooting Guide](../operations/troubleshooting.md) +- Review client-specific documentation +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/getting-started/hardware-requirements.md b/docs/getting-started/hardware-requirements.md new file mode 100644 index 0000000..0150a69 --- /dev/null +++ b/docs/getting-started/hardware-requirements.md @@ -0,0 +1,193 @@ +# Hardware Requirements + +This guide outlines the hardware requirements for running Ethereum and Starknet nodes with Starknode Kit. Requirements vary depending on your use case, from casual development to production-grade operations. + +## Minimum Requirements + +### Development/Testing Environment + +- **CPU**: 4+ cores (Intel i5/AMD Ryzen 5 or better) +- **RAM**: 16 GB +- **Storage**: 1 TB NVMe SSD +- **Network**: Stable broadband connection (10+ Mbps) + +### Production Environment + +- **CPU**: 8+ cores (Intel i7/AMD Ryzen 7 or better) +- **RAM**: 32+ GB +- **Storage**: 2+ TB NVMe SSD with DRAM cache +- **Network**: Stable broadband connection (50+ Mbps) + +## Detailed Hardware Specifications + +### CPU Requirements + +**Recommended**: Intel i7/AMD Ryzen 7 or better +- Node operation doesn't require heavy CPU power +- The BG Client has run well on both i3 and i5 models +- **Avoid**: Celeron processors due to limitations + +**Why CPU matters**: +- Consensus client operations +- Block processing and validation +- Network protocol handling + +### Memory (RAM) Requirements + +**Minimum**: 16 GB +**Recommended**: 32+ GB +**Production**: 64+ GB + +**Memory usage breakdown**: +- Base system: ~4 GB +- Ethereum execution client: ~8-16 GB +- Consensus client: ~4-8 GB +- Starknet client (Juno): ~4-8 GB +- Operating system overhead: ~4 GB + +### Storage Requirements + +**Critical**: Use NVMe SSD with DRAM cache +**Avoid**: QLC (Quad-Level Cell) NAND architecture + +#### Storage Size Requirements + +| Network | Execution Client | Consensus Client | Total (Approx.) | +|---------|------------------|------------------|-----------------| +| Mainnet | 1.5 TB | 500 GB | 2+ TB | +| Sepolia | 200 GB | 50 GB | 300+ GB | +| Goerli | 300 GB | 100 GB | 500+ GB | + +#### Recommended SSDs + +See this [SSD List Gist](https://gist.github.com/bkase/fab02c5b3c404e9ef8e5c2071ac1558c) for tested options. + +**Key specifications to look for**: +- NVMe interface +- DRAM cache +- High endurance rating +- Good random read/write performance + +### Network Requirements + +**Bandwidth**: +- Development: 10+ Mbps +- Production: 50+ Mbps +- High-performance: 100+ Mbps + +**Latency**: +- Low latency connection preferred +- Stable connection more important than speed + +**Data usage**: +- Initial sync: 1-2 TB +- Daily operation: 10-50 GB + +## Hardware Recommendations by Use Case + +### Home Development Setup + +``` +CPU: Intel i5-12400 / AMD Ryzen 5 5600X +RAM: 32 GB DDR4 +Storage: 2 TB NVMe SSD (Samsung 980 Pro, WD Black SN850) +Network: 50+ Mbps broadband +``` + +### Production Validator + +``` +CPU: Intel i7-12700K / AMD Ryzen 7 5800X +RAM: 64 GB DDR4 +Storage: 4 TB NVMe SSD (Samsung 980 Pro, WD Black SN850) +Network: 100+ Mbps dedicated connection +``` + +### Enterprise/High-Performance + +``` +CPU: Intel i9-12900K / AMD Ryzen 9 5900X +RAM: 128 GB DDR4 +Storage: 8 TB NVMe SSD (Enterprise grade) +Network: 1 Gbps dedicated connection +``` + +## Cloud Provider Recommendations + +### AWS +- **Instance**: c6i.2xlarge or larger +- **Storage**: gp3 or io2 volumes +- **Network**: Enhanced networking enabled + +### Google Cloud +- **Instance**: c2-standard-8 or larger +- **Storage**: SSD persistent disks +- **Network**: Premium tier + +### Azure +- **Instance**: Standard_D8s_v3 or larger +- **Storage**: Premium SSD +- **Network**: Accelerated networking + +## Performance Optimization Tips + +### Storage Optimization +- Use separate drives for different clients +- Enable TRIM for SSD maintenance +- Monitor disk health regularly + +### Memory Optimization +- Enable swap space (8-16 GB) +- Monitor memory usage patterns +- Consider memory overcommit settings + +### Network Optimization +- Use wired connections when possible +- Configure QoS for node traffic +- Monitor bandwidth usage + +## Monitoring Hardware Health + +### Key Metrics to Monitor +- CPU usage and temperature +- Memory usage and swap usage +- Disk I/O and available space +- Network bandwidth and latency + +### Recommended Tools +- `htop` for system monitoring +- `iotop` for disk I/O monitoring +- `nethogs` for network monitoring +- `smartctl` for SSD health + +## Troubleshooting Hardware Issues + +### Common Problems + +**High CPU Usage** +- Check for stuck processes +- Verify client configurations +- Monitor system logs + +**Memory Issues** +- Check for memory leaks +- Adjust client memory limits +- Consider adding swap space + +**Storage Problems** +- Monitor disk space +- Check for disk errors +- Verify SSD health + +**Network Issues** +- Test connection stability +- Check firewall settings +- Verify port configurations + +## Getting Help + +For hardware-specific questions: + +- Check our [Troubleshooting Guide](../operations/troubleshooting.md) +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Review the [Rocket Pool Hardware Guide](https://docs.rocketpool.net/guides/node/hardware.html) for additional insights diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md new file mode 100644 index 0000000..996f39c --- /dev/null +++ b/docs/getting-started/installation.md @@ -0,0 +1,116 @@ +# Installation and Setup + +This guide will walk you through installing Starknode Kit on your system. We provide multiple installation methods to suit different preferences and environments. + +## Prerequisites + +Before installing Starknode Kit, ensure you have the following installed: + +- **Go**: Version 1.24 or later ([Download](https://go.dev/dl/)) +- **Rust**: For building Starknet clients ([Install Rust](https://rustup.rs/)) +- **Make**: For building certain clients + - Ubuntu/Debian: `sudo apt install make` + - macOS: `brew install make` + - Windows (WSL): `sudo apt install make` + +## Installation Methods + +### Method 1: Install Script (Recommended) + +The easiest way to install Starknode Kit is using our installation script: + +```bash +curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh | bash +``` + +Or download and run manually: + +```bash +wget https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh +chmod +x install.sh +./install.sh +``` + +### Method 2: Go Install + +If you have Go installed, you can install directly: + +```bash +go install github.com/thebuidl-grid/starknode-kit@latest +``` + +### Method 3: Build from Source + +For development or custom builds: + +```bash +# Clone the repository +git clone https://github.com/thebuidl-grid/starknode-kit.git +cd starknode-kit + +# Build and install +go build -o starknode-kit . +sudo mv starknode-kit /usr/local/bin/ +``` + +## Verify Installation + +After installation, verify that Starknode Kit is working correctly: + +```bash +starknode-kit --help +``` + +You should see the help output with available commands. + +## Initialize Configuration + +Create your initial configuration file: + +```bash +starknode-kit init +``` + +This creates a default configuration file in your home directory that you can customize for your needs. + +## Next Steps + +Now that you have Starknode Kit installed: + +1. [Review Hardware Requirements](hardware-requirements.md) +2. [Follow the Quick Start Guide](quick-start.md) +3. [Configure your first client](configuration.md) + +## Troubleshooting Installation + +### Common Issues + +**Permission Denied Error** +```bash +sudo chmod +x /usr/local/bin/starknode-kit +``` + +**Command Not Found** +Ensure `/usr/local/bin` is in your PATH: +```bash +echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc +source ~/.bashrc +``` + +**Go Version Issues** +Update Go to version 1.24 or later: +```bash +# Check current version +go version + +# Update if needed +# Visit https://go.dev/dl/ for latest version +``` + +### Getting Help + +If you encounter issues during installation: + +- Check our [Troubleshooting Guide](../operations/troubleshooting.md) +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/getting-started/quick-start.md b/docs/getting-started/quick-start.md new file mode 100644 index 0000000..a1580bf --- /dev/null +++ b/docs/getting-started/quick-start.md @@ -0,0 +1,205 @@ +# Quick Start Guide + +Get your first Ethereum and Starknet node running in under 10 minutes with this step-by-step guide. + +## Prerequisites + +Before starting, ensure you have: +- [Starknode Kit installed](installation.md) +- [Adequate hardware](hardware-requirements.md) +- Stable internet connection + +## Step 1: Initialize Configuration + +Create your initial configuration file: + +```bash +starknode-kit init +``` + +This creates a default configuration in your home directory that you can customize later. + +## Step 2: Add Your First Client Pair + +Add an Ethereum execution and consensus client pair: + +```bash +# Add Geth (execution) + Lighthouse (consensus) +starknode-kit add --execution_client geth --consensus_client lighthouse +``` + +**Alternative combinations**: +```bash +# Reth + Prysm +starknode-kit add --execution_client reth --consensus_client prysm + +# Geth + Prysm +starknode-kit add --execution_client geth --consensus_client prysm +``` + +## Step 3: Add a Starknet Client + +Add Juno for Starknet support: + +```bash +starknode-kit add --starknet_client juno +``` + +## Step 4: Verify Configuration + +Check your current configuration: + +```bash +starknode-kit config +``` + +You should see your configured clients listed. + +## Step 5: Start Your Ethereum Node + +Start the Ethereum execution and consensus clients: + +```bash +starknode-kit start +``` + +This will: +- Download and install the client binaries +- Start the execution client first +- Start the consensus client +- Begin syncing with the network + +## Step 6: Start Your Starknet Node + +In a separate terminal, start your Juno Starknet node: + +```bash +starknode-kit run juno +``` + +## Step 7: Monitor Your Nodes + +Launch the monitoring dashboard: + +```bash +starknode-kit monitor +``` + +This provides real-time information about: +- Client status and health +- Sync progress +- Resource usage +- Network connections + +## What Happens Next + +### Initial Sync Process + +**Ethereum Node**: +- Execution client syncs the blockchain state +- Consensus client syncs the beacon chain +- Full sync can take 1-3 days depending on hardware + +**Starknet Node (Juno)**: +- Syncs Starknet state from L1 +- Requires Ethereum node connection +- Typically faster than Ethereum sync + +### Expected Timeline + +| Phase | Duration | Description | +|-------|----------|-------------| +| Client Installation | 5-15 minutes | Download and setup binaries | +| Ethereum Sync Start | 1-2 hours | Begin blockchain synchronization | +| Partial Sync | 6-12 hours | Sync recent blocks | +| Full Sync | 1-3 days | Complete historical sync | +| Starknet Sync | 2-6 hours | Sync Starknet state | + +## Common First-Time Issues + +### Client Installation Fails + +**Problem**: Clients fail to download or install +**Solution**: Check internet connection and available disk space + +```bash +# Check disk space +df -h + +# Check internet connection +ping google.com +``` + +### Sync Stalls + +**Problem**: Sync progress stops or becomes very slow +**Solution**: Restart the clients + +```bash +# Stop clients +starknode-kit stop + +# Start again +starknode-kit start +``` + +### Port Conflicts + +**Problem**: Clients can't bind to required ports +**Solution**: Check for conflicting services + +```bash +# Check port usage +netstat -tulpn | grep :8545 # Geth default port +netstat -tulpn | grep :9000 # Lighthouse default port +``` + +## Next Steps + +Once your nodes are synced and running: + +1. **Configure Monitoring**: Set up alerts and monitoring +2. **Security Hardening**: Review security best practices +3. **Performance Tuning**: Optimize for your hardware +4. **Backup Strategy**: Implement backup procedures + +## Quick Commands Reference + +```bash +# Check status +starknode-kit config + +# Stop all clients +starknode-kit stop + +# Restart clients +starknode-kit stop && starknode-kit start + +# Update clients +starknode-kit update + +# Remove a client +starknode-kit remove --consensus_client lighthouse + +# Get help +starknode-kit --help +starknode-kit help +``` + +## Getting Help + +If you encounter issues: + +1. Check the [Troubleshooting Guide](../operations/troubleshooting.md) +2. Review client-specific logs +3. Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +4. Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) + +## What's Next? + +Now that you have your first node running: + +- [Learn about client configuration](configuration.md) +- [Set up monitoring and alerts](../operations/monitoring.md) +- [Explore advanced features](../advanced/network-configuration.md) +- [Join the community](https://t.me/+SCPbza9fk8dkYWI0) diff --git a/docs/operations/monitoring.md b/docs/operations/monitoring.md new file mode 100644 index 0000000..fdc4332 --- /dev/null +++ b/docs/operations/monitoring.md @@ -0,0 +1,353 @@ +# Monitoring + +Starknode Kit includes a built-in monitoring dashboard that provides real-time insights into your node's health, performance, and synchronization status. + +## Built-in Monitoring Dashboard + +### Launch the Dashboard + +```bash +starknode-kit monitor +``` + +This opens an interactive terminal-based dashboard showing: + +- **Client Status**: Running/stopped status of all clients +- **Sync Progress**: Current synchronization status +- **Resource Usage**: CPU, memory, and disk usage +- **Network Stats**: Peer connections and bandwidth +- **Logs**: Real-time log output from clients + +### Dashboard Features + +#### Real-time Updates +- Automatic refresh every few seconds +- Live log streaming +- Status change notifications + +#### Multi-client View +- Execution client status +- Consensus client status +- Starknet client status +- Combined system overview + +#### Resource Monitoring +- CPU usage per client +- Memory consumption +- Disk I/O statistics +- Network bandwidth + +## Monitoring Components + +### Client Status Monitoring + +**Execution Client (Geth/Reth)**: +- Sync status and progress +- Peer connections +- Block height +- Transaction pool status + +**Consensus Client (Lighthouse/Prysm)**: +- Beacon chain sync +- Validator status (if applicable) +- Attestation performance +- Finality status + +**Starknet Client (Juno)**: +- L2 sync progress +- L1 verification status +- Transaction processing +- State root updates + +### System Resource Monitoring + +**CPU Usage**: +- Per-client CPU consumption +- System-wide CPU usage +- Load average + +**Memory Usage**: +- RAM consumption per client +- Available memory +- Swap usage + +**Disk Usage**: +- Database size +- Available disk space +- I/O operations per second + +**Network Monitoring**: +- Inbound/outbound bandwidth +- Peer connections +- Latency measurements + +## Advanced Monitoring + +### Custom Monitoring Scripts + +Create custom monitoring scripts for specific needs: + +```bash +#!/bin/bash +# monitor_health.sh + +# Check if clients are running +if ! pgrep -f "geth" > /dev/null; then + echo "Geth is not running!" + exit 1 +fi + +if ! pgrep -f "lighthouse" > /dev/null; then + echo "Lighthouse is not running!" + exit 1 +fi + +# Check sync status +GETH_SYNC=$(curl -s -X POST -H "Content-Type: application/json" \ + --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' \ + http://localhost:8545 | jq -r '.result') + +if [ "$GETH_SYNC" != "false" ]; then + echo "Geth is still syncing" +fi + +echo "All systems healthy" +``` + +### Log Monitoring + +Monitor specific log patterns: + +```bash +# Monitor Geth logs +tail -f ~/.starknode-kit/logs/geth.log | grep -E "(ERROR|WARN|FATAL)" + +# Monitor Lighthouse logs +tail -f ~/.starknode-kit/logs/lighthouse.log | grep -E "(ERROR|WARN|FATAL)" + +# Monitor Juno logs +tail -f ~/.starknode-kit/logs/juno.log | grep -E "(ERROR|WARN|FATAL)" +``` + +### Performance Metrics + +Track key performance indicators: + +```bash +# Check sync speed +starknode-kit monitor --metrics sync-speed + +# Check peer count +starknode-kit monitor --metrics peers + +# Check resource usage +starknode-kit monitor --metrics resources +``` + +## External Monitoring Tools + +### Prometheus Integration + +Set up Prometheus metrics collection: + +```yaml +# prometheus.yml +global: + scrape_interval: 15s + +scrape_configs: + - job_name: 'starknode-kit' + static_configs: + - targets: ['localhost:9090'] + metrics_path: /metrics + scrape_interval: 5s +``` + +### Grafana Dashboards + +Create Grafana dashboards for visualization: + +**Key Metrics to Track**: +- Sync progress percentage +- Block height over time +- Peer connection count +- Resource usage trends +- Error rates + +### Alerting + +Set up alerts for critical issues: + +**Critical Alerts**: +- Client process down +- Sync stalled for > 1 hour +- Disk space < 10% +- Memory usage > 90% +- High error rate + +**Warning Alerts**: +- Sync progress slow +- Low peer count +- High CPU usage +- Network connectivity issues + +## Monitoring Best Practices + +### Regular Health Checks + +**Daily Checks**: +- Verify all clients are running +- Check sync progress +- Review error logs +- Monitor resource usage + +**Weekly Checks**: +- Review performance trends +- Check disk space usage +- Update monitoring configurations +- Test alerting systems + +### Log Management + +**Log Rotation**: +```bash +# Set up log rotation +sudo logrotate -f /etc/logrotate.d/starknode-kit +``` + +**Log Analysis**: +```bash +# Analyze error patterns +grep -E "(ERROR|WARN)" ~/.starknode-kit/logs/*.log | \ + awk '{print $1}' | sort | uniq -c | sort -nr +``` + +### Performance Optimization + +**Based on Monitoring Data**: +- Adjust client configurations +- Optimize resource allocation +- Tune network settings +- Update hardware if needed + +## Troubleshooting Monitoring Issues + +### Dashboard Not Loading + +**Problem**: Monitor dashboard fails to start +**Solutions**: +```bash +# Check if clients are configured +starknode-kit config + +# Restart monitoring +starknode-kit monitor --restart + +# Check for port conflicts +netstat -tulpn | grep :9090 +``` + +### Missing Metrics + +**Problem**: Some metrics not showing +**Solutions**: +```bash +# Verify client status +starknode-kit config + +# Check client logs +tail -f ~/.starknode-kit/logs/*.log + +# Restart clients +starknode-kit stop && starknode-kit start +``` + +### High Resource Usage + +**Problem**: Monitoring consumes too many resources +**Solutions**: +```bash +# Reduce monitoring frequency +starknode-kit monitor --interval 30s + +# Disable detailed metrics +starknode-kit monitor --basic + +# Use external monitoring instead +``` + +## Monitoring Configuration + +### Customize Monitoring Settings + +```yaml +# ~/.starknode-kit/monitoring.yaml +monitoring: + refresh_interval: 5s + log_level: info + metrics_enabled: true + alerts_enabled: true + + clients: + geth: + metrics_port: 6060 + log_level: info + lighthouse: + metrics_port: 5054 + log_level: info + juno: + metrics_port: 9090 + log_level: info +``` + +### Environment Variables + +```bash +# Set monitoring environment variables +export STARKNODE_MONITOR_INTERVAL=10s +export STARKNODE_MONITOR_LOG_LEVEL=debug +export STARKNODE_MONITOR_METRICS=true +``` + +## Integration with External Tools + +### System Monitoring + +**htop/btop**: +```bash +# Monitor system resources +htop +btop +``` + +**iotop**: +```bash +# Monitor disk I/O +sudo iotop +``` + +**nethogs**: +```bash +# Monitor network usage +sudo nethogs +``` + +### Log Aggregation + +**ELK Stack**: +- Elasticsearch for log storage +- Logstash for log processing +- Kibana for visualization + +**Fluentd**: +- Lightweight log collector +- Easy integration with Starknode Kit + +## Getting Help + +For monitoring issues: + +- Check the [Troubleshooting Guide](troubleshooting.md) +- Review client-specific monitoring docs +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/operations/running-nodes.md b/docs/operations/running-nodes.md new file mode 100644 index 0000000..0687eee --- /dev/null +++ b/docs/operations/running-nodes.md @@ -0,0 +1,383 @@ +# Running Nodes + +This guide covers how to run and manage your Ethereum and Starknet nodes using Starknode Kit. + +## Starting Your Nodes + +### Start Ethereum Clients + +Start your configured execution and consensus clients: + +```bash +starknode-kit start +``` + +This command will: +1. Check your configuration +2. Start the execution client first +3. Start the consensus client +4. Begin the synchronization process + +### Start Starknet Client + +Start your Juno Starknet node: + +```bash +starknode-kit run juno +``` + +**Note**: Juno requires an Ethereum node connection to verify L1 state. + +## Node Startup Process + +### Execution Client Startup + +**Geth**: +```bash +# Geth starts with these default settings: +# - HTTP RPC on port 8545 +# - WebSocket RPC on port 8546 +# - P2P networking on port 30303 +# - Full sync mode +``` + +**Reth**: +```bash +# Reth starts with these default settings: +# - HTTP RPC on port 8545 +# - WebSocket RPC on port 8546 +# - P2P networking on port 30303 +# - Full sync mode +``` + +### Consensus Client Startup + +**Lighthouse**: +```bash +# Lighthouse starts with these default settings: +# - P2P networking on port 9000 +# - HTTP API on port 9001 +# - Beacon node mode +# - Mainnet network +``` + +**Prysm**: +```bash +# Prysm starts with these default settings: +# - P2P networking on port 13000 +# - HTTP API on port 3500 +# - Beacon node mode +# - Mainnet network +``` + +### Starknet Client Startup + +**Juno**: +```bash +# Juno starts with these default settings: +# - HTTP RPC on port 6060 +# - WebSocket RPC on port 6061 +# - Ethereum node connection required +# - Mainnet network +``` + +## Synchronization Process + +### Initial Sync + +When you first start your nodes, they will begin synchronizing with the network: + +**Execution Client Sync**: +- Downloads and verifies all blocks +- Builds the state trie +- Can take 1-3 days depending on hardware + +**Consensus Client Sync**: +- Downloads beacon chain data +- Verifies consensus rules +- Typically faster than execution sync + +**Starknet Client Sync**: +- Syncs L2 state from L1 +- Requires Ethereum node connection +- Usually completes in 2-6 hours + +### Sync Progress Monitoring + +Monitor sync progress using the built-in dashboard: + +```bash +starknode-kit monitor +``` + +Key metrics to watch: +- **Block height**: Current synced block number +- **Sync percentage**: Progress towards full sync +- **Peer count**: Number of connected peers +- **Sync speed**: Blocks per second + +### Checkpoint Sync + +Speed up initial sync using trusted checkpoints: + +```bash +# Configure checkpoint sync for Lighthouse +starknode-kit config cl client=lighthouse consensus_checkpoint="https://mainnet.checkpoint.sigp.io" + +# Configure checkpoint sync for Prysm +starknode-kit config cl client=prysm consensus_checkpoint="https://beaconstate.info/" +``` + +## Node Management + +### Stop Nodes + +Stop all running clients: + +```bash +starknode-kit stop +``` + +This gracefully shuts down all clients. + +### Restart Nodes + +Restart all clients: + +```bash +starknode-kit stop +starknode-kit start +``` + +### Check Node Status + +Check if nodes are running: + +```bash +# Check configuration +starknode-kit config + +# Check running processes +ps aux | grep -E "(geth|lighthouse|juno)" + +# Check ports +netstat -tulpn | grep -E "(8545|9000|6060)" +``` + +## Network Configuration + +### Mainnet + +Run on Ethereum mainnet: + +```bash +starknode-kit config -n mainnet +starknode-kit start +``` + +### Testnets + +Run on testnets for development: + +```bash +# Sepolia testnet +starknode-kit config -n sepolia +starknode-kit start + +# Holesky testnet +starknode-kit config -n holesky +starknode-kit start +``` + +### Custom Networks + +Configure custom network settings: + +```yaml +# config.yaml +network: custom +execution_client: + name: geth + additional_args: + - "--networkid" + - "12345" + - "--genesis" + - "/path/to/genesis.json" +``` + +## Performance Optimization + +### Resource Allocation + +Optimize resource usage for your hardware: + +```bash +# High-memory system (32GB+) +starknode-kit config el client=geth additional_args="--cache,8192,--maxpeers,100" + +# Low-memory system (16GB) +starknode-kit config el client=geth additional_args="--cache,2048,--maxpeers,25" + +# High-performance system +starknode-kit config el client=reth additional_args="--max-peers,100" +``` + +### Network Optimization + +Optimize network settings: + +```bash +# Increase peer connections +starknode-kit config el client=geth additional_args="--maxpeers,100" + +# Optimize for low bandwidth +starknode-kit config el client=geth additional_args="--maxpeers,25,--lightserv,0" +``` + +### Storage Optimization + +Optimize storage usage: + +```bash +# Use light client mode +starknode-kit config el client=geth execution_type=light + +# Use archive mode for complete data +starknode-kit config el client=geth execution_type=archive +``` + +## Monitoring and Logs + +### Real-time Monitoring + +Use the built-in monitoring dashboard: + +```bash +starknode-kit monitor +``` + +Features: +- Real-time sync progress +- Resource usage statistics +- Peer connection status +- Live log streaming + +### Log Files + +Access client log files: + +```bash +# Geth logs +tail -f ~/.starknode-kit/logs/geth.log + +# Lighthouse logs +tail -f ~/.starknode-kit/logs/lighthouse.log + +# Juno logs +tail -f ~/.starknode-kit/logs/juno.log +``` + +### Log Analysis + +Analyze logs for issues: + +```bash +# Search for errors +grep -i error ~/.starknode-kit/logs/*.log + +# Monitor sync progress +grep -i "sync" ~/.starknode-kit/logs/geth.log + +# Check peer connections +grep -i "peer" ~/.starknode-kit/logs/*.log +``` + +## Troubleshooting + +### Common Issues + +**Nodes Won't Start** +```bash +# Check configuration +starknode-kit config --validate + +# Check port conflicts +netstat -tulpn | grep -E "(8545|9000|6060)" + +# Check disk space +df -h +``` + +**Sync Stalls** +```bash +# Restart nodes +starknode-kit stop && starknode-kit start + +# Check network connectivity +ping 8.8.8.8 + +# Use checkpoint sync +starknode-kit config cl client=lighthouse consensus_checkpoint="https://mainnet.checkpoint.sigp.io" +``` + +**High Resource Usage** +```bash +# Check resource usage +htop +iotop + +# Reduce resource allocation +starknode-kit config el client=geth additional_args="--cache,2048,--maxpeers,25" +``` + +### Performance Issues + +**Slow Sync** +- Check disk I/O performance +- Verify network connection +- Consider using checkpoint sync +- Optimize client settings + +**High Memory Usage** +- Reduce cache size +- Use light client mode +- Add swap space +- Monitor for memory leaks + +**High CPU Usage** +- Reduce peer count +- Use lighter execution type +- Check for stuck processes +- Monitor system load + +## Best Practices + +### Security + +- Run nodes behind a firewall +- Use non-default ports in production +- Restrict RPC access to localhost +- Keep clients updated + +### Reliability + +- Use stable network configurations +- Monitor system resources +- Set up automated restarts +- Keep backups of configuration + +### Performance + +- Match execution type to use case +- Optimize for your hardware +- Use checkpoint sync for faster initial sync +- Monitor and tune settings + +## Getting Help + +For node operation issues: + +- Check the [Troubleshooting Guide](troubleshooting.md) +- Review client-specific documentation +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/operations/troubleshooting.md b/docs/operations/troubleshooting.md new file mode 100644 index 0000000..46dbf55 --- /dev/null +++ b/docs/operations/troubleshooting.md @@ -0,0 +1,538 @@ +# Troubleshooting + +This guide helps you diagnose and resolve common issues with Starknode Kit. + +## Common Issues + +### Installation Problems + +#### Command Not Found + +**Problem**: `starknode-kit: command not found` + +**Solutions**: +```bash +# Check if binary exists +ls -la /usr/local/bin/starknode-kit + +# Add to PATH +echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc +source ~/.bashrc + +# Reinstall if missing +curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh | bash +``` + +#### Permission Denied + +**Problem**: Permission denied when running commands + +**Solutions**: +```bash +# Fix permissions +sudo chmod +x /usr/local/bin/starknode-kit + +# Check ownership +sudo chown $USER:$USER /usr/local/bin/starknode-kit +``` + +#### Go Version Issues + +**Problem**: Go version too old + +**Solutions**: +```bash +# Check current version +go version + +# Update Go (Ubuntu/Debian) +sudo apt update +sudo apt install golang-go + +# Update Go (macOS) +brew install go + +# Update Go (manual) +# Visit https://go.dev/dl/ for latest version +``` + +--- + +### Configuration Issues + +#### Invalid Configuration + +**Problem**: Configuration validation fails + +**Solutions**: +```bash +# Validate configuration +starknode-kit config --validate + +# Reset to defaults +rm ~/.starknode-kit/config.yaml +starknode-kit init + +# Check YAML syntax +yamllint ~/.starknode-kit/config.yaml +``` + +#### Missing Configuration File + +**Problem**: Configuration file not found + +**Solutions**: +```bash +# Create default configuration +starknode-kit init + +# Check file location +ls -la ~/.starknode-kit/ + +# Set custom path +export STARKNODE_CONFIG_PATH=/custom/path/config.yaml +``` + +--- + +### Client Installation Issues + +#### Download Failures + +**Problem**: Client binaries fail to download + +**Solutions**: +```bash +# Check internet connection +ping google.com + +# Check available disk space +df -h + +# Check GitHub access +curl -I https://github.com + +# Manual download +wget https://github.com/ethereum/go-ethereum/releases/download/v1.13.5/geth-linux-amd64-1.13.5-916d9836.tar.gz +``` + +#### Installation Permissions + +**Problem**: Cannot install client binaries + +**Solutions**: +```bash +# Check directory permissions +ls -la ~/.starknode-kit/ + +# Fix permissions +chmod 755 ~/.starknode-kit/ +chmod 755 ~/.starknode-kit/bin/ + +# Create directories if missing +mkdir -p ~/.starknode-kit/bin/ +``` + +--- + +### Client Runtime Issues + +#### Port Conflicts + +**Problem**: Clients cannot bind to required ports + +**Solutions**: +```bash +# Check port usage +netstat -tulpn | grep :8545 # Geth +netstat -tulpn | grep :9000 # Lighthouse +netstat -tulpn | grep :6060 # Juno + +# Kill conflicting processes +sudo kill -9 $(lsof -t -i:8545) + +# Use different ports +starknode-kit config el client=geth port=8547,8548 +``` + +#### Sync Stalls + +**Problem**: Blockchain sync stops or becomes very slow + +**Solutions**: +```bash +# Check client status +starknode-kit monitor + +# Restart clients +starknode-kit stop +starknode-kit start + +# Check disk space +df -h + +# Check network connectivity +ping 8.8.8.8 + +# Use checkpoint sync +starknode-kit config cl client=lighthouse consensus_checkpoint="https://mainnet.checkpoint.sigp.io" +``` + +#### High Resource Usage + +**Problem**: Clients consume too much CPU/memory + +**Solutions**: +```bash +# Check resource usage +htop +iotop + +# Reduce client resources +starknode-kit config el client=geth additional_args="--cache,2048,--maxpeers,25" + +# Use lighter execution type +starknode-kit config el client=geth execution_type=light +``` + +--- + +### Network Issues + +#### Connection Problems + +**Problem**: Cannot connect to network + +**Solutions**: +```bash +# Check network connectivity +ping google.com + +# Check DNS resolution +nslookup google.com + +# Check firewall +sudo ufw status + +# Test specific ports +telnet 8.8.8.8 53 +``` + +#### Low Peer Count + +**Problem**: Few or no peer connections + +**Solutions**: +```bash +# Check peer count +starknode-kit monitor + +# Increase max peers +starknode-kit config el client=geth additional_args="--maxpeers,100" + +# Check network configuration +starknode-kit config -n mainnet + +# Restart clients +starknode-kit stop && starknode-kit start +``` + +--- + +### Monitoring Issues + +#### Dashboard Not Loading + +**Problem**: Monitor dashboard fails to start + +**Solutions**: +```bash +# Check if clients are running +starknode-kit config + +# Restart monitoring +starknode-kit monitor --restart + +# Check for port conflicts +netstat -tulpn | grep :9090 + +# Use basic monitoring +starknode-kit monitor --basic +``` + +#### Missing Metrics + +**Problem**: Some metrics not showing in dashboard + +**Solutions**: +```bash +# Verify client status +starknode-kit config + +# Check client logs +tail -f ~/.starknode-kit/logs/*.log + +# Restart clients +starknode-kit stop && starknode-kit start + +# Check monitoring configuration +starknode-kit monitor --interval 10s +``` + +--- + +## Diagnostic Commands + +### System Information + +```bash +# Check system resources +free -h +df -h +lscpu + +# Check network interfaces +ip addr show +ip route show + +# Check running processes +ps aux | grep -E "(geth|lighthouse|juno)" +``` + +### Client Status + +```bash +# Check client processes +pgrep -f geth +pgrep -f lighthouse +pgrep -f juno + +# Check client logs +tail -f ~/.starknode-kit/logs/geth.log +tail -f ~/.starknode-kit/logs/lighthouse.log +tail -f ~/.starknode-kit/logs/juno.log + +# Check client configuration +starknode-kit config +``` + +### Network Diagnostics + +```bash +# Test connectivity +ping -c 4 8.8.8.8 +ping -c 4 google.com + +# Check DNS +nslookup google.com +dig google.com + +# Test specific ports +nc -zv 8.8.8.8 53 +nc -zv localhost 8545 +``` + +--- + +## Log Analysis + +### Common Log Patterns + +#### Geth Logs + +**Sync Issues**: +```bash +grep -i "sync" ~/.starknode-kit/logs/geth.log +grep -i "peer" ~/.starknode-kit/logs/geth.log +``` + +**Memory Issues**: +```bash +grep -i "memory" ~/.starknode-kit/logs/geth.log +grep -i "cache" ~/.starknode-kit/logs/geth.log +``` + +#### Lighthouse Logs + +**Consensus Issues**: +```bash +grep -i "consensus" ~/.starknode-kit/logs/lighthouse.log +grep -i "beacon" ~/.starknode-kit/logs/lighthouse.log +``` + +**Network Issues**: +```bash +grep -i "network" ~/.starknode-kit/logs/lighthouse.log +grep -i "connection" ~/.starknode-kit/logs/lighthouse.log +``` + +#### Juno Logs + +**L1 Verification Issues**: +```bash +grep -i "l1" ~/.starknode-kit/logs/juno.log +grep -i "ethereum" ~/.starknode-kit/logs/juno.log +``` + +**Sync Issues**: +```bash +grep -i "sync" ~/.starknode-kit/logs/juno.log +grep -i "block" ~/.starknode-kit/logs/juno.log +``` + +--- + +## Performance Issues + +### Slow Sync + +**Causes**: +- Insufficient disk I/O +- Low memory +- Poor network connection +- High CPU usage + +**Solutions**: +```bash +# Check disk I/O +iotop +iostat -x 1 + +# Check memory usage +free -h +htop + +# Optimize client settings +starknode-kit config el client=geth additional_args="--cache,4096,--maxpeers,50" +``` + +### High Memory Usage + +**Causes**: +- Large cache settings +- Memory leaks +- Insufficient swap + +**Solutions**: +```bash +# Check memory usage +free -h +htop + +# Reduce cache size +starknode-kit config el client=geth additional_args="--cache,2048" + +# Add swap space +sudo fallocate -l 8G /swapfile +sudo chmod 600 /swapfile +sudo mkswap /swapfile +sudo swapon /swapfile +``` + +### High CPU Usage + +**Causes**: +- Intensive sync process +- High peer count +- Resource contention + +**Solutions**: +```bash +# Check CPU usage +htop +top + +# Reduce peer count +starknode-kit config el client=geth additional_args="--maxpeers,25" + +# Use lighter execution type +starknode-kit config el client=geth execution_type=light +``` + +--- + +## Recovery Procedures + +### Complete Reset + +```bash +# Stop all clients +starknode-kit stop + +# Remove configuration +rm -rf ~/.starknode-kit/ + +# Reinstall +curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh | bash + +# Reinitialize +starknode-kit init +``` + +### Client Reset + +```bash +# Stop specific client +starknode-kit stop + +# Remove client +starknode-kit remove --execution_client geth + +# Reinstall client +starknode-kit add --execution_client geth + +# Restart +starknode-kit start +``` + +### Database Reset + +```bash +# Stop clients +starknode-kit stop + +# Remove database (WARNING: This will require full resync) +rm -rf ~/.starknode-kit/data/geth/ +rm -rf ~/.starknode-kit/data/lighthouse/ +rm -rf ~/.starknode-kit/data/juno/ + +# Restart clients +starknode-kit start +``` + +--- + +## Getting Help + +### Before Asking for Help + +1. **Check logs**: Review client logs for error messages +2. **Verify configuration**: Ensure configuration is valid +3. **Check system resources**: Verify adequate disk space and memory +4. **Test network**: Ensure stable internet connection +5. **Try restart**: Restart clients and check if issue persists + +### Information to Provide + +When seeking help, include: + +- **Operating system**: Linux distribution, macOS version, etc. +- **Hardware specs**: CPU, RAM, storage +- **Starknode Kit version**: `starknode-kit --version` +- **Configuration**: `starknode-kit config` +- **Error messages**: Full error output +- **Logs**: Relevant log excerpts +- **Steps to reproduce**: What you did before the issue occurred + +### Support Channels + +- **Telegram**: [Join our community](https://t.me/+SCPbza9fk8dkYWI0) +- **GitHub Issues**: [Report bugs and request features](https://github.com/thebuidl-grid/starknode-kit/issues) +- **Documentation**: This troubleshooting guide + +### Community Resources + +- **Discord**: Real-time community support +- **Reddit**: r/ethereum, r/starknet +- **Stack Overflow**: Tag questions with `starknode-kit` +- **GitHub Discussions**: Community discussions and Q&A diff --git a/docs/operations/updates.md b/docs/operations/updates.md new file mode 100644 index 0000000..1805b5b --- /dev/null +++ b/docs/operations/updates.md @@ -0,0 +1,503 @@ +# Updates and Maintenance + +This guide covers how to keep your Starknode Kit installation and clients up to date, along with best practices for maintenance. + +## Client Updates + +### Check for Updates + +```bash +# Check for updates to all clients +starknode-kit update + +# Check for updates to specific client +starknode-kit update --execution_client geth +starknode-kit update --consensus_client lighthouse +starknode-kit update --starknet_client juno +``` + +### Update Process + +When you run `starknode-kit update`, the following happens: + +1. **Check versions**: Compare current vs. latest available versions +2. **Download updates**: Download new client binaries if available +3. **Backup current**: Backup existing binaries +4. **Install updates**: Replace old binaries with new ones +5. **Validate installation**: Verify new binaries work correctly + +### Automatic Updates + +Enable automatic update checking: + +```bash +# Set up cron job for daily updates +echo "0 2 * * * /usr/local/bin/starknode-kit update" | crontab - + +# Or weekly updates +echo "0 2 * * 0 /usr/local/bin/starknode-kit update" | crontab - +``` + +--- + +## Update Strategies + +### Rolling Updates + +Update clients one at a time to minimize downtime: + +```bash +# 1. Update execution client +starknode-kit stop +starknode-kit update --execution_client geth +starknode-kit start + +# 2. Wait for sync, then update consensus client +starknode-kit stop +starknode-kit update --consensus_client lighthouse +starknode-kit start + +# 3. Update Starknet client +starknode-kit stop +starknode-kit update --starknet_client juno +starknode-kit run juno +``` + +### Maintenance Windows + +Schedule updates during low-activity periods: + +```bash +# Create maintenance script +cat > ~/maintenance.sh << 'EOF' +#!/bin/bash +echo "Starting maintenance window..." + +# Stop clients +starknode-kit stop + +# Update all clients +starknode-kit update + +# Clean up old logs +find ~/.starknode-kit/logs -name "*.log" -mtime +30 -delete + +# Restart clients +starknode-kit start + +echo "Maintenance complete" +EOF + +chmod +x ~/maintenance.sh +``` + +--- + +## Version Management + +### Check Current Versions + +```bash +# Check Starknode Kit version +starknode-kit --version + +# Check client versions +~/.starknode-kit/bin/geth version +~/.starknode-kit/bin/lighthouse --version +~/.starknode-kit/bin/juno --version +``` + +### Version Compatibility + +| Starknode Kit | Geth | Lighthouse | Prysm | Juno | +|---------------|------|------------|-------|------| +| 1.0.0 | 1.13.5+ | 4.5.0+ | 4.0.0+ | 0.14.0+ | +| 1.1.0 | 1.13.8+ | 4.6.0+ | 4.1.0+ | 0.14.5+ | +| 1.2.0 | 1.14.0+ | 4.7.0+ | 4.2.0+ | 0.15.0+ | + +### Downgrade if Needed + +```bash +# Stop clients +starknode-kit stop + +# Remove current version +rm ~/.starknode-kit/bin/geth + +# Download specific version +wget https://github.com/ethereum/go-ethereum/releases/download/v1.13.5/geth-linux-amd64-1.13.5-916d9836.tar.gz +tar -xzf geth-linux-amd64-1.13.5-916d9836.tar.gz +mv geth ~/.starknode-kit/bin/ + +# Restart clients +starknode-kit start +``` + +--- + +## Maintenance Tasks + +### Regular Maintenance + +#### Daily Tasks + +```bash +# Check client status +starknode-kit monitor + +# Check disk space +df -h + +# Check logs for errors +grep -i error ~/.starknode-kit/logs/*.log +``` + +#### Weekly Tasks + +```bash +# Update clients +starknode-kit update + +# Clean old logs +find ~/.starknode-kit/logs -name "*.log" -mtime +7 -delete + +# Check system resources +htop +iotop +``` + +#### Monthly Tasks + +```bash +# Full system update +sudo apt update && sudo apt upgrade + +# Clean package cache +sudo apt autoremove +sudo apt autoclean + +# Check disk health +sudo smartctl -a /dev/sda +``` + +### Log Management + +#### Log Rotation + +```bash +# Set up logrotate +sudo tee /etc/logrotate.d/starknode-kit << 'EOF' +/home/*/.starknode-kit/logs/*.log { + daily + missingok + rotate 7 + compress + delaycompress + notifempty + create 644 $USER $USER +} +EOF +``` + +#### Log Analysis + +```bash +# Analyze error patterns +grep -E "(ERROR|WARN|FATAL)" ~/.starknode-kit/logs/*.log | \ + awk '{print $1}' | sort | uniq -c | sort -nr + +# Check sync performance +grep -i "sync" ~/.starknode-kit/logs/geth.log | tail -20 + +# Monitor peer connections +grep -i "peer" ~/.starknode-kit/logs/*.log | tail -20 +``` + +--- + +## Backup and Recovery + +### Configuration Backup + +```bash +# Backup configuration +cp ~/.starknode-kit/config.yaml ~/.starknode-kit/config.yaml.backup + +# Backup to cloud storage +rclone copy ~/.starknode-kit/config.yaml remote:backups/ + +# Version control +cd ~/.starknode-kit/ +git init +git add config.yaml +git commit -m "Initial configuration" +``` + +### Database Backup + +```bash +# Create backup script +cat > ~/backup_databases.sh << 'EOF' +#!/bin/bash +BACKUP_DIR="/backup/starknode-kit/$(date +%Y%m%d)" +mkdir -p "$BACKUP_DIR" + +# Stop clients +starknode-kit stop + +# Backup databases +tar -czf "$BACKUP_DIR/geth_data.tar.gz" ~/.starknode-kit/data/geth/ +tar -czf "$BACKUP_DIR/lighthouse_data.tar.gz" ~/.starknode-kit/data/lighthouse/ +tar -czf "$BACKUP_DIR/juno_data.tar.gz" ~/.starknode-kit/data/juno/ + +# Restart clients +starknode-kit start + +echo "Backup completed: $BACKUP_DIR" +EOF + +chmod +x ~/backup_databases.sh +``` + +### Recovery Procedures + +```bash +# Restore configuration +cp ~/.starknode-kit/config.yaml.backup ~/.starknode-kit/config.yaml + +# Restore database +starknode-kit stop +tar -xzf /backup/starknode-kit/20240101/geth_data.tar.gz -C ~/.starknode-kit/data/ +starknode-kit start +``` + +--- + +## Performance Monitoring + +### System Metrics + +```bash +# Monitor system resources +htop +iotop +nethogs + +# Check disk usage +du -sh ~/.starknode-kit/data/* + +# Monitor network +iftop +``` + +### Client Metrics + +```bash +# Monitor sync progress +starknode-kit monitor + +# Check peer count +curl -X POST -H "Content-Type: application/json" \ + --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' \ + http://localhost:8545 + +# Check block height +curl -X POST -H "Content-Type: application/json" \ + --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \ + http://localhost:8545 +``` + +--- + +## Security Updates + +### System Security + +```bash +# Update system packages +sudo apt update && sudo apt upgrade + +# Check for security updates +sudo apt list --upgradable + +# Update kernel if needed +sudo apt install linux-image-generic +``` + +### Client Security + +```bash +# Update clients regularly +starknode-kit update + +# Check for security advisories +# Monitor client GitHub repositories for security releases + +# Use latest stable versions +starknode-kit config --validate +``` + +--- + +## Troubleshooting Updates + +### Update Failures + +**Problem**: Update process fails + +**Solutions**: +```bash +# Check internet connection +ping google.com + +# Check disk space +df -h + +# Check permissions +ls -la ~/.starknode-kit/bin/ + +# Manual update +wget https://github.com/ethereum/go-ethereum/releases/download/v1.14.0/geth-linux-amd64-1.14.0.tar.gz +tar -xzf geth-linux-amd64-1.14.0.tar.gz +mv geth ~/.starknode-kit/bin/ +``` + +### Version Conflicts + +**Problem**: New version causes issues + +**Solutions**: +```bash +# Rollback to previous version +starknode-kit stop +rm ~/.starknode-kit/bin/geth +# Restore previous version from backup + +# Check compatibility +starknode-kit config --validate + +# Report issue +# Open GitHub issue with version information +``` + +### Sync Issues After Update + +**Problem**: Sync problems after updating + +**Solutions**: +```bash +# Check client logs +tail -f ~/.starknode-kit/logs/geth.log + +# Restart clients +starknode-kit stop && starknode-kit start + +# Use checkpoint sync +starknode-kit config cl client=lighthouse consensus_checkpoint="https://mainnet.checkpoint.sigp.io" +``` + +--- + +## Automation + +### Update Automation + +```bash +# Create update script +cat > ~/auto_update.sh << 'EOF' +#!/bin/bash +LOG_FILE="/var/log/starknode-kit-updates.log" + +echo "$(date): Starting automatic update" >> "$LOG_FILE" + +# Check for updates +if starknode-kit update --check-only; then + echo "$(date): Updates available, proceeding" >> "$LOG_FILE" + + # Stop clients + starknode-kit stop + + # Update clients + starknode-kit update + + # Restart clients + starknode-kit start + + echo "$(date): Update completed successfully" >> "$LOG_FILE" +else + echo "$(date): No updates available" >> "$LOG_FILE" +fi +EOF + +chmod +x ~/auto_update.sh + +# Schedule weekly updates +echo "0 3 * * 0 /home/$USER/auto_update.sh" | crontab - +``` + +### Monitoring Automation + +```bash +# Create health check script +cat > ~/health_check.sh << 'EOF' +#!/bin/bash +ALERT_EMAIL="admin@example.com" + +# Check if clients are running +if ! pgrep -f "geth" > /dev/null; then + echo "Geth is not running!" | mail -s "Starknode Kit Alert" "$ALERT_EMAIL" +fi + +if ! pgrep -f "lighthouse" > /dev/null; then + echo "Lighthouse is not running!" | mail -s "Starknode Kit Alert" "$ALERT_EMAIL" +fi + +# Check disk space +DISK_USAGE=$(df / | awk 'NR==2 {print $5}' | sed 's/%//') +if [ "$DISK_USAGE" -gt 90 ]; then + echo "Disk usage is ${DISK_USAGE}%" | mail -s "Starknode Kit Alert" "$ALERT_EMAIL" +fi +EOF + +chmod +x ~/health_check.sh + +# Schedule hourly health checks +echo "0 * * * * /home/$USER/health_check.sh" | crontab - +``` + +--- + +## Best Practices + +### Update Strategy + +1. **Test on testnets first**: Always test updates on testnets before mainnet +2. **Schedule maintenance windows**: Update during low-activity periods +3. **Keep backups**: Always backup before major updates +4. **Monitor after updates**: Watch for issues after updating +5. **Document changes**: Keep track of what was updated and when + +### Maintenance Schedule + +- **Daily**: Check client status and logs +- **Weekly**: Update clients and clean logs +- **Monthly**: Full system maintenance and security updates +- **Quarterly**: Review and optimize configurations + +### Monitoring + +- Set up alerts for critical issues +- Monitor resource usage trends +- Track sync performance +- Watch for security updates + +--- + +## Getting Help + +For update and maintenance issues: + +- Check the [Troubleshooting Guide](troubleshooting.md) +- Review client-specific update documentation +- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) +- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 0000000..60823cd --- /dev/null +++ b/docs/package.json @@ -0,0 +1,33 @@ +{ + "name": "starknode-kit-docs", + "version": "1.0.0", + "description": "Documentation for Starknode Kit - A CLI tool for managing Ethereum and Starknet nodes", + "main": "README.md", + "scripts": { + "serve": "honkit serve", + "build": "honkit build", + "pdf": "honkit pdf . ./starknode-kit-docs.pdf", + "epub": "honkit epub . ./starknode-kit-docs.epub" + }, + "repository": { + "type": "git", + "url": "https://github.com/thebuidl-grid/starknode-kit.git" + }, + "keywords": [ + "ethereum", + "starknet", + "blockchain", + "node", + "cli", + "documentation", + "gitbook" + ], + "author": "The Buidl Grid", + "license": "MIT", + "devDependencies": { + "honkit": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } +} \ No newline at end of file diff --git a/docs/styles/website.css b/docs/styles/website.css new file mode 100644 index 0000000..1288007 --- /dev/null +++ b/docs/styles/website.css @@ -0,0 +1,282 @@ +/* Custom styles for Starknode Kit documentation */ + +/* Brand colors */ +:root { + --primary-color: #6366f1; + --secondary-color: #8b5cf6; + --accent-color: #06b6d4; + --success-color: #10b981; + --warning-color: #f59e0b; + --error-color: #ef4444; + --text-color: #1f2937; + --bg-color: #ffffff; + --border-color: #e5e7eb; +} + +/* Header styling */ +.book-header { + background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); + border-bottom: 1px solid var(--border-color); +} + +.book-header h1 { + color: white; + font-weight: 600; +} + +/* Navigation styling */ +.book-summary { + background-color: #f8fafc; + border-right: 1px solid var(--border-color); +} + +.book-summary ul.summary li a { + color: var(--text-color); + font-weight: 500; +} + +.book-summary ul.summary li.active > a { + color: var(--primary-color); + background-color: #e0e7ff; + border-left: 3px solid var(--primary-color); +} + +.book-summary ul.summary li a:hover { + color: var(--primary-color); + background-color: #f1f5f9; +} + +/* Content styling */ +.book-body { + background-color: var(--bg-color); +} + +.markdown-section { + max-width: 900px; + line-height: 1.6; + color: var(--text-color); +} + +.markdown-section h1, +.markdown-section h2, +.markdown-section h3, +.markdown-section h4, +.markdown-section h5, +.markdown-section h6 { + color: var(--text-color); + font-weight: 600; + margin-top: 2rem; + margin-bottom: 1rem; +} + +.markdown-section h1 { + font-size: 2.5rem; + border-bottom: 2px solid var(--primary-color); + padding-bottom: 0.5rem; +} + +.markdown-section h2 { + font-size: 2rem; + color: var(--primary-color); +} + +.markdown-section h3 { + font-size: 1.5rem; + color: var(--secondary-color); +} + +/* Code styling */ +.markdown-section pre { + background-color: #1e293b; + border: 1px solid #334155; + border-radius: 8px; + padding: 1rem; + overflow-x: auto; +} + +.markdown-section code { + background-color: #f1f5f9; + color: var(--primary-color); + padding: 0.2rem 0.4rem; + border-radius: 4px; + font-size: 0.9em; +} + +.markdown-section pre code { + background-color: transparent; + color: #e2e8f0; + padding: 0; +} + +/* Blockquote styling */ +.markdown-section blockquote { + border-left: 4px solid var(--accent-color); + background-color: #f0f9ff; + padding: 1rem; + margin: 1rem 0; + border-radius: 0 8px 8px 0; +} + +.markdown-section blockquote p { + margin: 0; + color: #0c4a6e; +} + +/* Table styling */ +.markdown-section table { + border-collapse: collapse; + width: 100%; + margin: 1rem 0; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.markdown-section table th { + background-color: var(--primary-color); + color: white; + padding: 0.75rem; + text-align: left; + font-weight: 600; +} + +.markdown-section table td { + padding: 0.75rem; + border-bottom: 1px solid var(--border-color); +} + +.markdown-section table tr:nth-child(even) { + background-color: #f8fafc; +} + +.markdown-section table tr:hover { + background-color: #f1f5f9; +} + +/* Alert boxes */ +.alert { + padding: 1rem; + margin: 1rem 0; + border-radius: 8px; + border-left: 4px solid; +} + +.alert-info { + background-color: #f0f9ff; + border-left-color: var(--accent-color); + color: #0c4a6e; +} + +.alert-warning { + background-color: #fffbeb; + border-left-color: var(--warning-color); + color: #92400e; +} + +.alert-success { + background-color: #f0fdf4; + border-left-color: var(--success-color); + color: #166534; +} + +.alert-error { + background-color: #fef2f2; + border-left-color: var(--error-color); + color: #991b1b; +} + +/* Button styling */ +.btn { + display: inline-block; + padding: 0.5rem 1rem; + background-color: var(--primary-color); + color: white; + text-decoration: none; + border-radius: 6px; + font-weight: 500; + transition: background-color 0.2s; +} + +.btn:hover { + background-color: var(--secondary-color); + color: white; + text-decoration: none; +} + +.btn-secondary { + background-color: var(--secondary-color); +} + +.btn-secondary:hover { + background-color: var(--primary-color); +} + +/* Feature highlights */ +.feature-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 1.5rem; + margin: 2rem 0; +} + +.feature-card { + background: white; + border: 1px solid var(--border-color); + border-radius: 12px; + padding: 1.5rem; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + transition: transform 0.2s, box-shadow 0.2s; +} + +.feature-card:hover { + transform: translateY(-2px); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); +} + +.feature-card h3 { + color: var(--primary-color); + margin-top: 0; + margin-bottom: 1rem; +} + +.feature-card .icon { + font-size: 2rem; + margin-bottom: 1rem; +} + +/* Responsive design */ +@media (max-width: 768px) { + .markdown-section { + padding: 1rem; + } + + .markdown-section h1 { + font-size: 2rem; + } + + .markdown-section h2 { + font-size: 1.5rem; + } + + .feature-grid { + grid-template-columns: 1fr; + } +} + +/* Print styles */ +@media print { + .book-header, + .book-summary, + .book-body .navigation { + display: none; + } + + .book-body { + margin: 0; + padding: 0; + } + + .markdown-section { + max-width: none; + } +} From 4abe86480ae3a6503deca6d8ce8af8869cd1caef Mon Sep 17 00:00:00 2001 From: Kc Pele Date: Fri, 3 Oct 2025 19:04:27 +0100 Subject: [PATCH 02/18] fix: changed document command for adding clients --- README.md | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 038d5b3..9086f81 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ 1. Download and run the installation script: ```bash - /bin/bash -c "$(curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh)" + /bin/bash -c "$(curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh)" ``` 2. Or download the script first and then run it: @@ -53,6 +53,7 @@ After installation, verify that `starknode-kit` is working: ```bash starknode-kit --help ``` + #### Generate Config file ```bash @@ -70,7 +71,6 @@ rm -rf ~/.config/starknode-kit > **Note**: This will not remove any of the client data (e.g., blockchain data). The data is stored in the locations specified in your `~/.starknode-kit/starknode.yml` file. - --- ## 📘 Available Commands @@ -98,20 +98,20 @@ rm -rf ~/.config/starknode-kit #### Add a client pair (consensus + execution) ```bash -starknode-kit add --consensus_client lighthouse --execution_client geth +starknode-kit add --consensus-client lighthouse --execution-client geth ``` #### Add a Starknet client ```bash -starknode-kit add --starknet_client juno +starknode-kit add --starknet-client juno ``` #### Remove a configured client ```bash -starknode-kit remove --consensus_client lighthouse -starknode-kit remove --starknet_client juno +starknode-kit remove --consensus-client lighthouse +starknode-kit remove --starknet-client juno ``` #### Change network @@ -163,11 +163,13 @@ starknode-kit run lighthouse Manage the Starknet validator client. - **Get validator status:** + ```bash starknode-kit validator status ``` - **Get validator version:** + ```bash starknode-kit validator --version ``` @@ -197,33 +199,33 @@ starknode-kit help add Make sure the following are installed on your system before using or building `starknode-kit`: -* **Go**: Version **1.24 or later** +- **Go**: Version **1.24 or later** Install from: [https://go.dev/dl/](https://go.dev/dl/) -* **Rust**: Recommended for building Starknet clients (e.g., Juno) +- **Rust**: Recommended for building Starknet clients (e.g., Juno) Install with: ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -* **Make**: Required to build certain clients and scripts +- **Make**: Required to build certain clients and scripts Install via package manager: - * Ubuntu/Debian: `sudo apt install make` - * macOS (with Homebrew): `brew install make` - * Windows (WSL): included or `sudo apt install make` + - Ubuntu/Debian: `sudo apt install make` + - macOS (with Homebrew): `brew install make` + - Windows (WSL): included or `sudo apt install make` ### 🖥️ Hardware Requirements See this [Rocket Pool Hardware Guide](https://docs.rocketpool.net/guides/node/hardware.html) for a detailed breakdown of node hardware requirements. -* **CPU**: Node operation doesn't require heavy CPU power. The BG Client has run well on both i3 and i5 models of the ASUS NUC 13 PRO. Be cautious if using Celeron processors, as they may have limitations. -* **RAM**: At least **32 GB** is recommended for good performance with overhead. -* **Storage (SSD)**: The most critical component. Use a **2 TB+ NVMe SSD** with: +- **CPU**: Node operation doesn't require heavy CPU power. The BG Client has run well on both i3 and i5 models of the ASUS NUC 13 PRO. Be cautious if using Celeron processors, as they may have limitations. +- **RAM**: At least **32 GB** is recommended for good performance with overhead. +- **Storage (SSD)**: The most critical component. Use a **2 TB+ NVMe SSD** with: - * A **DRAM cache** - * **No Quad-Level Cell (QLC)** NAND architecture + - A **DRAM cache** + - **No Quad-Level Cell (QLC)** NAND architecture See this [SSD List Gist](https://gist.github.com/bkase/fab02c5b3c404e9ef8e5c2071ac1558c) for tested options. --- From 05f944b1057a54f86dd3e0b53f75737cfac52acc Mon Sep 17 00:00:00 2001 From: emperorsixpacks Date: Mon, 6 Oct 2025 10:57:40 +0100 Subject: [PATCH 03/18] fix: updater path --- pkg/installer.go | 5 ++--- pkg/updater/updater.go | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/installer.go b/pkg/installer.go index 9b11440..a4d3540 100644 --- a/pkg/installer.go +++ b/pkg/installer.go @@ -151,7 +151,7 @@ func (i *installer) getClientFileName(client types.ClientType, version string) ( return "", err } fileName = fmt.Sprintf("geth-%s-%s-%s-%s", - goos, gethArch, version, gethHash[:8]) + goos, gethArch, version, gethHash[:8]) case types.ClientReth: fileName = fmt.Sprintf("reth-v%s-%s", version, archName) case types.ClientLighthouse: @@ -298,7 +298,7 @@ func (i *installer) installClientBinary(client types.ClientType, clientDir, clie case types.ClientJuno: return i.installJunoClient(client, clientDir, downloadURL, fileName) default: - return i.installStandardClient(client, clientDir, downloadURL, fileName) + return i.installStandardClient(client, clientPath, downloadURL, fileName) } } @@ -359,7 +359,6 @@ func (i *installer) installStandardClient(client types.ClientType, clientDir, do // Download file fmt.Printf("Downloading %s.\n", client) if err := downloadFile(downloadURL, archivePath); err != nil { - fmt.Println(err) return err } diff --git a/pkg/updater/updater.go b/pkg/updater/updater.go index 8ee21e3..8424265 100644 --- a/pkg/updater/updater.go +++ b/pkg/updater/updater.go @@ -115,7 +115,7 @@ func (u *UpdateChecker) UpdateClient(client string) *UpdateResult { installer := pkg.NewInstaller() clientType := types.GetClientType(client) - // Remove old version (using RemoveClient function if available) + // TODO Remove old version (using RemoveClient function if available) fmt.Printf("Removing old %s installation...\n", client) // Install new version @@ -124,8 +124,7 @@ func (u *UpdateChecker) UpdateClient(client string) *UpdateResult { return result } - // Get new version (placeholder - you'd implement actual version detection) - newVersion, err := versions.FetchOnlineVersion(client) // Placeholder + newVersion, err := versions.FetchOnlineVersion(client) if err != nil { fmt.Println(err) return nil From 95be4122f63f2538e33e5ccc01fbdac8ae1d80d3 Mon Sep 17 00:00:00 2001 From: emperorsixpacks Date: Mon, 6 Oct 2025 12:52:23 +0100 Subject: [PATCH 04/18] fix: installer --- pkg/installer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/installer.go b/pkg/installer.go index a4d3540..e38265e 100644 --- a/pkg/installer.go +++ b/pkg/installer.go @@ -298,7 +298,7 @@ func (i *installer) installClientBinary(client types.ClientType, clientDir, clie case types.ClientJuno: return i.installJunoClient(client, clientDir, downloadURL, fileName) default: - return i.installStandardClient(client, clientPath, downloadURL, fileName) + return i.installStandardClient(client, clientDir, downloadURL, fileName) } } From 9afb1e2d039308ee7318fcb4feebf4ab0a8044af Mon Sep 17 00:00:00 2001 From: Adamu Jethro <45628811+JayWebtech@users.noreply.github.com> Date: Mon, 6 Oct 2025 06:35:09 -0700 Subject: [PATCH 05/18] Revert "feat : docs" --- docs/.gitignore | 36 - docs/DOCS_GUIDE.md | 291 ----- docs/README.md | 2 +- docs/next.config.ts | 7 - docs/package-lock.json | 1667 ------------------------- docs/package.json | 2 +- docs/postcss.config.mjs | 5 - docs/public/file.svg | 1 - docs/public/globe.svg | 1 - docs/public/next.svg | 1 - docs/public/vercel.svg | 1 - docs/public/window.svg | 1 - docs/src/app/clients/page.tsx | 254 ---- docs/src/app/commands/page.tsx | 157 --- docs/src/app/configuration/page.tsx | 331 ----- docs/src/app/contributing/page.tsx | 265 ---- docs/src/app/favicon.ico | Bin 25931 -> 0 bytes docs/src/app/getting-started/page.tsx | 228 ---- docs/src/app/globals.css | 93 -- docs/src/app/installation/page.tsx | 179 --- docs/src/app/layout.tsx | 40 - docs/src/app/page.tsx | 144 --- docs/src/app/requirements/page.tsx | 319 ----- docs/src/app/validator/page.tsx | 239 ---- docs/src/components/CodeBlock.tsx | 35 - docs/src/components/Header.tsx | 41 - docs/src/components/Sidebar.tsx | 60 - docs/tailwind.config.ts | 16 - docs/tsconfig.json | 27 - 29 files changed, 2 insertions(+), 4441 deletions(-) delete mode 100644 docs/.gitignore delete mode 100644 docs/DOCS_GUIDE.md delete mode 100644 docs/next.config.ts delete mode 100644 docs/package-lock.json delete mode 100644 docs/postcss.config.mjs delete mode 100644 docs/public/file.svg delete mode 100644 docs/public/globe.svg delete mode 100644 docs/public/next.svg delete mode 100644 docs/public/vercel.svg delete mode 100644 docs/public/window.svg delete mode 100644 docs/src/app/clients/page.tsx delete mode 100644 docs/src/app/commands/page.tsx delete mode 100644 docs/src/app/configuration/page.tsx delete mode 100644 docs/src/app/contributing/page.tsx delete mode 100644 docs/src/app/favicon.ico delete mode 100644 docs/src/app/getting-started/page.tsx delete mode 100644 docs/src/app/globals.css delete mode 100644 docs/src/app/installation/page.tsx delete mode 100644 docs/src/app/layout.tsx delete mode 100644 docs/src/app/page.tsx delete mode 100644 docs/src/app/requirements/page.tsx delete mode 100644 docs/src/app/validator/page.tsx delete mode 100644 docs/src/components/CodeBlock.tsx delete mode 100644 docs/src/components/Header.tsx delete mode 100644 docs/src/components/Sidebar.tsx delete mode 100644 docs/tailwind.config.ts delete mode 100644 docs/tsconfig.json diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index fd3dbb5..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1,36 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/docs/DOCS_GUIDE.md b/docs/DOCS_GUIDE.md deleted file mode 100644 index 160be49..0000000 --- a/docs/DOCS_GUIDE.md +++ /dev/null @@ -1,291 +0,0 @@ -# Starknode-kit Documentation Guide - -This guide explains how to run and develop the starknode-kit documentation site. - -## Quick Start - -### Installation - -```bash -cd docs -npm install -``` - -### Development Server - -Run the development server: - -```bash -npm run dev -``` - -Open [http://localhost:3000](http://localhost:3000) in your browser to see the documentation. - -The page auto-updates as you edit files. - -### Production Build - -Build for production: - -```bash -npm run build -npm start -``` - -## Documentation Structure - -``` -docs/ -├── src/ -│ ├── app/ # Next.js pages (App Router) -│ │ ├── page.tsx # Homepage -│ │ ├── layout.tsx # Root layout with sidebar/header -│ │ ├── globals.css # Global styles -│ │ ├── getting-started/ # Getting started guide -│ │ ├── installation/ # Installation guide -│ │ ├── configuration/ # Configuration docs -│ │ ├── commands/ # Command reference -│ │ ├── clients/ # Client documentation -│ │ ├── validator/ # Validator setup guide -│ │ ├── requirements/ # Requirements page -│ │ └── contributing/ # Contributing guide -│ └── components/ # Reusable components -│ ├── Sidebar.tsx # Navigation sidebar -│ ├── Header.tsx # Top header with search -│ └── CodeBlock.tsx # Code block component -├── public/ # Static assets -├── package.json # Dependencies -└── README.md # Documentation README - -``` - -## Features - -### GitBook-Style Layout - -- **Fixed Sidebar** - Navigation always visible on the left -- **Header** - Search and links at the top -- **Content Area** - Main documentation content -- **Responsive** - Works on mobile and desktop - -### Components - -#### Sidebar (`components/Sidebar.tsx`) - -- Hierarchical navigation -- Active page highlighting -- Collapsible sections -- Links to all documentation pages - -#### Header (`components/Header.tsx`) - -- Search bar (placeholder, can be enhanced) -- GitHub link -- Telegram link -- Dark mode support - -#### CodeBlock (`components/CodeBlock.tsx`) - -- Syntax-highlighted code blocks -- Copy-to-clipboard button -- Language support -- Dark theme optimized - -### Styling - -- **Tailwind CSS** - Utility-first CSS framework -- **Dark Mode** - Automatic based on system preference -- **Custom Scrollbars** - Styled for better UX -- **Prose** - Typography optimized for documentation - -## Adding New Pages - -### 1. Create Page File - -Create a new `page.tsx` in the appropriate directory: - -```bash -mkdir -p src/app/your-page -``` - -```tsx -// src/app/your-page/page.tsx -import CodeBlock from '@/components/CodeBlock'; - -export default function YourPage() { - return ( -
-

Your Page Title

-

Your content here...

- - -
- ); -} -``` - -### 2. Add to Navigation - -Update `src/components/Sidebar.tsx`: - -```tsx -const navigation: NavItem[] = [ - // ... existing items - { title: 'Your Page', href: '/your-page' }, -]; -``` - -### 3. Test - -```bash -npm run dev -``` - -Visit `http://localhost:3000/your-page` - -## Deployment - -### Vercel (Recommended) - -1. Push to GitHub -2. Import project in Vercel -3. Deploy automatically - -### Self-Hosted - -```bash -npm run build -npm start -``` - -Or use a process manager like PM2: - -```bash -pm2 start npm --name "starknode-docs" -- start -``` - -### Static Export - -For static hosting (GitHub Pages, etc.): - -```bash -# Add to next.config.ts: -# output: 'export' - -npm run build -# Output will be in 'out/' directory -``` - -## Customization - -### Colors - -Edit `src/app/globals.css`: - -```css -:root { - --background: #ffffff; - --foreground: #171717; -} -``` - -### Fonts - -Edit `src/app/layout.tsx`: - -```tsx -import { Inter } from "next/font/google"; - -const inter = Inter({ - subsets: ["latin"], - variable: "--font-inter", -}); -``` - -### Navigation - -Edit `src/components/Sidebar.tsx`: - -```tsx -const navigation: NavItem[] = [ - // Add/remove/reorder items -]; -``` - -## Tips - -### Use CodeBlock Component - -```tsx -import CodeBlock from '@/components/CodeBlock'; - - -``` - -### Use Prose Styling - -Always wrap content in prose div: - -```tsx -
- {/* Your content */} -
-``` - -### Add Info Boxes - -```tsx -
-

💡 Tip

-

Your tip here

-
-``` - -### Link Between Pages - -```tsx -import Link from 'next/link'; - -Other Page -``` - -## Troubleshooting - -### Port Already in Use - -```bash -# Kill process on port 3000 -lsof -i :3000 -kill -9 [PID] - -# Or use different port -PORT=3001 npm run dev -``` - -### Build Errors - -```bash -# Clean and rebuild -rm -rf .next node_modules -npm install -npm run build -``` - -### Styling Not Updating - -```bash -# Clear Next.js cache -rm -rf .next -npm run dev -``` - -## Resources - -- [Next.js Documentation](https://nextjs.org/docs) -- [Tailwind CSS](https://tailwindcss.com/docs) -- [React Documentation](https://react.dev/) - -## Contributing - -See the main [Contributing Guide](../CONTRIBUTING.md) for guidelines on contributing to the documentation. - diff --git a/docs/README.md b/docs/README.md index f787ecc..d394eff 100644 --- a/docs/README.md +++ b/docs/README.md @@ -72,4 +72,4 @@ This project is licensed under the MIT License - see the [LICENSE](https://githu --- -*Built with ❤️ by The Buidl Grid* +*Built with ❤️ by The Buidl Grid* \ No newline at end of file diff --git a/docs/next.config.ts b/docs/next.config.ts deleted file mode 100644 index e9ffa30..0000000 --- a/docs/next.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { NextConfig } from "next"; - -const nextConfig: NextConfig = { - /* config options here */ -}; - -export default nextConfig; diff --git a/docs/package-lock.json b/docs/package-lock.json deleted file mode 100644 index 281b15d..0000000 --- a/docs/package-lock.json +++ /dev/null @@ -1,1667 +0,0 @@ -{ - "name": "docs", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "docs", - "version": "0.1.0", - "dependencies": { - "next": "15.5.4", - "react": "19.1.0", - "react-dom": "19.1.0" - }, - "devDependencies": { - "@tailwindcss/postcss": "^4", - "@types/node": "^20", - "@types/react": "^19", - "@types/react-dom": "^19", - "tailwindcss": "^4", - "typescript": "^5" - } - }, - "node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz", - "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@img/colour": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz", - "integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@img/sharp-darwin-arm64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.4.tgz", - "integrity": "sha512-sitdlPzDVyvmINUdJle3TNHl+AG9QcwiAMsXmccqsCOMZNIdW2/7S26w0LyU8euiLVzFBL3dXPwVCq/ODnf2vA==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.2.3" - } - }, - "node_modules/@img/sharp-darwin-x64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.4.tgz", - "integrity": "sha512-rZheupWIoa3+SOdF/IcUe1ah4ZDpKBGWcsPX6MT0lYniH9micvIU7HQkYTfrx5Xi8u+YqwLtxC/3vl8TQN6rMg==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.2.3" - } - }, - "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.3.tgz", - "integrity": "sha512-QzWAKo7kpHxbuHqUC28DZ9pIKpSi2ts2OJnoIGI26+HMgq92ZZ4vk8iJd4XsxN+tYfNJxzH6W62X5eTcsBymHw==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.3.tgz", - "integrity": "sha512-Ju+g2xn1E2AKO6YBhxjj+ACcsPQRHT0bhpglxcEf+3uyPY+/gL8veniKoo96335ZaPo03bdDXMv0t+BBFAbmRA==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.3.tgz", - "integrity": "sha512-x1uE93lyP6wEwGvgAIV0gP6zmaL/a0tGzJs/BIDDG0zeBhMnuUPm7ptxGhUbcGs4okDJrk4nxgrmxpib9g6HpA==", - "cpu": [ - "arm" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.3.tgz", - "integrity": "sha512-I4RxkXU90cpufazhGPyVujYwfIm9Nk1QDEmiIsaPwdnm013F7RIceaCc87kAH+oUB1ezqEvC6ga4m7MSlqsJvQ==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-ppc64": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.3.tgz", - "integrity": "sha512-Y2T7IsQvJLMCBM+pmPbM3bKT/yYJvVtLJGfCs4Sp95SjvnFIjynbjzsa7dY1fRJX45FTSfDksbTp6AGWudiyCg==", - "cpu": [ - "ppc64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.3.tgz", - "integrity": "sha512-RgWrs/gVU7f+K7P+KeHFaBAJlNkD1nIZuVXdQv6S+fNA6syCcoboNjsV2Pou7zNlVdNQoQUpQTk8SWDHUA3y/w==", - "cpu": [ - "s390x" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.3.tgz", - "integrity": "sha512-3JU7LmR85K6bBiRzSUc/Ff9JBVIFVvq6bomKE0e63UXGeRw2HPVEjoJke1Yx+iU4rL7/7kUjES4dZ/81Qjhyxg==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.3.tgz", - "integrity": "sha512-F9q83RZ8yaCwENw1GieztSfj5msz7GGykG/BA+MOUefvER69K/ubgFHNeSyUu64amHIYKGDs4sRCMzXVj8sEyw==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.3.tgz", - "integrity": "sha512-U5PUY5jbc45ANM6tSJpsgqmBF/VsL6LnxJmIf11kB7J5DctHgqm0SkuXzVWtIY90GnJxKnC/JT251TDnk1fu/g==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-linux-arm": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.4.tgz", - "integrity": "sha512-Xyam4mlqM0KkTHYVSuc6wXRmM7LGN0P12li03jAnZ3EJWZqj83+hi8Y9UxZUbxsgsK1qOEwg7O0Bc0LjqQVtxA==", - "cpu": [ - "arm" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.2.3" - } - }, - "node_modules/@img/sharp-linux-arm64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.4.tgz", - "integrity": "sha512-YXU1F/mN/Wu786tl72CyJjP/Ngl8mGHN1hST4BGl+hiW5jhCnV2uRVTNOcaYPs73NeT/H8Upm3y9582JVuZHrQ==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.2.3" - } - }, - "node_modules/@img/sharp-linux-ppc64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.4.tgz", - "integrity": "sha512-F4PDtF4Cy8L8hXA2p3TO6s4aDt93v+LKmpcYFLAVdkkD3hSxZzee0rh6/+94FpAynsuMpLX5h+LRsSG3rIciUQ==", - "cpu": [ - "ppc64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-ppc64": "1.2.3" - } - }, - "node_modules/@img/sharp-linux-s390x": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.4.tgz", - "integrity": "sha512-qVrZKE9Bsnzy+myf7lFKvng6bQzhNUAYcVORq2P7bDlvmF6u2sCmK2KyEQEBdYk+u3T01pVsPrkj943T1aJAsw==", - "cpu": [ - "s390x" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.2.3" - } - }, - "node_modules/@img/sharp-linux-x64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.4.tgz", - "integrity": "sha512-ZfGtcp2xS51iG79c6Vhw9CWqQC8l2Ot8dygxoDoIQPTat/Ov3qAa8qpxSrtAEAJW+UjTXc4yxCjNfxm4h6Xm2A==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.2.3" - } - }, - "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.4.tgz", - "integrity": "sha512-8hDVvW9eu4yHWnjaOOR8kHVrew1iIX+MUgwxSuH2XyYeNRtLUe4VNioSqbNkB7ZYQJj9rUTT4PyRscyk2PXFKA==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.2.3" - } - }, - "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.4.tgz", - "integrity": "sha512-lU0aA5L8QTlfKjpDCEFOZsTYGn3AEiO6db8W5aQDxj0nQkVrZWmN3ZP9sYKWJdtq3PWPhUNlqehWyXpYDcI9Sg==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.2.3" - } - }, - "node_modules/@img/sharp-wasm32": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.4.tgz", - "integrity": "sha512-33QL6ZO/qpRyG7woB/HUALz28WnTMI2W1jgX3Nu2bypqLIKx/QKMILLJzJjI+SIbvXdG9fUnmrxR7vbi1sTBeA==", - "cpu": [ - "wasm32" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", - "optional": true, - "dependencies": { - "@emnapi/runtime": "^1.5.0" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-arm64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.4.tgz", - "integrity": "sha512-2Q250do/5WXTwxW3zjsEuMSv5sUU4Tq9VThWKlU2EYLm4MB7ZeMwF+SFJutldYODXF6jzc6YEOC+VfX0SZQPqA==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-ia32": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.4.tgz", - "integrity": "sha512-3ZeLue5V82dT92CNL6rsal6I2weKw1cYu+rGKm8fOCCtJTR2gYeUfY3FqUnIJsMUPIH68oS5jmZ0NiJ508YpEw==", - "cpu": [ - "ia32" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-x64": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.4.tgz", - "integrity": "sha512-xIyj4wpYs8J18sVN3mSQjwrw7fKUqRw+Z5rnHNCy5fYTxigBz81u5mOMPmFumwjcn8+ld1ppptMBCLic1nz6ig==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@isaacs/fs-minipass": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", - "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^7.0.4" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@next/env": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.4.tgz", - "integrity": "sha512-27SQhYp5QryzIT5uO8hq99C69eLQ7qkzkDPsk3N+GuS2XgOgoYEeOav7Pf8Tn4drECOVDsDg8oj+/DVy8qQL2A==", - "license": "MIT" - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.4.tgz", - "integrity": "sha512-nopqz+Ov6uvorej8ndRX6HlxCYWCO3AHLfKK2TYvxoSB2scETOcfm/HSS3piPqc3A+MUgyHoqE6je4wnkjfrOA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.4.tgz", - "integrity": "sha512-QOTCFq8b09ghfjRJKfb68kU9k2K+2wsC4A67psOiMn849K9ZXgCSRQr0oVHfmKnoqCbEmQWG1f2h1T2vtJJ9mA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.4.tgz", - "integrity": "sha512-eRD5zkts6jS3VfE/J0Kt1VxdFqTnMc3QgO5lFE5GKN3KDI/uUpSyK3CjQHmfEkYR4wCOl0R0XrsjpxfWEA++XA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.4.tgz", - "integrity": "sha512-TOK7iTxmXFc45UrtKqWdZ1shfxuL4tnVAOuuJK4S88rX3oyVV4ZkLjtMT85wQkfBrOOvU55aLty+MV8xmcJR8A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.4.tgz", - "integrity": "sha512-7HKolaj+481FSW/5lL0BcTkA4Ueam9SPYWyN/ib/WGAFZf0DGAN8frNpNZYFHtM4ZstrHZS3LY3vrwlIQfsiMA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.4.tgz", - "integrity": "sha512-nlQQ6nfgN0nCO/KuyEUwwOdwQIGjOs4WNMjEUtpIQJPR2NUfmGpW2wkJln1d4nJ7oUzd1g4GivH5GoEPBgfsdw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.4.tgz", - "integrity": "sha512-PcR2bN7FlM32XM6eumklmyWLLbu2vs+D7nJX8OAIoWy69Kef8mfiN4e8TUv2KohprwifdpFKPzIP1njuCjD0YA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.4.tgz", - "integrity": "sha512-1ur2tSHZj8Px/KMAthmuI9FMp/YFusMMGoRNJaRZMOlSkgvLjzosSdQI0cJAKogdHl3qXUQKL9MGaYvKwA7DXg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@swc/helpers": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", - "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.8.0" - } - }, - "node_modules/@tailwindcss/node": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.14.tgz", - "integrity": "sha512-hpz+8vFk3Ic2xssIA3e01R6jkmsAhvkQdXlEbRTk6S10xDAtiQiM3FyvZVGsucefq764euO/b8WUW9ysLdThHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/remapping": "^2.3.4", - "enhanced-resolve": "^5.18.3", - "jiti": "^2.6.0", - "lightningcss": "1.30.1", - "magic-string": "^0.30.19", - "source-map-js": "^1.2.1", - "tailwindcss": "4.1.14" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.14.tgz", - "integrity": "sha512-23yx+VUbBwCg2x5XWdB8+1lkPajzLmALEfMb51zZUBYaYVPDQvBSD/WYDqiVyBIo2BZFa3yw1Rpy3G2Jp+K0dw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^2.0.4", - "tar": "^7.5.1" - }, - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.1.14", - "@tailwindcss/oxide-darwin-arm64": "4.1.14", - "@tailwindcss/oxide-darwin-x64": "4.1.14", - "@tailwindcss/oxide-freebsd-x64": "4.1.14", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.14", - "@tailwindcss/oxide-linux-arm64-gnu": "4.1.14", - "@tailwindcss/oxide-linux-arm64-musl": "4.1.14", - "@tailwindcss/oxide-linux-x64-gnu": "4.1.14", - "@tailwindcss/oxide-linux-x64-musl": "4.1.14", - "@tailwindcss/oxide-wasm32-wasi": "4.1.14", - "@tailwindcss/oxide-win32-arm64-msvc": "4.1.14", - "@tailwindcss/oxide-win32-x64-msvc": "4.1.14" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.14.tgz", - "integrity": "sha512-a94ifZrGwMvbdeAxWoSuGcIl6/DOP5cdxagid7xJv6bwFp3oebp7y2ImYsnZBMTwjn5Ev5xESvS3FFYUGgPODQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.14.tgz", - "integrity": "sha512-HkFP/CqfSh09xCnrPJA7jud7hij5ahKyWomrC3oiO2U9i0UjP17o9pJbxUN0IJ471GTQQmzwhp0DEcpbp4MZTA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.14.tgz", - "integrity": "sha512-eVNaWmCgdLf5iv6Qd3s7JI5SEFBFRtfm6W0mphJYXgvnDEAZ5sZzqmI06bK6xo0IErDHdTA5/t7d4eTfWbWOFw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.14.tgz", - "integrity": "sha512-QWLoRXNikEuqtNb0dhQN6wsSVVjX6dmUFzuuiL09ZeXju25dsei2uIPl71y2Ic6QbNBsB4scwBoFnlBfabHkEw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.14.tgz", - "integrity": "sha512-VB4gjQni9+F0VCASU+L8zSIyjrLLsy03sjcR3bM0V2g4SNamo0FakZFKyUQ96ZVwGK4CaJsc9zd/obQy74o0Fw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.14.tgz", - "integrity": "sha512-qaEy0dIZ6d9vyLnmeg24yzA8XuEAD9WjpM5nIM1sUgQ/Zv7cVkharPDQcmm/t/TvXoKo/0knI3me3AGfdx6w1w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.14.tgz", - "integrity": "sha512-ISZjT44s59O8xKsPEIesiIydMG/sCXoMBCqsphDm/WcbnuWLxxb+GcvSIIA5NjUw6F8Tex7s5/LM2yDy8RqYBQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.14.tgz", - "integrity": "sha512-02c6JhLPJj10L2caH4U0zF8Hji4dOeahmuMl23stk0MU1wfd1OraE7rOloidSF8W5JTHkFdVo/O7uRUJJnUAJg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.14.tgz", - "integrity": "sha512-TNGeLiN1XS66kQhxHG/7wMeQDOoL0S33x9BgmydbrWAb9Qw0KYdd8o1ifx4HOGDWhVmJ+Ul+JQ7lyknQFilO3Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.14.tgz", - "integrity": "sha512-uZYAsaW/jS/IYkd6EWPJKW/NlPNSkWkBlaeVBi/WsFQNP05/bzkebUL8FH1pdsqx4f2fH/bWFcUABOM9nfiJkQ==", - "bundleDependencies": [ - "@napi-rs/wasm-runtime", - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util", - "@emnapi/wasi-threads", - "tslib" - ], - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.5.0", - "@emnapi/runtime": "^1.5.0", - "@emnapi/wasi-threads": "^1.1.0", - "@napi-rs/wasm-runtime": "^1.0.5", - "@tybys/wasm-util": "^0.10.1", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.14.tgz", - "integrity": "sha512-Az0RnnkcvRqsuoLH2Z4n3JfAef0wElgzHD5Aky/e+0tBUxUhIeIqFBTMNQvmMRSP15fWwmvjBxZ3Q8RhsDnxAA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.14.tgz", - "integrity": "sha512-ttblVGHgf68kEE4om1n/n44I0yGPkCPbLsqzjvybhpwa6mKKtgFfAzy6btc3HRmuW7nHe0OOrSeNP9sQmmH9XA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/postcss": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.14.tgz", - "integrity": "sha512-BdMjIxy7HUNThK87C7BC8I1rE8BVUsfNQSI5siQ4JK3iIa3w0XyVvVL9SXLWO//CtYTcp1v7zci0fYwJOjB+Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "@tailwindcss/node": "4.1.14", - "@tailwindcss/oxide": "4.1.14", - "postcss": "^8.4.41", - "tailwindcss": "4.1.14" - } - }, - "node_modules/@types/node": { - "version": "20.19.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", - "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@types/react": { - "version": "19.2.0", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.0.tgz", - "integrity": "sha512-1LOH8xovvsKsCBq1wnT4ntDUdCJKmnEakhsuoUSy6ExlHCkGP2hqnatagYTgFk6oeL0VU31u7SNjunPN+GchtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "19.2.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.0.tgz", - "integrity": "sha512-brtBs0MnE9SMx7px208g39lRmC5uHZs96caOJfTjFcYSLHNamvaSMfJNagChVNkup2SdtOxKX1FDBkRSJe1ZAg==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.2.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001747", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001747.tgz", - "integrity": "sha512-mzFa2DGIhuc5490Nd/G31xN1pnBnYMadtkyTjefPI7wzypqgCEpeWu9bJr0OnDsyKrW75zA9ZAt7pbQFmwLsQg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/client-only": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", - "license": "MIT" - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/detect-libc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.1.tgz", - "integrity": "sha512-ecqj/sy1jcK1uWrwpR67UhYrIFQ+5WlGxth34WquCbamhFA6hkkwiu37o6J5xCHdo1oixJRfVRw+ywV+Hq/0Aw==", - "devOptional": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.18.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", - "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/jiti": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", - "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/lightningcss": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz", - "integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-darwin-arm64": "1.30.1", - "lightningcss-darwin-x64": "1.30.1", - "lightningcss-freebsd-x64": "1.30.1", - "lightningcss-linux-arm-gnueabihf": "1.30.1", - "lightningcss-linux-arm64-gnu": "1.30.1", - "lightningcss-linux-arm64-musl": "1.30.1", - "lightningcss-linux-x64-gnu": "1.30.1", - "lightningcss-linux-x64-musl": "1.30.1", - "lightningcss-win32-arm64-msvc": "1.30.1", - "lightningcss-win32-x64-msvc": "1.30.1" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.1.tgz", - "integrity": "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.1.tgz", - "integrity": "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.1.tgz", - "integrity": "sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.1.tgz", - "integrity": "sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.1.tgz", - "integrity": "sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.1.tgz", - "integrity": "sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.1.tgz", - "integrity": "sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.1.tgz", - "integrity": "sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.1.tgz", - "integrity": "sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.1.tgz", - "integrity": "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/magic-string": { - "version": "0.30.19", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", - "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/minizlib": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", - "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "minipass": "^7.1.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/next": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/next/-/next-15.5.4.tgz", - "integrity": "sha512-xH4Yjhb82sFYQfY3vbkJfgSDgXvBB6a8xPs9i35k6oZJRoQRihZH+4s9Yo2qsWpzBmZ3lPXaJ2KPXLfkvW4LnA==", - "license": "MIT", - "dependencies": { - "@next/env": "15.5.4", - "@swc/helpers": "0.5.15", - "caniuse-lite": "^1.0.30001579", - "postcss": "8.4.31", - "styled-jsx": "5.1.6" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" - }, - "optionalDependencies": { - "@next/swc-darwin-arm64": "15.5.4", - "@next/swc-darwin-x64": "15.5.4", - "@next/swc-linux-arm64-gnu": "15.5.4", - "@next/swc-linux-arm64-musl": "15.5.4", - "@next/swc-linux-x64-gnu": "15.5.4", - "@next/swc-linux-x64-musl": "15.5.4", - "@next/swc-win32-arm64-msvc": "15.5.4", - "@next/swc-win32-x64-msvc": "15.5.4", - "sharp": "^0.34.3" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.1.0", - "@playwright/test": "^1.51.1", - "babel-plugin-react-compiler": "*", - "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", - "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - }, - "@playwright/test": { - "optional": true - }, - "babel-plugin-react-compiler": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/next/node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/react": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", - "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", - "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", - "license": "MIT", - "dependencies": { - "scheduler": "^0.26.0" - }, - "peerDependencies": { - "react": "^19.1.0" - } - }, - "node_modules/scheduler": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", - "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "license": "ISC", - "optional": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sharp": { - "version": "0.34.4", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.4.tgz", - "integrity": "sha512-FUH39xp3SBPnxWvd5iib1X8XY7J0K0X7d93sie9CJg2PO8/7gmg89Nve6OjItK53/MlAushNNxteBYfM6DEuoA==", - "hasInstallScript": true, - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "@img/colour": "^1.0.0", - "detect-libc": "^2.1.0", - "semver": "^7.7.2" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.34.4", - "@img/sharp-darwin-x64": "0.34.4", - "@img/sharp-libvips-darwin-arm64": "1.2.3", - "@img/sharp-libvips-darwin-x64": "1.2.3", - "@img/sharp-libvips-linux-arm": "1.2.3", - "@img/sharp-libvips-linux-arm64": "1.2.3", - "@img/sharp-libvips-linux-ppc64": "1.2.3", - "@img/sharp-libvips-linux-s390x": "1.2.3", - "@img/sharp-libvips-linux-x64": "1.2.3", - "@img/sharp-libvips-linuxmusl-arm64": "1.2.3", - "@img/sharp-libvips-linuxmusl-x64": "1.2.3", - "@img/sharp-linux-arm": "0.34.4", - "@img/sharp-linux-arm64": "0.34.4", - "@img/sharp-linux-ppc64": "0.34.4", - "@img/sharp-linux-s390x": "0.34.4", - "@img/sharp-linux-x64": "0.34.4", - "@img/sharp-linuxmusl-arm64": "0.34.4", - "@img/sharp-linuxmusl-x64": "0.34.4", - "@img/sharp-wasm32": "0.34.4", - "@img/sharp-win32-arm64": "0.34.4", - "@img/sharp-win32-ia32": "0.34.4", - "@img/sharp-win32-x64": "0.34.4" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/styled-jsx": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", - "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==", - "license": "MIT", - "dependencies": { - "client-only": "0.0.1" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/tailwindcss": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.14.tgz", - "integrity": "sha512-b7pCxjGO98LnxVkKjaZSDeNuljC4ueKUddjENJOADtubtdo8llTaJy7HwBMeLNSSo2N5QIAgklslK1+Ir8r6CA==", - "dev": true, - "license": "MIT" - }, - "node_modules/tapable": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", - "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/tar": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz", - "integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==", - "dev": true, - "license": "ISC", - "dependencies": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", - "minipass": "^7.1.2", - "minizlib": "^3.1.0", - "yallist": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - } - } -} diff --git a/docs/package.json b/docs/package.json index 38c5f8e..60823cd 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,4 +30,4 @@ "engines": { "node": ">=16.0.0" } -} +} \ No newline at end of file diff --git a/docs/postcss.config.mjs b/docs/postcss.config.mjs deleted file mode 100644 index c7bcb4b..0000000 --- a/docs/postcss.config.mjs +++ /dev/null @@ -1,5 +0,0 @@ -const config = { - plugins: ["@tailwindcss/postcss"], -}; - -export default config; diff --git a/docs/public/file.svg b/docs/public/file.svg deleted file mode 100644 index 004145c..0000000 --- a/docs/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/public/globe.svg b/docs/public/globe.svg deleted file mode 100644 index 567f17b..0000000 --- a/docs/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/public/next.svg b/docs/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/docs/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/public/vercel.svg b/docs/public/vercel.svg deleted file mode 100644 index 7705396..0000000 --- a/docs/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/public/window.svg b/docs/public/window.svg deleted file mode 100644 index b2b2a44..0000000 --- a/docs/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/src/app/clients/page.tsx b/docs/src/app/clients/page.tsx deleted file mode 100644 index e83e87c..0000000 --- a/docs/src/app/clients/page.tsx +++ /dev/null @@ -1,254 +0,0 @@ -import Link from 'next/link'; - -export default function Clients() { - return ( -
-

Supported Clients

- -

- starknode-kit supports multiple client implementations for both Ethereum - and Starknet networks. -

- -

Why Multiple Clients?

- -

- Running diverse client implementations is crucial for network health and - resilience. Client diversity prevents single points of failure and - reduces the impact of bugs in any one implementation. -

- -

Ethereum Clients

- -

- To run an Ethereum node, you need both an{" "} - execution client and a consensus client - . They work together to validate and process Ethereum blocks post-merge. -

- -
-
-

Execution Clients

-

Handle transaction execution and state management

-
    -
  • • Geth (Go)
  • -
  • • Reth (Rust)
  • -
-
- -
-

Consensus Clients

-

Handle proof-of-stake consensus mechanism

-
    -
  • • Lighthouse (Rust)
  • -
  • • Prysm (Go)
  • -
-
-
- -

Starknet Clients

- -

- Starknet clients allow you to run a Starknet full node, enabling interaction with the Starknet Layer 2 network. -

- -
-
-

Starknet Clients

-

Full node implementations for Starknet

-
    -
  • • Juno (Go) - Full node client
  • -
  • • Starknet Validator - Validator client for staking
  • -
-
-
- -

Client Combinations

- -

Popular client combinations for Ethereum nodes:

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExecutionConsensusCharacteristics
GethLighthouseMost popular, well-tested
RethLighthouseHigh performance, modern
GethPrysmStable, feature-rich
RethPrysmPerformance-focused
-
- -

Choosing Clients

- -

Execution Clients

- -

Geth

-
    -
  • ✅ Most widely used and tested
  • -
  • ✅ Excellent documentation
  • -
  • ✅ Large community support
  • -
  • ✅ Stable and reliable
  • -
  • ⚠️ Higher resource usage
  • -
  • ⚠️ Larger disk footprint
  • -
- -

Reth

-
    -
  • ✅ Excellent performance
  • -
  • ✅ Lower disk usage
  • -
  • ✅ Modern codebase (Rust)
  • -
  • ✅ Fast sync times
  • -
  • ⚠️ Newer, less battle-tested
  • -
  • ⚠️ Smaller community
  • -
- -

Consensus Clients

- -

Lighthouse

-
    -
  • ✅ Fast and efficient
  • -
  • ✅ Low resource usage
  • -
  • ✅ Great documentation
  • -
  • ✅ Active development
  • -
  • ✅ Written in Rust
  • -
- -

Prysm

-
    -
  • ✅ Feature-rich
  • -
  • ✅ Good performance
  • -
  • ✅ Strong community
  • -
  • ✅ Comprehensive tooling
  • -
  • ✅ Written in Go
  • -
- -

Starknet Clients

- -

Juno

-
    -
  • ✅ Official full node client
  • -
  • ✅ Well-maintained
  • -
  • ✅ Fast sync
  • -
  • ✅ Active community
  • -
  • ✅ Required for Starknet validator
  • -
- -

Resource Requirements by Client

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClientRAMDiskCPU
Geth16+ GB~1.2 TB4+ cores
Reth16+ GB~900 GB4+ cores
Lighthouse8+ GB~200 GB2+ cores
Prysm8+ GB~250 GB2+ cores
Juno8+ GB~300 GB2+ cores
-
- -
-

💡 Recommendation

-

- For most users, we recommend Reth + Lighthouse for Ethereum (best performance) - and Juno for Starknet. -

-
- -

Client Diversity

- -

- Client diversity is critical for network health. If a single client has a bug and it's used by the majority of nodes, - it could cause network issues or even finality problems. -

- -

Current client distribution matters! Consider using minority clients to help decentralize the network.

- -

Switching Clients

- -

You can switch clients at any time:

- -
    -
  1. Stop your current clients: starknode-kit stop
  2. -
  3. Remove old client: starknode-kit remove --execution_client geth
  4. -
  5. Add new client: starknode-kit add --execution_client reth
  6. -
  7. Start nodes: starknode-kit start
  8. -
- -
-

⚠️ Note

-

- Switching clients may require re-syncing from scratch, which can take several days. - Plan accordingly and ensure you have sufficient disk space. -

-
- -
-

📖 Next Steps

-

- Ready to dive deeper? Check out our validator guide: -

-
- Validator Guide -
-
-
- ); -} - diff --git a/docs/src/app/commands/page.tsx b/docs/src/app/commands/page.tsx deleted file mode 100644 index 3fd0b4f..0000000 --- a/docs/src/app/commands/page.tsx +++ /dev/null @@ -1,157 +0,0 @@ -import Link from 'next/link'; -import CodeBlock from '@/components/CodeBlock'; - -export default function Commands() { - return ( -
-

Commands Reference

- -

- Complete reference for all starknode-kit commands. Each command helps - you manage different aspects of your Ethereum and Starknet nodes. -

- -

Command Overview

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CommandDescription
addAdd an Ethereum or Starknet client to the config
completionGenerate the autocompletion script for the specified shell
configCreate, show, and update your Starknet node configuration
monitorLaunch real-time monitoring dashboard
removeRemove a specified resource
runRun a specific local infrastructure service
startRun the configured Ethereum clients
statusDisplay status of running clients
stopStop the configured Ethereum clients
updateCheck for and install client updates
validatorManage the Starknet validator client
versionShow version of starknode-kit or a specific client
-
- -

Quick Examples

- -

Add Clients

- - -

Configure Network

- - -

- Start Ethereum Clients -

- - -

Monitor Nodes

- - -

Check Status

- - -

- Run Individual Client -

- - -

- Stop Ethereum Clients -

- - -

Check Version

- - -

Getting Help

- -

- For any command, you can use the --help flag to get - detailed usage information: -

- - - -

Shell Completion

- -

- Generate autocompletion scripts for your shell: -

- - /etc/bash_completion.d/starknode-kit - -# Zsh -starknode-kit completion zsh > "\${fpath[1]}/_starknode-kit" - -# Fish -starknode-kit completion fish > ~/.config/fish/completions/starknode-kit.fish`} - /> - -
-

📖 Next Steps

-

- Ready to dive deeper? Check out our comprehensive guides: -

-
- Supported Clients -
-
-
- ); -} - diff --git a/docs/src/app/configuration/page.tsx b/docs/src/app/configuration/page.tsx deleted file mode 100644 index 3cee155..0000000 --- a/docs/src/app/configuration/page.tsx +++ /dev/null @@ -1,331 +0,0 @@ -import CodeBlock from '@/components/CodeBlock'; -import Link from 'next/link'; - -export default function Configuration() { - return ( -
-

Configuration

- -

- Learn how to configure starknode-kit for your Ethereum and Starknet - nodes. -

- -

Configuration File

- -

- starknode-kit stores its configuration in a YAML file located at: -

- - - -

- Creating a Configuration -

- -

- Generate a new configuration file with default settings: -

- - - -

- Viewing Configuration -

- -

View your entire configuration:

- - - -

View specific sections:

- - - -

- Configuration Structure -

- -

- The configuration file has the following structure: -

- - - -

- Modifying Configuration -

- -

Change Network

- -

- Switch between mainnet, sepolia, or custom networks: -

- - - -

- Configure Execution Client -

- -

Set execution client and ports:

- - - -

- Configure Consensus Client -

- -

Set consensus client and checkpoint:

- - - -

- Configure Juno (Starknet) -

- -

Configure your Juno Starknet client:

- - - -

Network Settings

- -

starknode-kit supports multiple networks:

- -
    -
  • - mainnet - Ethereum and Starknet mainnet -
  • -
  • - sepolia - Ethereum Sepolia and Starknet Sepolia - testnet -
  • -
- -
-

⚠️ Important

-

- Changing the network will affect all clients. Make sure to stop your - nodes before changing networks. -

-
- -

- Port Configuration -

- -

Default Ports

- -

Default ports for each client:

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClientPortsPurpose
Geth8545, 8546, 30303HTTP RPC, WS RPC, P2P
Reth8545, 8546, 30303HTTP RPC, WS RPC, P2P
Lighthouse5052, 9000HTTP API, P2P
Prysm4000, 13000HTTP API, P2P
Juno6060RPC
-
- -

- Validator Configuration -

- -

- For validator nodes, additional configuration is required. See the - Validator Setup page for details. -

- -

- Environment Variables -

- -

- Some sensitive data can be stored as environment variables: -

- -
    -
  • - STARKNET_WALLET - Wallet address -
  • -
  • - STARKNET_PRIVATE_KEY - Private key -
  • -
  • - STARKNET_PUBLIC_KEY - Public key -
  • -
  • - STARKNET_CLASS_HASH - Class hash -
  • -
  • - STARKNET_SALT - Salt value -
  • -
- -

- Configuration Best Practices -

- -
    -
  1. - Backup your config - Keep a backup of your - configuration file -
  2. -
  3. - Use environment variables - Store sensitive data in - environment variables -
  4. -
  5. - Document changes - Keep notes of any custom - configurations -
  6. -
  7. - Test on testnet - Always test configuration changes - on a testnet first -
  8. -
- -

Troubleshooting

- -

- Configuration not loading -

- -

- If your configuration isn't loading, check: -

- -
    -
  • - File exists at ~/.starknode-kit/starknode.yml -
  • -
  • File has correct YAML syntax
  • -
  • - File has correct permissions (readable by your user) -
  • -
- -

Port conflicts

- -

If you get port conflicts:

- -
    -
  • - Check if ports are already in use: lsof -i :[port] -
  • -
  • Configure different ports in your config
  • -
  • Stop conflicting services
  • -
- -
-

📖 Next Steps

-

- Ready to dive deeper? Check out our comprehensive guides: -

-
- Commands Reference -
-
-
- ); -} - diff --git a/docs/src/app/contributing/page.tsx b/docs/src/app/contributing/page.tsx deleted file mode 100644 index d003597..0000000 --- a/docs/src/app/contributing/page.tsx +++ /dev/null @@ -1,265 +0,0 @@ -import CodeBlock from '@/components/CodeBlock'; -import Link from 'next/link'; - -export default function Contributing() { - return ( -
-

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:

- - - -

2. Clone Your Fork

- - - -

3. Set Up Development Environment

- -

Make sure you have the required tools:

- -
    -
  • Go 1.24 or later
  • -
  • Make
  • -
  • Git
  • -
- - - -

4. Create a Branch

- -

Create a branch for your changes:

- - - -

Development Workflow

- -

Project Structure

- - - -

Making Changes

- -
    -
  1. Write your code - Implement your feature or fix
  2. -
  3. Follow Go conventions - Use gofmt and follow Go best practices
  4. -
  5. Add tests - Write tests for your changes when applicable
  6. -
  7. Update documentation - Update README or add docs as needed
  8. -
- -

Testing

- -

Run tests before submitting:

- - - -

Code Style

- -

Format your code with gofmt:

- - - -

Submitting Changes

- -

1. Commit Your Changes

- -

Write clear, descriptive commit messages:

- - - -

2. Push to Your Fork

- - - -

3. Create a Pull Request

- -
    -
  1. Go to the original repository on GitHub
  2. -
  3. Click "New Pull Request"
  4. -
  5. Select your fork and branch
  6. -
  7. Fill out the PR template with: -
      -
    • Description of changes
    • -
    • Related issues
    • -
    • Testing performed
    • -
    • Screenshots (if UI changes)
    • -
    -
  8. -
  9. Submit the pull request
  10. -
- -

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. -
  3. Steps to reproduce - How to trigger the bug
  4. -
  5. Expected behavior - What should happen
  6. -
  7. Actual behavior - What actually happens
  8. -
  9. Environment - OS, Go version, starknode-kit version
  10. -
  11. Logs - Relevant log output or error messages
  12. -
- - - -

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. -

-
- - -
- ); -} - diff --git a/docs/src/app/favicon.ico b/docs/src/app/favicon.ico deleted file mode 100644 index 718d6fea4835ec2d246af9800eddb7ffb276240c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m diff --git a/docs/src/app/getting-started/page.tsx b/docs/src/app/getting-started/page.tsx deleted file mode 100644 index f7e0251..0000000 --- a/docs/src/app/getting-started/page.tsx +++ /dev/null @@ -1,228 +0,0 @@ -import Link from "next/link"; -import CodeBlock from "@/components/CodeBlock"; - -export default function GettingStarted() { - return ( -
-

Getting Started

- -

- Welcome to starknode-kit! This guide will help you get up and running - with your Ethereum and Starknet nodes in just a few minutes. -

- -

Prerequisites

- -

Before you begin, make sure you have:

- -
    -
  • - Operating System: Linux or macOS (Windows via WSL) -
  • -
  • - Go: Version 1.24 or later (if building from source) -
  • -
  • - Storage: At least 2TB of free SSD space -
  • -
  • - RAM: Minimum 32GB recommended -
  • -
  • - Network: Stable internet connection -
  • -
- -
-

📝 Note

-

- For detailed hardware requirements, check out our{" "} - - Requirements page - - . -

-
- -

Installation

- -

- The quickest way to install starknode-kit is using the installation - script: -

- - - -

This script will:

-
    -
  • - Download the latest version of starknode-kit -
  • -
  • - Install it to /usr/local/bin/ -
  • -
  • - Create necessary configuration directories -
  • -
- -

- Initial Configuration -

- -

- After installation, generate your initial configuration file: -

- - - -

- This creates a configuration file at{" "} - ~/.starknode-kit/starknode.yml with default settings. -

- -

- Add Your First Clients -

- -

- Ethereum Clients (Execution + Consensus) -

- -

- To run an Ethereum node, you need both an execution client and a - consensus client: -

- - - -

Or with Reth and Prysm:

- - - -

Starknet Client

- -

To add a Starknet client (Juno):

- - - -

Configure Network

- -

- By default, starknode-kit is configured for mainnet. To change to a - test network: -

- - - -

Start Your Nodes

- -

- Start Ethereum Clients -

- -

- To start your configured Ethereum execution and consensus clients: -

- - - -
-

⚠️ Important

-

- The start command only launches Ethereum clients - (execution + consensus). It does not start Starknet clients. -

-
- -

- Run Individual Clients -

- -

To run a specific client:

- - - -

Monitor Your Nodes

- -

- Launch the real-time monitoring dashboard to see the status of your - nodes: -

- - - -

The monitoring dashboard provides real-time insights:

- -
-
-
- 🔄 -
-

Node Sync Status

-

Real-time synchronization progress and health

-
-
-
- -
-
- 📊 -
-

Current Block Height

-

Latest block number and sync progress

-
-
-
- -
-
- 🌐 -
-

Network Statistics

-

Peer connections and network performance

-
-
-
- -
-
- 💻 -
-

System Resources

-

CPU, RAM, and disk usage metrics

-
-
-
-
- -

Check Status

- -

- For a quick status check of all running clients: -

- - - -
-

📖 Next Steps

-

- Ready to dive deeper? Check out our installation guide: -

-
- Installation Guide -
-
-
- ); -} - diff --git a/docs/src/app/globals.css b/docs/src/app/globals.css deleted file mode 100644 index b60e14f..0000000 --- a/docs/src/app/globals.css +++ /dev/null @@ -1,93 +0,0 @@ -@import "tailwindcss"; - -body { - font-family: var(--font-inter), system-ui, -apple-system, sans-serif; - line-height: 1.7; -} - -/* Scrollbar styling */ -::-webkit-scrollbar { - width: 8px; - height: 8px; -} - -::-webkit-scrollbar-track { - background: transparent; -} - -::-webkit-scrollbar-thumb { - background: #cbd5e0; - border-radius: 4px; -} - -::-webkit-scrollbar-thumb:hover { - background: #a0aec0; -} - -/* Prose styling for documentation */ -.prose { - max-width: none; - line-height: 1.8; -} - -.prose p { - margin-bottom: 1.5rem; -} - -.prose h2 { - margin-top: 3rem; - margin-bottom: 1.5rem; -} - -.prose h3 { - margin-bottom: 1.25rem; -} - -.prose a { - color: #2563eb; - text-decoration: none; - transition: color 0.2s; -} - -.prose a:hover { - color: #1d4ed8; - text-decoration: none; -} - -.prose code { - background: #f3f4f6; - padding: 0.2em 0.4em; - border-radius: 0.25rem; - font-size: 0.875em; - font-family: 'Courier New', monospace; -} - -.prose pre { - background: #1a202c !important; - padding: 1rem; - border-radius: 0.5rem; - overflow-x: auto; -} - -.prose pre code { - background: transparent; - padding: 0; - color: #e2e8f0; -} - -.prose table { - width: 100%; - border-collapse: collapse; -} - -.prose th { - text-align: left; - font-weight: 600; -} - -.prose blockquote { - border-left: 4px solid #e5e7eb; - padding-left: 1rem; - font-style: italic; - color: #6b7280; -} diff --git a/docs/src/app/installation/page.tsx b/docs/src/app/installation/page.tsx deleted file mode 100644 index 9dcd313..0000000 --- a/docs/src/app/installation/page.tsx +++ /dev/null @@ -1,179 +0,0 @@ -import Link from 'next/link'; -import CodeBlock from '@/components/CodeBlock'; - -export default function Installation() { - return ( -
-

Installation

- -

- There are multiple ways to install starknode-kit. Choose the method that - best suits your needs. -

- -

- Option 1: Install Script (Recommended) -

- -

- The easiest and recommended way to install starknode-kit: -

- - - -

- Or download the script first and then run it: -

- - - -

- Option 2: Install using Go -

- -

- If you have Go installed (version 1.24 or later), you can install - starknode-kit directly: -

- - - -

- This installs the latest version from the main branch. -

- -

- Option 3: Manual Installation from Source -

- -

- 1. Clone the Repository -

- - - -

2. Build and Install

- - - -

Verify Installation

- -

- After installation, verify that starknode-kit is working correctly: -

- - - -

You should see output similar to:

- - - -

Initial Setup

- -

- After successful installation, generate your configuration file: -

- - - -

- This creates a configuration file at{" "} - ~/.starknode-kit/starknode.yml. -

- -

Uninstallation

- -

- To uninstall starknode-kit, remove the binary and configuration - directory: -

- - - -
-

⚠️ Note

-

- This will not remove any client data (e.g., blockchain data). The data - is stored in the locations specified in your{" "} - ~/.starknode-kit/starknode.yml file. -

-
- -

Troubleshooting

- -

Command not found

- -

- If you get a "command not found" error, make sure{" "} - /usr/local/bin is in your PATH: -

- - - -

- Add this to your ~/.bashrc or ~/.zshrc to make - it permanent. -

- -

Permission denied

- -

- If you encounter permission issues during installation, make sure you - have sudo access or contact your system administrator. -

- -
-

📖 Next Steps

-

- Ready to dive deeper? Check out our configuration guide: -

-
- Configuration Guide -
-
-
- ); -} - diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx deleted file mode 100644 index 66099db..0000000 --- a/docs/src/app/layout.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import type { Metadata } from "next"; -import { Inter, Source_Code_Pro } from "next/font/google"; -import "./globals.css"; -import Sidebar from "@/components/Sidebar"; -import Header from "@/components/Header"; - -const inter = Inter({ - subsets: ["latin"], - variable: "--font-inter", -}); - -const source_code_pro = Source_Code_Pro({ - subsets: ["latin"], - variable: "--font-source-code" -}) - -export const metadata: Metadata = { - title: "starknode-kit Documentation", - description: "Complete documentation for starknode-kit - A CLI tool for setting up and managing Ethereum and Starknet nodes", -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - - -
-
-
- {children} -
-
- - - ); -} diff --git a/docs/src/app/page.tsx b/docs/src/app/page.tsx deleted file mode 100644 index ea7a66d..0000000 --- a/docs/src/app/page.tsx +++ /dev/null @@ -1,144 +0,0 @@ -import Link from "next/link"; -import CodeBlock from "@/components/CodeBlock"; - -export default function Home() { - return ( -
-

Welcome to starknode-kit

- -

- A powerful command-line tool to help developers and node operators - easily set up, manage, and maintain Ethereum and Starknet nodes. -

- -
- -

- 🚀 Getting Started -

-

- Learn how to install and configure starknode-kit for your node - setup. -

- - - -

- 📘 Commands -

-

- Explore all available commands and their usage. -

- - - -

- ⚙️ Configuration -

-

- Configure your Ethereum and Starknet clients. -

- - - -

- 🔐 Validator Setup -

-

- Set up and manage your Starknet validator node. -

- -
- -

Quick Start

- -

Install starknode-kit with a single command:

- - - -

Generate your configuration file:

- - - -

Add your first client pair:

- - - -

Key Features

- -
    -
  • - ✅ Easy Setup - Get your node running in minutes -
  • -
  • - ✅ Multi-Client Support - Works with Geth, Reth, - Lighthouse, Prysm, and Juno -
  • -
  • - ✅ Real-time Monitoring - Built-in dashboard to - monitor your nodes -
  • -
  • - ✅ Auto Updates - Keep your clients up to date - automatically -
  • -
  • - ✅ Validator Management - Simplified Starknet - validator operations -
  • -
  • - ✅ Network Flexibility - Support for mainnet, - sepolia, and custom networks -
  • -
- -

Supported Clients

- -
-
-

Execution Layer

-
    -
  • • Geth
  • -
  • • Reth
  • -
-
-
-

Consensus Layer

-
    -
  • • Lighthouse
  • -
  • • Prysm
  • -
-
-
-

Starknet

-
    -
  • • Juno
  • -
  • • Starknet Validator
  • -
-
-
- -
-

📖 Next Steps

-

- Ready to dive deeper? Check out our comprehensive guides: -

-
- Installation Guide -
-
-
- ); -} diff --git a/docs/src/app/requirements/page.tsx b/docs/src/app/requirements/page.tsx deleted file mode 100644 index 8ef1256..0000000 --- a/docs/src/app/requirements/page.tsx +++ /dev/null @@ -1,319 +0,0 @@ -import Link from 'next/link'; -import CodeBlock from '@/components/CodeBlock'; - -export default function Requirements() { - return ( -
-

Requirements

- -

- Hardware and software requirements for running Ethereum and Starknet - nodes with starknode-kit. -

- -

Hardware Requirements

- -
-

📚 Reference

-

- For a detailed breakdown of node hardware requirements, see the Rocket Pool Hardware Guide. -

-
- -

Minimum Requirements

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ComponentRequirementNotes
CPU4+ coresIntel i3/i5 or AMD equivalent. Avoid Celeron.
RAM32 GBMinimum 16GB, 32GB recommended for comfort
Storage2+ TB NVMe SSDMust have DRAM cache, no QLC NAND
Network100+ MbpsStable connection, unlimited data preferred
Power24/7 uptimeUPS recommended for validators
-
- -

Recommended Specifications

- -
    -
  • CPU: Intel i5/i7 or AMD Ryzen 5/7 (6+ cores)
  • -
  • RAM: 64 GB DDR4
  • -
  • Storage: 4 TB NVMe SSD with DRAM cache
  • -
  • Network: 1 Gbps fiber connection
  • -
  • Backup Power: UPS with 30+ minutes runtime
  • -
- -

Storage Requirements

- -

Storage is the most critical component for node operation.

- -

Storage Size

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClientCurrent SizeGrowth Rate
Ethereum (Geth)~1.2 TB~150 GB/year
Ethereum (Reth)~900 GB~120 GB/year
Lighthouse~200 GB~50 GB/year
Prysm~250 GB~60 GB/year
Juno (Starknet)~300 GB~100 GB/year
-
- -

SSD Requirements

- -

Your SSD must have:

- -
    -
  • DRAM cache - Essential for performance
  • -
  • TLC or better NAND - No QLC (Quad-Level Cell)
  • -
  • High endurance rating - 600+ TBW recommended
  • -
  • NVMe interface - SATA SSDs are too slow
  • -
- -
-

⚠️ Warning

-

- Using a QLC SSD or SSD without DRAM cache will result in poor performance and potential node failures. - See the tested SSD list for recommendations. -

-
- -

Software Requirements

- -

Operating System

- -

Supported operating systems:

- -
    -
  • Linux: Ubuntu 20.04+, Debian 11+, or other modern distributions
  • -
  • macOS: macOS 12 (Monterey) or later
  • -
  • Windows: Windows 10/11 with WSL2 (Ubuntu)
  • -
- -

Linux is highly recommended for production use.

- -

Required Software

- -

Go (for building from source)

- -

Version 1.24 or later required:

- - - -

Install from: https://go.dev/dl/

- -

Rust (for Starknet clients)

- -

Recommended for building Juno and other Starknet clients:

- - - -

Make

- -

Required for building certain clients:

- - - -

Network Requirements

- -

Bandwidth

- -
    -
  • Download: 100+ Mbps
  • -
  • Upload: 25+ Mbps
  • -
  • Data Cap: Unlimited (or 2+ TB/month)
  • -
- -

Ports

- -

Ensure these ports are accessible:

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PortProtocolPurpose
30303TCP/UDPEthereum execution P2P
9000TCP/UDPLighthouse consensus P2P
13000TCPPrysm consensus P2P
6060TCPJuno RPC (localhost only)
-
- -

For Validator Nodes

- -

Additional requirements for running a validator:

- -
    -
  • Uptime: 99.9%+ availability required
  • -
  • Backup Power: UPS mandatory
  • -
  • Monitoring: 24/7 monitoring and alerting
  • -
  • Backup Internet: Secondary connection recommended
  • -
  • Dedicated Hardware: No shared resources
  • -
- -

Tested Hardware Configurations

- -

Budget Build (~$800)

- -
    -
  • Intel NUC 13 PRO (i5)
  • -
  • 32 GB DDR4 RAM
  • -
  • 2 TB NVMe SSD (Samsung 980 PRO)
  • -
  • Ubuntu 22.04 LTS
  • -
- -

Recommended Build (~$1500)

- -
    -
  • Custom build: AMD Ryzen 7 or Intel i7
  • -
  • 64 GB DDR4 RAM
  • -
  • 4 TB NVMe SSD (Samsung 990 PRO)
  • -
  • 1 Gbps fiber connection
  • -
  • UPS with 30min+ runtime
  • -
  • Ubuntu 22.04 LTS
  • -
- -

Pro Build (~$3000+)

- -
    -
  • High-end workstation or server
  • -
  • 128 GB ECC RAM
  • -
  • 8 TB NVMe SSD (enterprise grade)
  • -
  • Redundant power supplies
  • -
  • Redundant network connections
  • -
  • Professional monitoring and alerting
  • -
- -

Cloud Providers

- -

If running in the cloud, recommended specifications:

- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
ProviderInstance TypeEst. Cost/Month
AWSm5.2xlarge + 4TB gp3~$500-700
Google Cloudn2-standard-8 + 4TB SSD~$600-800
AzureStandard_D8s_v3 + 4TB Premium SSD~$550-750
-
- -
-

💡 Cost Consideration

-

- Running on dedicated hardware is often more cost-effective long-term than cloud hosting, especially for validators. -

-
-
- ); -} - diff --git a/docs/src/app/validator/page.tsx b/docs/src/app/validator/page.tsx deleted file mode 100644 index 156aa27..0000000 --- a/docs/src/app/validator/page.tsx +++ /dev/null @@ -1,239 +0,0 @@ -import CodeBlock from '@/components/CodeBlock'; -import Link from 'next/link'; -export default function Validator() { - return ( -
-

Validator Setup

- -

- Set up and manage your Starknet validator node using starknode-kit. -

- -
-

⚠️ Important

-

- Running a validator requires significant responsibility. Make sure you - understand the requirements and risks before proceeding. -

-
- -

Prerequisites

- -

Before setting up a validator, ensure you have:

- -
    -
  • ✅ A fully synced Juno (Starknet) node
  • -
  • ✅ A Starknet wallet with sufficient funds for staking
  • -
  • ✅ Stable internet connection with 99.9%+ uptime
  • -
  • ✅ Understanding of validator responsibilities
  • -
- -

Installation

- -

The validator client is managed through starknode-kit. First, ensure you have starknode-kit installed and configured.

- -

Validator Commands

- -

Check Validator Status

- -

Check the status of your validator:

- - - -

Get Validator Version

- -

Check the installed version of the validator client:

- - - -

Set Juno RPC Endpoint

- -

Configure the Juno RPC endpoint for your validator:

- - - -

Or use a remote Juno node:

- - - -

Configuration

- -

Validator configuration is stored in your starknode-kit config file. Key settings include:

- - - -

Setting Up Environment Variables

- -

Store sensitive validator data in environment variables:

- - - -

Add these to your ~/.bashrc or ~/.zshrc to make them persistent.

- -

Starting Your Validator

- -

Step 1: Ensure Juno is Running

- -

Your Juno node must be fully synced and running:

- - - -

Step 2: Verify Configuration

- -

Check your validator configuration:

- - - -

Step 3: Start the Validator

- -

Start your validator client:

- - - -

Monitoring Your Validator

- -

Monitor your validator status:

- - - -

Validator Responsibilities

- -
    -
  1. Uptime - Maintain high availability (99.9%+)
  2. -
  3. Security - Keep your keys secure and never share them
  4. -
  5. Updates - Keep your validator software up to date
  6. -
  7. Monitoring - Actively monitor your validator performance
  8. -
  9. Backup - Maintain secure backups of your keys
  10. -
- -

Security Best Practices

- -
    -
  • ✅ Use hardware wallets when possible
  • -
  • ✅ Store keys in environment variables, not in config files
  • -
  • ✅ Use firewall to restrict access to validator ports
  • -
  • ✅ Enable SSH key-based authentication
  • -
  • ✅ Keep your server updated with security patches
  • -
  • ✅ Monitor for unusual activity
  • -
  • ✅ Have a disaster recovery plan
  • -
  • ❌ Never share your private keys
  • -
  • ❌ Don't run validators on shared hosting
  • -
  • ❌ Avoid storing keys in version control
  • -
- -

Staking and Commission

- -

Configure your validator's commission rate:

- - - -

This sets a 10% commission on staking rewards. Validators typically charge 5-15% commission.

- -

Troubleshooting

- -

Validator Not Connecting to Juno

- -

Check that:

-
    -
  • Juno is running: starknode-kit status
  • -
  • RPC endpoint is correct in config
  • -
  • Firewall allows connections to Juno port
  • -
- -

Keys Not Loading

- -

Verify environment variables are set:

- - - -

If empty, add to your shell profile and reload.

- -

Validator Offline

- -

If your validator goes offline:

-
    -
  1. ✅ Check system resources
  2. -
  3. ✅ Check network connectivity
  4. -
  5. ✅ Review validator logs
  6. -
  7. ✅ Restart validator if needed
  8. -
- -

Performance Metrics

- -

Monitor these key metrics:

- -
    -
  • Attestation rate - Percentage of successful attestations
  • -
  • Block proposals - Number of blocks proposed
  • -
  • Uptime - Validator availability percentage
  • -
  • Rewards - Staking rewards earned
  • -
- -

Validator Economics

- -

Understand the economics:

- -
    -
  • Minimum Stake - Required amount to become a validator
  • -
  • Rewards - Earned from successful validation
  • -
  • Commission - Your fee for running the validator
  • -
  • Penalties - For downtime or malicious behavior
  • -
- -
-

💡 Tip

-

- Start on the testnet (Sepolia) to familiarize yourself with validator operations before running on mainnet. -

-
- -

Resources

- - - -
-

📖 Next Steps

-

- Ready to dive deeper? Check out our comprehensive guides: -

-
- System Requirements -
-
-
- ); -} - diff --git a/docs/src/components/CodeBlock.tsx b/docs/src/components/CodeBlock.tsx deleted file mode 100644 index 8f6f33e..0000000 --- a/docs/src/components/CodeBlock.tsx +++ /dev/null @@ -1,35 +0,0 @@ -'use client'; - -import { useState } from 'react'; - -interface CodeBlockProps { - code: string; - language?: string; -} - -export default function CodeBlock({ code, language = 'bash' }: CodeBlockProps) { - const [copied, setCopied] = useState(false); - - const copyToClipboard = async () => { - await navigator.clipboard.writeText(code); - setCopied(true); - setTimeout(() => setCopied(false), 2000); - }; - - return ( -
-
- -
-
-        

{code}

-
-
- ); -} - diff --git a/docs/src/components/Header.tsx b/docs/src/components/Header.tsx deleted file mode 100644 index 7be998d..0000000 --- a/docs/src/components/Header.tsx +++ /dev/null @@ -1,41 +0,0 @@ -'use client'; - -import Link from 'next/link'; - -export default function Header() { - return ( -
-
-
- - - - - - - - - - -
-
-
- ); -} - diff --git a/docs/src/components/Sidebar.tsx b/docs/src/components/Sidebar.tsx deleted file mode 100644 index 0c7c350..0000000 --- a/docs/src/components/Sidebar.tsx +++ /dev/null @@ -1,60 +0,0 @@ -'use client'; - -import Link from 'next/link'; -import { usePathname } from 'next/navigation'; - -interface NavItem { - title: string; - href: string; -} - -const navigation: NavItem[] = [ - { title: 'Introduction', href: '/' }, - { title: 'Getting Started', href: '/getting-started' }, - { title: 'Installation', href: '/installation' }, - { title: 'Configuration', href: '/configuration' }, - { title: 'Commands', href: '/commands' }, - { title: 'Clients', href: '/clients' }, - { title: 'Validator Setup', href: '/validator' }, - { title: 'Requirements', href: '/requirements' }, - { title: 'Contributing', href: '/contributing' }, -]; - -export default function Sidebar() { - const pathname = usePathname(); - - const isActive = (href: string) => { - if (href === '/') return pathname === href; - return pathname.startsWith(href); - }; - - return ( - - ); -} - diff --git a/docs/tailwind.config.ts b/docs/tailwind.config.ts deleted file mode 100644 index f67c807..0000000 --- a/docs/tailwind.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Config } from "tailwindcss"; - -const config: Config = { - content: [ - "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", - "./src/components/**/*.{js,ts,jsx,tsx,mdx}", - "./src/app/**/*.{js,ts,jsx,tsx,mdx}", - ], - theme: { - extend: {}, - }, - plugins: [], -}; - -export default config; - diff --git a/docs/tsconfig.json b/docs/tsconfig.json deleted file mode 100644 index c133409..0000000 --- a/docs/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} From 02509511317e05ab70453667a60eb27f6216b5d8 Mon Sep 17 00:00:00 2001 From: JayWebtech Date: Mon, 6 Oct 2025 14:57:59 +0100 Subject: [PATCH 06/18] feat : documentation --- docs/.gitbook.yaml | 35 - docs/DEPLOYMENT.md | 316 --------- docs/README.md | 106 ++- docs/SUMMARY.md | 35 - docs/api-reference/commands.md | 473 -------------- docs/api-reference/configuration-schema.md | 605 ------------------ docs/api-reference/environment-variables.md | 323 ---------- docs/book.json | 24 - docs/client-management/adding-clients.md | 318 --------- docs/getting-started/configuration.md | 361 ----------- docs/getting-started/hardware-requirements.md | 193 ------ docs/getting-started/installation.md | 116 ---- docs/getting-started/quick-start.md | 205 ------ docs/next.config.ts | 7 + docs/operations/monitoring.md | 353 ---------- docs/operations/running-nodes.md | 383 ----------- docs/operations/troubleshooting.md | 538 ---------------- docs/operations/updates.md | 503 --------------- docs/package.json | 40 +- docs/postcss.config.mjs | 5 + docs/public/file.svg | 1 + docs/public/globe.svg | 1 + docs/public/next.svg | 1 + docs/public/vercel.svg | 1 + docs/public/window.svg | 1 + docs/src/app/clients/page.tsx | 254 ++++++++ docs/src/app/commands/page.tsx | 157 +++++ docs/src/app/configuration/page.tsx | 331 ++++++++++ docs/src/app/contributing/page.tsx | 265 ++++++++ docs/src/app/favicon.ico | Bin 0 -> 25931 bytes docs/src/app/getting-started/page.tsx | 228 +++++++ docs/src/app/globals.css | 93 +++ docs/src/app/installation/page.tsx | 179 ++++++ docs/src/app/layout.tsx | 40 ++ docs/src/app/page.tsx | 144 +++++ docs/src/app/requirements/page.tsx | 319 +++++++++ docs/src/app/validator/page.tsx | 239 +++++++ docs/src/components/CodeBlock.tsx | 35 + docs/src/components/Header.tsx | 41 ++ docs/src/components/Sidebar.tsx | 60 ++ docs/styles/website.css | 282 -------- docs/tailwind.config.ts | 16 + docs/tsconfig.json | 27 + 43 files changed, 2511 insertions(+), 5143 deletions(-) delete mode 100644 docs/.gitbook.yaml delete mode 100644 docs/DEPLOYMENT.md delete mode 100644 docs/SUMMARY.md delete mode 100644 docs/api-reference/commands.md delete mode 100644 docs/api-reference/configuration-schema.md delete mode 100644 docs/api-reference/environment-variables.md delete mode 100644 docs/book.json delete mode 100644 docs/client-management/adding-clients.md delete mode 100644 docs/getting-started/configuration.md delete mode 100644 docs/getting-started/hardware-requirements.md delete mode 100644 docs/getting-started/installation.md delete mode 100644 docs/getting-started/quick-start.md create mode 100644 docs/next.config.ts delete mode 100644 docs/operations/monitoring.md delete mode 100644 docs/operations/running-nodes.md delete mode 100644 docs/operations/troubleshooting.md delete mode 100644 docs/operations/updates.md create mode 100644 docs/postcss.config.mjs create mode 100644 docs/public/file.svg create mode 100644 docs/public/globe.svg create mode 100644 docs/public/next.svg create mode 100644 docs/public/vercel.svg create mode 100644 docs/public/window.svg create mode 100644 docs/src/app/clients/page.tsx create mode 100644 docs/src/app/commands/page.tsx create mode 100644 docs/src/app/configuration/page.tsx create mode 100644 docs/src/app/contributing/page.tsx create mode 100644 docs/src/app/favicon.ico create mode 100644 docs/src/app/getting-started/page.tsx create mode 100644 docs/src/app/globals.css create mode 100644 docs/src/app/installation/page.tsx create mode 100644 docs/src/app/layout.tsx create mode 100644 docs/src/app/page.tsx create mode 100644 docs/src/app/requirements/page.tsx create mode 100644 docs/src/app/validator/page.tsx create mode 100644 docs/src/components/CodeBlock.tsx create mode 100644 docs/src/components/Header.tsx create mode 100644 docs/src/components/Sidebar.tsx delete mode 100644 docs/styles/website.css create mode 100644 docs/tailwind.config.ts create mode 100644 docs/tsconfig.json diff --git a/docs/.gitbook.yaml b/docs/.gitbook.yaml deleted file mode 100644 index 1681f65..0000000 --- a/docs/.gitbook.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# GitBook configuration for Starknode Kit documentation - -root: ./ -structure: - readme: README.md - summary: SUMMARY.md - -plugins: - - search - - sharing - - fontsettings - - highlight - - livereload - - expandable-chapters - - anchors - - github - - edit-link - - copy-code-button - -pluginsConfig: - github: - url: https://github.com/thebuidl-grid/starknode-kit - edit-link: - base: https://github.com/thebuidl-grid/starknode-kit/edit/main/docs - label: Edit This Page - sharing: - facebook: false - twitter: true - google: false - weibo: false - instapaper: false - vk: false - all: - - twitter - - linkedin diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md deleted file mode 100644 index d1b32aa..0000000 --- a/docs/DEPLOYMENT.md +++ /dev/null @@ -1,316 +0,0 @@ -# Documentation Deployment Guide - -This guide covers how to deploy the Starknode Kit documentation using GitBook and other platforms. - -## GitBook Deployment - -### Option 1: GitBook.com (Recommended) - -1. **Create GitBook Account** - - Go to [GitBook.com](https://www.gitbook.com) - - Sign up with your GitHub account - -2. **Import Repository** - - Click "New Space" - - Select "Import from GitHub" - - Choose `thebuidl-grid/starknode-kit` - - Select the `docs` folder as the root - -3. **Configure Settings** - - Set title: "Starknode Kit Documentation" - - Set description: "Complete guide for Ethereum and Starknet node management" - - Enable public access - -4. **Custom Domain (Optional)** - - Go to Space Settings > Domains - - Add your custom domain (e.g., `docs.starknode-kit.com`) - - Update DNS records as instructed - -### Option 2: Self-Hosted GitBook - -1. **Install GitBook CLI** - ```bash - npm install -g gitbook-cli - ``` - -2. **Install Dependencies** - ```bash - cd docs - npm install - gitbook install - ``` - -3. **Build Documentation** - ```bash - gitbook build - ``` - -4. **Serve Locally** - ```bash - gitbook serve - ``` - -5. **Deploy to Web Server** - ```bash - # Copy built files to web server - rsync -av _book/ user@server:/var/www/docs/ - ``` - -## GitHub Pages Deployment - -### Automatic Deployment with GitHub Actions - -1. **Create GitHub Action** - ```yaml - # .github/workflows/docs.yml - name: Deploy Documentation - - on: - push: - branches: [ main ] - paths: [ 'docs/**' ] - - jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '16' - - - name: Install GitBook - run: npm install -g gitbook-cli - - - name: Build Documentation - run: | - cd docs - gitbook install - gitbook build - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/_book - ``` - -2. **Enable GitHub Pages** - - Go to repository Settings > Pages - - Select "GitHub Actions" as source - - The documentation will be available at `https://thebuidl-grid.github.io/starknode-kit` - -## Netlify Deployment - -1. **Connect Repository** - - Go to [Netlify](https://netlify.com) - - Connect your GitHub repository - -2. **Build Settings** - - Build command: `cd docs && gitbook build` - - Publish directory: `docs/_book` - -3. **Deploy** - - Netlify will automatically build and deploy - - Custom domain can be configured in site settings - -## Vercel Deployment - -1. **Install Vercel CLI** - ```bash - npm install -g vercel - ``` - -2. **Configure Project** - ```json - // vercel.json - { - "builds": [ - { - "src": "docs/package.json", - "use": "@vercel/static-build", - "config": { - "distDir": "_book" - } - } - ] - } - ``` - -3. **Deploy** - ```bash - cd docs - vercel --prod - ``` - -## Docker Deployment - -1. **Create Dockerfile** - ```dockerfile - FROM node:16-alpine - - WORKDIR /app - - # Install GitBook - RUN npm install -g gitbook-cli - - # Copy documentation - COPY docs/ ./docs/ - - # Build documentation - WORKDIR /app/docs - RUN gitbook install && gitbook build - - # Serve with nginx - FROM nginx:alpine - COPY --from=0 /app/docs/_book /usr/share/nginx/html - EXPOSE 80 - ``` - -2. **Build and Run** - ```bash - docker build -t starknode-kit-docs . - docker run -p 8080:80 starknode-kit-docs - ``` - -## Continuous Integration - -### GitHub Actions Workflow - -```yaml -name: Documentation CI/CD - -on: - push: - branches: [ main ] - paths: [ 'docs/**' ] - pull_request: - branches: [ main ] - paths: [ 'docs/**' ] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '16' - - - name: Install dependencies - run: | - cd docs - npm install - npm install -g gitbook-cli - - - name: Build documentation - run: | - cd docs - gitbook install - gitbook build - - - name: Test build - run: | - cd docs - ls -la _book/ - - deploy: - needs: test - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - steps: - - uses: actions/checkout@v3 - - - name: Deploy to production - run: | - # Add deployment commands here - echo "Deploying to production..." -``` - -## Monitoring and Analytics - -### Google Analytics - -Add to `book.json`: -```json -{ - "pluginsConfig": { - "google-analytics": { - "token": "GA_TRACKING_ID" - } - } -} -``` - -### Search Engine Optimization - -1. **Add meta tags** to `README.md` -2. **Create sitemap** for better indexing -3. **Use descriptive URLs** and headings -4. **Add structured data** for rich snippets - -## Maintenance - -### Regular Updates - -1. **Content Updates** - - Review and update documentation monthly - - Keep examples current with latest versions - - Update screenshots and diagrams - -2. **Technical Updates** - - Update GitBook plugins regularly - - Test builds on different platforms - - Monitor for broken links - -3. **Performance Monitoring** - - Monitor page load times - - Check for broken links - - Review user feedback - -### Backup Strategy - -1. **Repository Backup** - - Documentation is stored in Git repository - - Regular backups to multiple locations - -2. **Build Artifacts** - - Store built documentation as releases - - Keep multiple versions for rollback - -## Troubleshooting - -### Common Issues - -**Build Failures** -```bash -# Clear cache and rebuild -rm -rf node_modules -npm install -gitbook install -gitbook build -``` - -**Plugin Issues** -```bash -# Update plugins -gitbook update -``` - -**Deployment Issues** -- Check build logs -- Verify file permissions -- Test locally first - -## Getting Help - -For deployment issues: - -- Check GitBook documentation -- Review platform-specific guides -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/README.md b/docs/README.md index d394eff..7f484bd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,75 +1,71 @@ -# Starknode Kit Documentation +# starknode-kit Documentation -Welcome to the comprehensive documentation for **Starknode Kit** - a powerful CLI tool for setting up, managing, and maintaining Ethereum and Starknet nodes. +Official documentation for starknode-kit, built with Next.js. -## 🚀 Quick Start - -Get up and running with Starknode Kit in minutes: +## Quick Start ```bash -# Install Starknode Kit -curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh | bash - -# Initialize configuration -starknode-kit init +# Install dependencies +npm install -# Add your first client -starknode-kit add --consensus_client lighthouse --execution_client geth - -# Start your node -starknode-kit start +# Run development server +npm run dev ``` -## 📚 Documentation Structure +Open [http://localhost:3000](http://localhost:3000) to view the documentation. -### Getting Started -- [Installation and Setup](getting-started/installation.md) -- [Hardware Requirements](getting-started/hardware-requirements.md) -- [Quick Start Guide](getting-started/quick-start.md) -- [Configuration](getting-started/configuration.md) +## Features -### Client Management -- [Adding Clients](client-management/adding-clients.md) -- [Ethereum Clients](client-management/ethereum-clients.md) -- [Starknet Clients](client-management/starknet-clients.md) -- [Client Configuration](client-management/client-configuration.md) +- 🎨 Light/Dark mode toggle +- 📱 Responsive design +- 🔍 Clean, simple navigation +- 📝 Comprehensive guides +- 💻 Code examples with copy button -### Operations -- [Running Nodes](operations/running-nodes.md) -- [Monitoring](operations/monitoring.md) -- [Updates and Maintenance](operations/updates.md) -- [Troubleshooting](operations/troubleshooting.md) +## Building -### Advanced Topics -- [Network Configuration](advanced/network-configuration.md) -- [Performance Optimization](advanced/performance.md) -- [Security Best Practices](advanced/security.md) -- [Custom Configurations](advanced/custom-configurations.md) +```bash +# Build for production +npm run build -### API Reference -- [Command Reference](api-reference/commands.md) -- [Configuration Schema](api-reference/configuration-schema.md) -- [Environment Variables](api-reference/environment-variables.md) +# Start production server +npm start +``` -## 🌟 Key Features +## Documentation Pages -- **🔧 Multi-Client Support**: Manage Ethereum (Geth, Reth, Lighthouse, Prysm) and Starknet (Juno) clients -- **⚡ Easy Setup**: One-command installation and configuration -- **📊 Real-time Monitoring**: Built-in monitoring dashboard -- **🔄 Auto-Updates**: Automatic client updates and maintenance -- **🌐 Network Flexibility**: Support for mainnet, testnets, and custom networks -- **🛡️ Production Ready**: Designed for both development and production environments +- **Introduction** - Overview and quick start +- **Getting Started** - Step-by-step setup guide +- **Installation** - Installation methods +- **Configuration** - Node configuration +- **Commands** - CLI command reference +- **Clients** - Supported clients (Geth, Reth, Lighthouse, Prysm, Juno) +- **Validator Setup** - Validator node setup +- **Requirements** - Hardware/software requirements +- **Contributing** - Contribution guidelines -## 🤝 Community and Support +## Project Structure -- **Telegram**: [Join our community](https://t.me/+SCPbza9fk8dkYWI0) -- **GitHub**: [Report issues and contribute](https://github.com/thebuidl-grid/starknode-kit) -- **Documentation**: This comprehensive guide +``` +docs/ +├── src/ +│ ├── app/ # Documentation pages +│ │ ├── page.tsx # Homepage +│ │ ├── layout.tsx # Root layout +│ │ ├── globals.css # Global styles +│ │ └── [pages]/ # Documentation pages +│ └── components/ # Reusable components +│ ├── Sidebar.tsx # Navigation sidebar +│ ├── Header.tsx # Top header +│ ├── ThemeToggle.tsx # Light/dark mode toggle +│ └── CodeBlock.tsx # Code block with copy +└── package.json +``` -## 📄 License +## Contributing -This project is licensed under the MIT License - see the [LICENSE](https://github.com/thebuidl-grid/starknode-kit/blob/main/LICENSE) file for details. +See the main [Contributing Guide](../README.md#contributing) for guidelines. ---- +## License -*Built with ❤️ by The Buidl Grid* \ No newline at end of file +MIT License - see LICENSE file for details. diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md deleted file mode 100644 index fa70d8b..0000000 --- a/docs/SUMMARY.md +++ /dev/null @@ -1,35 +0,0 @@ -# Table of Contents - -## Getting Started - -* [Installation and Setup](getting-started/installation.md) -* [Hardware Requirements](getting-started/hardware-requirements.md) -* [Quick Start Guide](getting-started/quick-start.md) -* [Configuration](getting-started/configuration.md) - -## Client Management - -* [Adding Clients](client-management/adding-clients.md) -* [Ethereum Clients](client-management/ethereum-clients.md) -* [Starknet Clients](client-management/starknet-clients.md) -* [Client Configuration](client-management/client-configuration.md) - -## Operations - -* [Running Nodes](operations/running-nodes.md) -* [Monitoring](operations/monitoring.md) -* [Updates and Maintenance](operations/updates.md) -* [Troubleshooting](operations/troubleshooting.md) - -## Advanced Topics - -* [Network Configuration](advanced/network-configuration.md) -* [Performance Optimization](advanced/performance.md) -* [Security Best Practices](advanced/security.md) -* [Custom Configurations](advanced/custom-configurations.md) - -## API Reference - -* [Command Reference](api-reference/commands.md) -* [Configuration Schema](api-reference/configuration-schema.md) -* [Environment Variables](api-reference/environment-variables.md) diff --git a/docs/api-reference/commands.md b/docs/api-reference/commands.md deleted file mode 100644 index ed53018..0000000 --- a/docs/api-reference/commands.md +++ /dev/null @@ -1,473 +0,0 @@ -# Command Reference - -Complete reference for all Starknode Kit commands, flags, and options. - -## Global Commands - -### `starknode-kit --help` - -Display help information for the Starknode Kit CLI. - -```bash -starknode-kit --help -``` - -**Output**: Shows available commands and global flags. - ---- - -## Core Commands - -### `init` - -Create a default configuration file. - -```bash -starknode-kit init -``` - -**Description**: Initializes a new configuration file with default settings. - -**Files Created**: -- `~/.starknode-kit/config.yaml` - -**Example**: -```bash -starknode-kit init -# Creates default configuration file -``` - ---- - -### `add` - -Add an Ethereum or Starknet client to the configuration. - -```bash -starknode-kit add [flags] -``` - -**Flags**: -- `-e, --execution_client string`: Execution client (geth, reth) -- `-c, --consensus_client string`: Consensus client (lighthouse, prysm) -- `-s, --starknet_client string`: Starknet client (juno) - -**Examples**: -```bash -# Add execution client -starknode-kit add --execution_client geth - -# Add consensus client -starknode-kit add --consensus_client lighthouse - -# Add Starknet client -starknode-kit add --starknet_client juno - -# Add client pair -starknode-kit add --execution_client geth --consensus_client lighthouse - -# Add all clients -starknode-kit add --execution_client geth --consensus_client lighthouse --starknet_client juno -``` - ---- - -### `config` - -Show and modify the current configuration. - -```bash -starknode-kit config [flags] [options] -``` - -**Flags**: -- `-n, --network string`: Set network (mainnet, sepolia, holesky) -- `--validate`: Validate configuration file - -**Options**: -- `el client= port=`: Configure execution client -- `cl client= port=`: Configure consensus client -- `starknet client= port=`: Configure Starknet client - -**Examples**: -```bash -# Show current configuration -starknode-kit config - -# Set network -starknode-kit config -n sepolia - -# Configure execution client -starknode-kit config el client=geth port=8545,8546 - -# Configure consensus client -starknode-kit config cl client=lighthouse port=9000,9001 - -# Validate configuration -starknode-kit config --validate -``` - ---- - -### `start` - -Start the configured Ethereum clients. - -```bash -starknode-kit start -``` - -**Description**: Starts execution and consensus clients. Does not start Starknet clients. - -**Examples**: -```bash -# Start all configured clients -starknode-kit start -``` - -**Note**: Use `starknode-kit run juno` to start Starknet clients. - ---- - -### `stop` - -Stop all running clients. - -```bash -starknode-kit stop -``` - -**Description**: Gracefully stops all running clients. - -**Examples**: -```bash -# Stop all clients -starknode-kit stop -``` - ---- - -### `run` - -Run local Starknet infrastructure services. - -```bash -starknode-kit run -``` - -**Subcommands**: -- `juno`: Run a Juno Starknet node - -**Examples**: -```bash -# Run Juno node -starknode-kit run juno -``` - ---- - -### `monitor` - -Launch the real-time monitoring dashboard. - -```bash -starknode-kit monitor [flags] -``` - -**Flags**: -- `--interval duration`: Refresh interval (default: 5s) -- `--basic`: Basic monitoring mode -- `--restart`: Restart monitoring service - -**Examples**: -```bash -# Start monitoring dashboard -starknode-kit monitor - -# Custom refresh interval -starknode-kit monitor --interval 10s - -# Basic monitoring mode -starknode-kit monitor --basic -``` - ---- - -### `remove` - -Remove a configured client. - -```bash -starknode-kit remove [flags] -``` - -**Flags**: -- `-e, --execution_client string`: Remove execution client -- `-c, --consensus_client string`: Remove consensus client -- `-s, --starknet_client string`: Remove Starknet client - -**Examples**: -```bash -# Remove execution client -starknode-kit remove --execution_client geth - -# Remove consensus client -starknode-kit remove --consensus_client lighthouse - -# Remove Starknet client -starknode-kit remove --starknet_client juno -``` - ---- - -### `update` - -Check for and install client updates. - -```bash -starknode-kit update [flags] -``` - -**Flags**: -- `-e, --execution_client string`: Update specific execution client -- `-c, --consensus_client string`: Update specific consensus client -- `-s, --starknet_client string`: Update specific Starknet client - -**Examples**: -```bash -# Update all clients -starknode-kit update - -# Update specific client -starknode-kit update --execution_client geth -starknode-kit update --consensus_client lighthouse -starknode-kit update --starknet_client juno -``` - ---- - -## Utility Commands - -### `completion` - -Generate shell completion scripts. - -```bash -starknode-kit completion -``` - -**Supported Shells**: -- `bash` -- `zsh` -- `fish` -- `powershell` - -**Examples**: -```bash -# Generate bash completion -starknode-kit completion bash - -# Install bash completion -starknode-kit completion bash > /etc/bash_completion.d/starknode-kit - -# Generate zsh completion -starknode-kit completion zsh > ~/.zsh/completions/_starknode-kit -``` - ---- - -## Global Flags - -### `-h, --help` - -Show help information for any command. - -```bash -starknode-kit --help -``` - -**Examples**: -```bash -starknode-kit add --help -starknode-kit config --help -starknode-kit start --help -``` - ---- - -## Command Combinations - -### Complete Setup Workflow - -```bash -# 1. Initialize configuration -starknode-kit init - -# 2. Add clients -starknode-kit add --execution_client geth --consensus_client lighthouse --starknet_client juno - -# 3. Configure network -starknode-kit config -n mainnet - -# 4. Start Ethereum clients -starknode-kit start - -# 5. Start Starknet client (in separate terminal) -starknode-kit run juno - -# 6. Monitor everything -starknode-kit monitor -``` - -### Development Workflow - -```bash -# 1. Set up testnet -starknode-kit config -n sepolia - -# 2. Add development clients -starknode-kit add --execution_client geth --consensus_client prysm - -# 3. Start clients -starknode-kit start - -# 4. Monitor progress -starknode-kit monitor -``` - -### Maintenance Workflow - -```bash -# 1. Check for updates -starknode-kit update - -# 2. Stop clients -starknode-kit stop - -# 3. Update clients -starknode-kit update - -# 4. Restart clients -starknode-kit start - -# 5. Verify status -starknode-kit monitor -``` - ---- - -## Exit Codes - -| Code | Description | -|------|-------------| -| `0` | Success | -| `1` | General error | -| `2` | Configuration error | -| `3` | Client error | -| `4` | Network error | -| `5` | Permission error | - ---- - -## Environment Variables - -### Configuration - -- `STARKNODE_CONFIG_PATH`: Custom config file path -- `STARKNODE_LOG_LEVEL`: Log level (debug, info, warn, error) -- `STARKNODE_DATA_DIR`: Custom data directory - -### Client Configuration - -- `GETH_CACHE`: Geth cache size -- `LIGHTHOUSE_MAX_PEERS`: Lighthouse max peers -- `JUNO_ETH_NODE`: Juno Ethereum node URL - -**Examples**: -```bash -# Set custom config path -export STARKNODE_CONFIG_PATH=/custom/path/config.yaml - -# Set log level -export STARKNODE_LOG_LEVEL=debug - -# Set Geth cache -export GETH_CACHE=4096 -``` - ---- - -## Configuration File Format - -The configuration file is in YAML format: - -```yaml -network: mainnet -execution_client: - name: geth - port: [8545, 8546] - execution_type: full - additional_args: [] -consensus_client: - name: lighthouse - port: [9000, 9001] - consensus_checkpoint: "" - additional_args: [] -starknet_client: - name: juno - port: [6060, 6061] - eth_node_url: "http://localhost:8545" - additional_args: [] -``` - ---- - -## Troubleshooting Commands - -### Debug Information - -```bash -# Show detailed configuration -starknode-kit config --validate - -# Check client status -starknode-kit config - -# Monitor with debug logs -starknode-kit monitor --interval 1s -``` - -### Log Analysis - -```bash -# View client logs -tail -f ~/.starknode-kit/logs/geth.log -tail -f ~/.starknode-kit/logs/lighthouse.log -tail -f ~/.starknode-kit/logs/juno.log - -# Search for errors -grep -i error ~/.starknode-kit/logs/*.log -``` - ---- - -## Getting Help - -For command-specific help: - -```bash -# General help -starknode-kit --help - -# Command help -starknode-kit --help - -# Subcommand help -starknode-kit run --help -``` - -For additional support: - -- Check the [Troubleshooting Guide](../operations/troubleshooting.md) -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/api-reference/configuration-schema.md b/docs/api-reference/configuration-schema.md deleted file mode 100644 index 0a6bac7..0000000 --- a/docs/api-reference/configuration-schema.md +++ /dev/null @@ -1,605 +0,0 @@ -# Configuration Schema - -Complete reference for the Starknode Kit configuration file format and all available options. - -## Configuration File Location - -- **Linux/macOS**: `~/.starknode-kit/config.yaml` -- **Windows**: `%USERPROFILE%\.starknode-kit\config.yaml` - -## Schema Overview - -```yaml -# Network configuration -network: string - -# Execution client configuration -execution_client: - name: string - port: [number, number] - execution_type: string - additional_args: [string] - env_vars: {string: string} - resource_limits: - memory: string - cpu: string - -# Consensus client configuration -consensus_client: - name: string - port: [number, number] - consensus_checkpoint: string - additional_args: [string] - env_vars: {string: string} - resource_limits: - memory: string - cpu: string - -# Starknet client configuration -starknet_client: - name: string - port: [number, number] - eth_node_url: string - additional_args: [string] - env_vars: {string: string} - resource_limits: - memory: string - cpu: string -``` - -## Network Configuration - -### `network` - -**Type**: `string` -**Required**: Yes -**Default**: `mainnet` - -**Valid Values**: -- `mainnet` - Ethereum mainnet -- `sepolia` - Sepolia testnet -- `holesky` - Holesky testnet -- `goerli` - Goerli testnet (deprecated) - -**Example**: -```yaml -network: mainnet -``` - -## Execution Client Configuration - -### `execution_client` - -**Type**: `object` -**Required**: No - -#### `execution_client.name` - -**Type**: `string` -**Required**: Yes - -**Valid Values**: -- `geth` - Go Ethereum client -- `reth` - Rust Ethereum client - -**Example**: -```yaml -execution_client: - name: geth -``` - -#### `execution_client.port` - -**Type**: `[number, number]` -**Required**: No -**Default**: `[8545, 8546]` - -**Description**: HTTP and WebSocket RPC ports - -**Example**: -```yaml -execution_client: - port: [8545, 8546] -``` - -#### `execution_client.execution_type` - -**Type**: `string` -**Required**: No -**Default**: `full` - -**Valid Values**: -- `full` - Full node with recent state -- `archive` - Complete historical data -- `light` - Minimal data, relies on peers - -**Example**: -```yaml -execution_client: - execution_type: full -``` - -#### `execution_client.additional_args` - -**Type**: `[string]` -**Required**: No -**Default**: `[]` - -**Description**: Additional command line arguments - -**Example**: -```yaml -execution_client: - additional_args: - - "--maxpeers" - - "50" - - "--cache" - - "4096" -``` - -#### `execution_client.env_vars` - -**Type**: `{string: string}` -**Required**: No -**Default**: `{}` - -**Description**: Environment variables for the client - -**Example**: -```yaml -execution_client: - env_vars: - GETH_CACHE: "4096" - GETH_MAXPEERS: "50" -``` - -#### `execution_client.resource_limits` - -**Type**: `object` -**Required**: No - -##### `execution_client.resource_limits.memory` - -**Type**: `string` -**Required**: No - -**Description**: Memory limit (e.g., "8Gi", "4G") - -**Example**: -```yaml -execution_client: - resource_limits: - memory: "8Gi" -``` - -##### `execution_client.resource_limits.cpu` - -**Type**: `string` -**Required**: No - -**Description**: CPU limit (e.g., "4", "2.5") - -**Example**: -```yaml -execution_client: - resource_limits: - cpu: "4" -``` - -## Consensus Client Configuration - -### `consensus_client` - -**Type**: `object` -**Required**: No - -#### `consensus_client.name` - -**Type**: `string` -**Required**: Yes - -**Valid Values**: -- `lighthouse` - Rust-based consensus client -- `prysm` - Go-based consensus client - -**Example**: -```yaml -consensus_client: - name: lighthouse -``` - -#### `consensus_client.port` - -**Type**: `[number, number]` -**Required**: No -**Default**: `[9000, 9001]` (Lighthouse), `[13000, 3500]` (Prysm) - -**Description**: P2P and HTTP API ports - -**Example**: -```yaml -consensus_client: - port: [9000, 9001] -``` - -#### `consensus_client.consensus_checkpoint` - -**Type**: `string` -**Required**: No -**Default**: `""` - -**Description**: Checkpoint URL for faster sync - -**Example**: -```yaml -consensus_client: - consensus_checkpoint: "https://mainnet.checkpoint.sigp.io" -``` - -#### `consensus_client.additional_args` - -**Type**: `[string]` -**Required**: No -**Default**: `[]` - -**Description**: Additional command line arguments - -**Example**: -```yaml -consensus_client: - additional_args: - - "--max-peers" - - "50" - - "--target-peers" - - "25" -``` - -#### `consensus_client.env_vars` - -**Type**: `{string: string}` -**Required**: No -**Default**: `{}` - -**Description**: Environment variables for the client - -**Example**: -```yaml -consensus_client: - env_vars: - LIGHTHOUSE_MAX_PEERS: "50" - LIGHTHOUSE_TARGET_PEERS: "25" -``` - -#### `consensus_client.resource_limits` - -**Type**: `object` -**Required**: No - -##### `consensus_client.resource_limits.memory` - -**Type**: `string` -**Required**: No - -**Description**: Memory limit (e.g., "4Gi", "2G") - -**Example**: -```yaml -consensus_client: - resource_limits: - memory: "4Gi" -``` - -##### `consensus_client.resource_limits.cpu` - -**Type**: `string` -**Required**: No - -**Description**: CPU limit (e.g., "2", "1.5") - -**Example**: -```yaml -consensus_client: - resource_limits: - cpu: "2" -``` - -## Starknet Client Configuration - -### `starknet_client` - -**Type**: `object` -**Required**: No - -#### `starknet_client.name` - -**Type**: `string` -**Required**: Yes - -**Valid Values**: -- `juno` - Go-based Starknet full node - -**Example**: -```yaml -starknet_client: - name: juno -``` - -#### `starknet_client.port` - -**Type**: `[number, number]` -**Required**: No -**Default**: `[6060, 6061]` - -**Description**: HTTP and WebSocket RPC ports - -**Example**: -```yaml -starknet_client: - port: [6060, 6061] -``` - -#### `starknet_client.eth_node_url` - -**Type**: `string` -**Required**: Yes - -**Description**: Ethereum node URL for L1 verification - -**Example**: -```yaml -starknet_client: - eth_node_url: "http://localhost:8545" -``` - -#### `starknet_client.additional_args` - -**Type**: `[string]` -**Required**: No -**Default**: `[]` - -**Description**: Additional command line arguments - -**Example**: -```yaml -starknet_client: - additional_args: - - "--max-peers" - - "50" - - "--log-level" - - "info" -``` - -#### `starknet_client.env_vars` - -**Type**: `{string: string}` -**Required**: No -**Default**: `{}` - -**Description**: Environment variables for the client - -**Example**: -```yaml -starknet_client: - env_vars: - JUNO_MAX_PEERS: "50" - JUNO_LOG_LEVEL: "info" -``` - -#### `starknet_client.resource_limits` - -**Type**: `object` -**Required**: No - -##### `starknet_client.resource_limits.memory` - -**Type**: `string` -**Required**: No - -**Description**: Memory limit (e.g., "4Gi", "2G") - -**Example**: -```yaml -starknet_client: - resource_limits: - memory: "4Gi" -``` - -##### `starknet_client.resource_limits.cpu` - -**Type**: `string` -**Required**: No - -**Description**: CPU limit (e.g., "2", "1.5") - -**Example**: -```yaml -starknet_client: - resource_limits: - cpu: "2" -``` - -## Complete Configuration Examples - -### Development Setup - -```yaml -network: sepolia -execution_client: - name: geth - port: [8545, 8546] - execution_type: full - additional_args: - - "--maxpeers" - - "25" - - "--cache" - - "2048" -consensus_client: - name: lighthouse - port: [9000, 9001] - additional_args: - - "--max-peers" - - "25" -starknet_client: - name: juno - port: [6060, 6061] - eth_node_url: "http://localhost:8545" - additional_args: - - "--max-peers" - - "25" -``` - -### Production Setup - -```yaml -network: mainnet -execution_client: - name: reth - port: [8545, 8546] - execution_type: full - additional_args: - - "--max-peers" - - "100" - - "--cache" - - "8192" - resource_limits: - memory: "16Gi" - cpu: "8" -consensus_client: - name: lighthouse - port: [9000, 9001] - consensus_checkpoint: "https://mainnet.checkpoint.sigp.io" - additional_args: - - "--max-peers" - - "50" - - "--target-peers" - - "25" - resource_limits: - memory: "8Gi" - cpu: "4" -starknet_client: - name: juno - port: [6060, 6061] - eth_node_url: "http://localhost:8545" - additional_args: - - "--max-peers" - - "50" - resource_limits: - memory: "8Gi" - cpu: "4" -``` - -### Archive Node Setup - -```yaml -network: mainnet -execution_client: - name: geth - port: [8545, 8546] - execution_type: archive - additional_args: - - "--cache" - - "16384" - - "--maxpeers" - - "100" - resource_limits: - memory: "32Gi" - cpu: "16" -consensus_client: - name: lighthouse - port: [9000, 9001] - execution_type: archive - additional_args: - - "--max-peers" - - "50" - resource_limits: - memory: "16Gi" - cpu: "8" -``` - -## Validation Rules - -### Required Fields - -- `network` - Must be a valid network name -- `execution_client.name` - Must be a valid execution client -- `consensus_client.name` - Must be a valid consensus client -- `starknet_client.name` - Must be a valid Starknet client -- `starknet_client.eth_node_url` - Must be a valid URL - -### Port Validation - -- Ports must be in range 1024-65535 -- Ports must not conflict with system ports -- HTTP and WebSocket ports must be different - -### Resource Limits - -- Memory must be in format "XGi" or "XG" -- CPU must be a positive number -- Limits must not exceed system resources - -## Environment Variables - -### Configuration Override - -Environment variables can override configuration file settings: - -```bash -# Override network -export STARKNODE_NETWORK=sepolia - -# Override execution client -export STARKNODE_EXECUTION_CLIENT=geth - -# Override consensus client -export STARKNODE_CONSENSUS_CLIENT=lighthouse -``` - -### Client-Specific Variables - -```bash -# Geth variables -export GETH_CACHE=4096 -export GETH_MAXPEERS=50 - -# Lighthouse variables -export LIGHTHOUSE_MAX_PEERS=50 -export LIGHTHOUSE_TARGET_PEERS=25 - -# Juno variables -export JUNO_MAX_PEERS=50 -export JUNO_LOG_LEVEL=info -``` - -## Configuration Management - -### Validation - -```bash -# Validate configuration -starknode-kit config --validate -``` - -### Backup - -```bash -# Backup configuration -cp ~/.starknode-kit/config.yaml ~/.starknode-kit/config.yaml.backup -``` - -### Reset - -```bash -# Reset to defaults -rm ~/.starknode-kit/config.yaml -starknode-kit init -``` - -## Getting Help - -For configuration issues: - -- Check the [Troubleshooting Guide](../operations/troubleshooting.md) -- Review client-specific documentation -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/api-reference/environment-variables.md b/docs/api-reference/environment-variables.md deleted file mode 100644 index 9fbd1e7..0000000 --- a/docs/api-reference/environment-variables.md +++ /dev/null @@ -1,323 +0,0 @@ -# Environment Variables - -Complete reference for all environment variables used by Starknode Kit and its clients. - -## Starknode Kit Variables - -### Configuration - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `STARKNODE_CONFIG_PATH` | Custom config file path | `~/.starknode-kit/config.yaml` | `/custom/path/config.yaml` | -| `STARKNODE_LOG_LEVEL` | Log level for Starknode Kit | `info` | `debug`, `info`, `warn`, `error` | -| `STARKNODE_DATA_DIR` | Custom data directory | `~/.starknode-kit/` | `/custom/data/path/` | -| `STARKNODE_NETWORK` | Override network setting | From config | `mainnet`, `sepolia`, `holesky` | -| `STARKNODE_EXECUTION_CLIENT` | Override execution client | From config | `geth`, `reth` | -| `STARKNODE_CONSENSUS_CLIENT` | Override consensus client | From config | `lighthouse`, `prysm` | -| `STARKNODE_STARKNET_CLIENT` | Override Starknet client | From config | `juno` | - -### Monitoring - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `STARKNODE_MONITOR_INTERVAL` | Monitoring refresh interval | `5s` | `10s`, `30s` | -| `STARKNODE_MONITOR_LOG_LEVEL` | Monitoring log level | `info` | `debug`, `info`, `warn` | -| `STARKNODE_MONITOR_METRICS` | Enable metrics collection | `true` | `true`, `false` | -| `STARKNODE_MONITOR_BASIC` | Use basic monitoring mode | `false` | `true`, `false` | - -## Execution Client Variables - -### Geth Variables - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `GETH_CACHE` | Memory cache size (MB) | `1024` | `4096`, `8192` | -| `GETH_MAXPEERS` | Maximum number of peers | `50` | `100`, `25` | -| `GETH_LIGHTKDF` | Use light KDF for key derivation | `false` | `true`, `false` | -| `GETH_NETWORKID` | Network ID | `1` (mainnet) | `11155111` (sepolia) | -| `GETH_DATADIR` | Data directory | `~/.starknode-kit/data/geth/` | `/custom/path/` | -| `GETH_HTTP_PORT` | HTTP RPC port | `8545` | `8547` | -| `GETH_WS_PORT` | WebSocket RPC port | `8546` | `8548` | -| `GETH_P2P_PORT` | P2P networking port | `30303` | `30305` | -| `GETH_HTTP_ADDR` | HTTP RPC address | `localhost` | `0.0.0.0` | -| `GETH_WS_ADDR` | WebSocket RPC address | `localhost` | `0.0.0.0` | -| `GETH_HTTP_API` | HTTP RPC API modules | `eth,net,web3` | `eth,net,web3,admin` | -| `GETH_WS_API` | WebSocket RPC API modules | `eth,net,web3` | `eth,net,web3,admin` | -| `GETH_HTTP_CORS` | HTTP RPC CORS origins | `*` | `http://localhost:3000` | -| `GETH_WS_ORIGINS` | WebSocket RPC origins | `*` | `http://localhost:3000` | -| `GETH_HTTP_VHOSTS` | HTTP RPC virtual hosts | `localhost` | `localhost,example.com` | -| `GETH_WS_VHOSTS` | WebSocket RPC virtual hosts | `localhost` | `localhost,example.com` | -| `GETH_METRICS` | Enable metrics | `false` | `true`, `false` | -| `GETH_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | -| `GETH_METRICS_PORT` | Metrics port | `6060` | `6061` | -| `GETH_PPROF` | Enable pprof | `false` | `true`, `false` | -| `GETH_PPROF_ADDR` | pprof address | `127.0.0.1` | `0.0.0.0` | -| `GETH_PPROF_PORT` | pprof port | `6060` | `6061` | - -### Reth Variables - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `RETH_DATADIR` | Data directory | `~/.starknode-kit/data/reth/` | `/custom/path/` | -| `RETH_HTTP_PORT` | HTTP RPC port | `8545` | `8547` | -| `RETH_WS_PORT` | WebSocket RPC port | `8546` | `8548` | -| `RETH_P2P_PORT` | P2P networking port | `30303` | `30305` | -| `RETH_HTTP_ADDR` | HTTP RPC address | `127.0.0.1` | `0.0.0.0` | -| `RETH_WS_ADDR` | WebSocket RPC address | `127.0.0.1` | `0.0.0.0` | -| `RETH_MAX_PEERS` | Maximum number of peers | `50` | `100`, `25` | -| `RETH_TARGET_PEERS` | Target number of peers | `25` | `50`, `15` | -| `RETH_CACHE_SIZE` | Cache size (MB) | `1024` | `4096`, `8192` | -| `RETH_NETWORK` | Network name | `mainnet` | `sepolia`, `holesky` | -| `RETH_CHAIN` | Chain specification | `mainnet` | `sepolia`, `holesky` | -| `RETH_HTTP_CORS` | HTTP RPC CORS origins | `*` | `http://localhost:3000` | -| `RETH_WS_ORIGINS` | WebSocket RPC origins | `*` | `http://localhost:3000` | -| `RETH_METRICS` | Enable metrics | `false` | `true`, `false` | -| `RETH_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | -| `RETH_METRICS_PORT` | Metrics port | `9001` | `9002` | - -## Consensus Client Variables - -### Lighthouse Variables - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `LIGHTHOUSE_DATADIR` | Data directory | `~/.starknode-kit/data/lighthouse/` | `/custom/path/` | -| `LIGHTHOUSE_P2P_PORT` | P2P networking port | `9000` | `9002` | -| `LIGHTHOUSE_HTTP_PORT` | HTTP API port | `9001` | `9003` | -| `LIGHTHOUSE_P2P_ADDR` | P2P address | `0.0.0.0` | `127.0.0.1` | -| `LIGHTHOUSE_HTTP_ADDR` | HTTP API address | `127.0.0.1` | `0.0.0.0` | -| `LIGHTHOUSE_MAX_PEERS` | Maximum number of peers | `50` | `100`, `25` | -| `LIGHTHOUSE_TARGET_PEERS` | Target number of peers | `25` | `50`, `15` | -| `LIGHTHOUSE_NETWORK` | Network name | `mainnet` | `sepolia`, `holesky` | -| `LIGHTHOUSE_CHECKPOINT_SYNC` | Checkpoint sync URL | `""` | `https://mainnet.checkpoint.sigp.io` | -| `LIGHTHOUSE_HTTP_CORS` | HTTP API CORS origins | `*` | `http://localhost:3000` | -| `LIGHTHOUSE_METRICS` | Enable metrics | `false` | `true`, `false` | -| `LIGHTHOUSE_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | -| `LIGHTHOUSE_METRICS_PORT` | Metrics port | `5054` | `5055` | -| `LIGHTHOUSE_LOG_LEVEL` | Log level | `info` | `debug`, `warn`, `error` | -| `LIGHTHOUSE_LOG_COLOR` | Colored log output | `true` | `true`, `false` | -| `LIGHTHOUSE_LOG_FILE` | Log file path | `~/.starknode-kit/logs/lighthouse.log` | `/custom/path/log.log` | - -### Prysm Variables - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `PRYSM_DATADIR` | Data directory | `~/.starknode-kit/data/prysm/` | `/custom/path/` | -| `PRYSM_P2P_PORT` | P2P networking port | `13000` | `13002` | -| `PRYSM_HTTP_PORT` | HTTP API port | `3500` | `3502` | -| `PRYSM_P2P_ADDR` | P2P address | `0.0.0.0` | `127.0.0.1` | -| `PRYSM_HTTP_ADDR` | HTTP API address | `127.0.0.1` | `0.0.0.0` | -| `PRYSM_MAX_PEERS` | Maximum number of peers | `50` | `100`, `25` | -| `PRYSM_TARGET_PEERS` | Target number of peers | `25` | `50`, `15` | -| `PRYSM_NETWORK` | Network name | `mainnet` | `sepolia`, `holesky` | -| `PRYSM_CHECKPOINT_SYNC` | Checkpoint sync URL | `""` | `https://beaconstate.info/` | -| `PRYSM_HTTP_CORS` | HTTP API CORS origins | `*` | `http://localhost:3000` | -| `PRYSM_METRICS` | Enable metrics | `false` | `true`, `false` | -| `PRYSM_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | -| `PRYSM_METRICS_PORT` | Metrics port | `8080` | `8081` | -| `PRYSM_LOG_LEVEL` | Log level | `info` | `debug`, `warn`, `error` | -| `PRYSM_LOG_FORMAT` | Log format | `text` | `text`, `json` | -| `PRYSM_LOG_FILE` | Log file path | `~/.starknode-kit/logs/prysm.log` | `/custom/path/log.log` | - -## Starknet Client Variables - -### Juno Variables - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `JUNO_DATADIR` | Data directory | `~/.starknode-kit/data/juno/` | `/custom/path/` | -| `JUNO_HTTP_PORT` | HTTP RPC port | `6060` | `6062` | -| `JUNO_WS_PORT` | WebSocket RPC port | `6061` | `6063` | -| `JUNO_HTTP_ADDR` | HTTP RPC address | `127.0.0.1` | `0.0.0.0` | -| `JUNO_WS_ADDR` | WebSocket RPC address | `127.0.0.1` | `0.0.0.0` | -| `JUNO_ETH_NODE` | Ethereum node URL | `http://localhost:8545` | `https://eth-mainnet.alchemyapi.io/v2/KEY` | -| `JUNO_MAX_PEERS` | Maximum number of peers | `50` | `100`, `25` | -| `JUNO_TARGET_PEERS` | Target number of peers | `25` | `50`, `15` | -| `JUNO_NETWORK` | Network name | `mainnet` | `sepolia`, `holesky` | -| `JUNO_CHAIN` | Chain specification | `mainnet` | `sepolia`, `holesky` | -| `JUNO_HTTP_CORS` | HTTP RPC CORS origins | `*` | `http://localhost:3000` | -| `JUNO_WS_ORIGINS` | WebSocket RPC origins | `*` | `http://localhost:3000` | -| `JUNO_METRICS` | Enable metrics | `false` | `true`, `false` | -| `JUNO_METRICS_ADDR` | Metrics address | `127.0.0.1` | `0.0.0.0` | -| `JUNO_METRICS_PORT` | Metrics port | `9090` | `9091` | -| `JUNO_LOG_LEVEL` | Log level | `info` | `debug`, `warn`, `error` | -| `JUNO_LOG_COLOR` | Colored log output | `true` | `true`, `false` | -| `JUNO_LOG_FILE` | Log file path | `~/.starknode-kit/logs/juno.log` | `/custom/path/log.log` | -| `JUNO_DB_PATH` | Database path | `~/.starknode-kit/data/juno/db/` | `/custom/db/path/` | -| `JUNO_CACHE_SIZE` | Cache size (MB) | `1024` | `4096`, `8192` | -| `JUNO_SYNC_MODE` | Sync mode | `full` | `full`, `light` | -| `JUNO_VERIFY_L1` | Verify L1 state | `true` | `true`, `false` | - -## System Variables - -### Resource Limits - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `STARKNODE_MEMORY_LIMIT` | Total memory limit | `16Gi` | `32Gi`, `8Gi` | -| `STARKNODE_CPU_LIMIT` | Total CPU limit | `4` | `8`, `2` | -| `STARKNODE_DISK_LIMIT` | Disk usage limit | `2Ti` | `4Ti`, `1Ti` | - -### Network - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `STARKNODE_NETWORK_INTERFACE` | Network interface | `auto` | `eth0`, `wlan0` | -| `STARKNODE_BANDWIDTH_LIMIT` | Bandwidth limit | `unlimited` | `100Mbps`, `1Gbps` | -| `STARKNODE_FIREWALL` | Enable firewall | `false` | `true`, `false` | - -### Security - -| Variable | Description | Default | Example | -|----------|-------------|---------|---------| -| `STARKNODE_SSL_CERT` | SSL certificate path | `""` | `/path/to/cert.pem` | -| `STARKNODE_SSL_KEY` | SSL private key path | `""` | `/path/to/key.pem` | -| `STARKNODE_AUTH_TOKEN` | Authentication token | `""` | `your-secret-token` | -| `STARKNODE_RATE_LIMIT` | Rate limit (req/min) | `1000` | `500`, `2000` | - -## Usage Examples - -### Development Environment - -```bash -# Set development network -export STARKNODE_NETWORK=sepolia - -# Configure for development -export GETH_CACHE=2048 -export GETH_MAXPEERS=25 -export LIGHTHOUSE_MAX_PEERS=25 -export JUNO_MAX_PEERS=25 - -# Enable debug logging -export STARKNODE_LOG_LEVEL=debug -export GETH_LOG_LEVEL=debug -export LIGHTHOUSE_LOG_LEVEL=debug -export JUNO_LOG_LEVEL=debug -``` - -### Production Environment - -```bash -# Set production network -export STARKNODE_NETWORK=mainnet - -# Configure for production -export GETH_CACHE=8192 -export GETH_MAXPEERS=100 -export LIGHTHOUSE_MAX_PEERS=50 -export JUNO_MAX_PEERS=50 - -# Enable metrics -export GETH_METRICS=true -export LIGHTHOUSE_METRICS=true -export JUNO_METRICS=true - -# Set resource limits -export STARKNODE_MEMORY_LIMIT=32Gi -export STARKNODE_CPU_LIMIT=8 -``` - -### High-Performance Setup - -```bash -# Use Reth for better performance -export STARKNODE_EXECUTION_CLIENT=reth - -# Configure for high performance -export RETH_CACHE_SIZE=16384 -export RETH_MAX_PEERS=100 -export LIGHTHOUSE_MAX_PEERS=50 -export JUNO_MAX_PEERS=50 - -# Enable all optimizations -export RETH_METRICS=true -export LIGHTHOUSE_METRICS=true -export JUNO_METRICS=true -``` - -## Environment File - -Create a `.env` file in your home directory: - -```bash -# ~/.starknode-kit/.env -STARKNODE_NETWORK=mainnet -STARKNODE_LOG_LEVEL=info - -# Geth settings -GETH_CACHE=4096 -GETH_MAXPEERS=50 - -# Lighthouse settings -LIGHTHOUSE_MAX_PEERS=50 -LIGHTHOUSE_TARGET_PEERS=25 - -# Juno settings -JUNO_MAX_PEERS=50 -JUNO_ETH_NODE=http://localhost:8545 -``` - -Load environment variables: - -```bash -# Load from .env file -source ~/.starknode-kit/.env - -# Or use dotenv -export $(cat ~/.starknode-kit/.env | xargs) -``` - -## Validation - -### Check Environment Variables - -```bash -# List all Starknode Kit variables -env | grep STARKNODE - -# List all client variables -env | grep -E "(GETH|LIGHTHOUSE|JUNO|RETH|PRYSM)" -``` - -### Validate Configuration - -```bash -# Validate with environment variables -starknode-kit config --validate - -# Check if variables are being used -starknode-kit config -``` - -## Best Practices - -### Security - -- Never commit `.env` files to version control -- Use strong authentication tokens -- Restrict network access in production -- Regularly rotate secrets - -### Performance - -- Set appropriate cache sizes for your hardware -- Monitor resource usage -- Adjust peer counts based on network conditions -- Use metrics to optimize settings - -### Maintenance - -- Document custom environment variables -- Keep variables organized in `.env` files -- Test changes in development first -- Monitor for deprecated variables - -## Getting Help - -For environment variable issues: - -- Check the [Troubleshooting Guide](../operations/troubleshooting.md) -- Review client-specific documentation -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/book.json b/docs/book.json deleted file mode 100644 index 981927c..0000000 --- a/docs/book.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "title": "Starknode Kit Documentation", - "description": "Complete guide for setting up, managing, and maintaining Ethereum and Starknet nodes with Starknode Kit", - "author": "The Buidl Grid", - "language": "en", - "structure": { - "readme": "README.md", - "summary": "SUMMARY.md" - }, - "plugins": [ - "theme-default", - "search", - "fontsettings", - "highlight" - ], - "pluginsConfig": { - "theme-default": { - "showLevel": true, - "styles": { - "website": "styles/website.css" - } - } - } -} \ No newline at end of file diff --git a/docs/client-management/adding-clients.md b/docs/client-management/adding-clients.md deleted file mode 100644 index 94e8d8c..0000000 --- a/docs/client-management/adding-clients.md +++ /dev/null @@ -1,318 +0,0 @@ -# Adding Clients - -This guide covers how to add and configure different types of clients (Ethereum execution, consensus, and Starknet) to your Starknode Kit setup. - -## Overview - -Starknode Kit supports three types of clients: - -- **Execution Clients**: Handle transaction execution and state management -- **Consensus Clients**: Handle block validation and consensus -- **Starknet Clients**: Handle Starknet L2 operations - -## Adding Execution Clients - -### Supported Execution Clients - -| Client | Language | Description | -|--------|----------|-------------| -| **Geth** | Go | Most popular Ethereum client | -| **Reth** | Rust | High-performance Rust implementation | - -### Add Geth - -```bash -starknode-kit add --execution_client geth -``` - -### Add Reth - -```bash -starknode-kit add --execution_client reth -``` - -### Execution Client Features - -**Geth**: -- Mature and stable -- Extensive documentation -- Large community support -- Good for most use cases - -**Reth**: -- High performance -- Modern architecture -- Fast sync capabilities -- Growing ecosystem - -## Adding Consensus Clients - -### Supported Consensus Clients - -| Client | Language | Description | -|--------|----------|-------------| -| **Lighthouse** | Rust | High-performance consensus client | -| **Prysm** | Go | Feature-rich consensus client | - -### Add Lighthouse - -```bash -starknode-kit add --consensus_client lighthouse -``` - -### Add Prysm - -```bash -starknode-kit add --consensus_client prysm -``` - -### Consensus Client Features - -**Lighthouse**: -- Fast sync performance -- Low resource usage -- Strong security focus -- Good for production - -**Prysm**: -- Rich feature set -- Web UI included -- Extensive tooling -- Good for development - -## Adding Starknet Clients - -### Supported Starknet Clients - -| Client | Language | Description | -|--------|----------|-------------| -| **Juno** | Go | Full Starknet node implementation | - -### Add Juno - -```bash -starknode-kit add --starknet_client juno -``` - -### Juno Features - -- Complete JSON-RPC support -- Fast synchronization -- Small database footprint -- WebSocket interface -- Production-ready - -## Adding Client Pairs - -### Complete Ethereum Setup - -Add both execution and consensus clients together: - -```bash -# Geth + Lighthouse -starknode-kit add --execution_client geth --consensus_client lighthouse - -# Reth + Prysm -starknode-kit add --execution_client reth --consensus_client prysm - -# Geth + Prysm -starknode-kit add --execution_client geth --consensus_client prysm -``` - -### Full Stack Setup - -Add all three client types: - -```bash -starknode-kit add --execution_client geth --consensus_client lighthouse --starknet_client juno -``` - -## Client Installation Process - -When you add a client, Starknode Kit: - -1. **Downloads** the client binary -2. **Installs** it to the appropriate location -3. **Configures** default settings -4. **Updates** your configuration file -5. **Validates** the installation - -### Installation Locations - -- **Linux/macOS**: `~/.starknode-kit/bin/` -- **Windows**: `%USERPROFILE%\.starknode-kit\bin\` - -## Configuration After Adding - -### View Added Clients - -```bash -# Show all configured clients -starknode-kit config - -# Show specific client type -starknode-kit config el # Execution clients -starknode-kit config cl # Consensus clients -starknode-kit config starknet # Starknet clients -``` - -### Customize Client Settings - -After adding, you can customize settings: - -```bash -# Change ports -starknode-kit config el client=geth port=8545,8546 - -# Set execution type -starknode-kit config el client=geth execution_type=archive - -# Add custom arguments -starknode-kit config el client=geth additional_args="--maxpeers,50,--cache,4096" -``` - -## Client Compatibility - -### Recommended Combinations - -**Production**: -- Geth + Lighthouse + Juno -- Reth + Lighthouse + Juno - -**Development**: -- Geth + Prysm + Juno -- Reth + Prysm + Juno - -**High Performance**: -- Reth + Lighthouse + Juno - -### Network Compatibility - -All clients support: -- Ethereum Mainnet -- Sepolia Testnet -- Holesky Testnet -- Custom networks - -## Troubleshooting Client Addition - -### Common Issues - -**Download Fails** -```bash -# Check internet connection -ping google.com - -# Check available disk space -df -h -``` - -**Permission Denied** -```bash -# Fix permissions -chmod +x ~/.starknode-kit/bin/* -``` - -**Client Already Exists** -```bash -# Remove existing client first -starknode-kit remove --execution_client geth - -# Then add again -starknode-kit add --execution_client geth -``` - -### Verification - -Verify client installation: - -```bash -# Check if binary exists -ls -la ~/.starknode-kit/bin/ - -# Test client version -~/.starknode-kit/bin/geth version -~/.starknode-kit/bin/lighthouse --version -~/.starknode-kit/bin/juno --version -``` - -## Client Updates - -### Check for Updates - -```bash -starknode-kit update -``` - -### Update Specific Client - -```bash -# Update all clients -starknode-kit update - -# Update specific client type -starknode-kit update --execution_client geth -starknode-kit update --consensus_client lighthouse -starknode-kit update --starknet_client juno -``` - -## Removing Clients - -### Remove Execution Client - -```bash -starknode-kit remove --execution_client geth -``` - -### Remove Consensus Client - -```bash -starknode-kit remove --consensus_client lighthouse -``` - -### Remove Starknet Client - -```bash -starknode-kit remove --starknet_client juno -``` - -### Remove All Clients - -```bash -starknode-kit remove --execution_client geth --consensus_client lighthouse --starknet_client juno -``` - -## Best Practices - -### Client Selection - -**For Beginners**: -- Start with Geth + Lighthouse -- Use default configurations -- Focus on stability - -**For Production**: -- Use Reth + Lighthouse for performance -- Configure resource limits -- Set up monitoring - -**For Development**: -- Use Geth + Prysm for features -- Enable debug logging -- Use testnets - -### Configuration Management - -- Keep configurations in version control -- Document custom settings -- Test changes on testnets first -- Monitor performance after changes - -## Getting Help - -For client-related issues: - -- Check the [Troubleshooting Guide](../operations/troubleshooting.md) -- Review client-specific documentation -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md deleted file mode 100644 index 9ef6861..0000000 --- a/docs/getting-started/configuration.md +++ /dev/null @@ -1,361 +0,0 @@ -# Configuration - -Starknode Kit uses a YAML configuration file to manage your node setup. This guide covers all configuration options and how to customize them for your needs. - -## Configuration File Location - -The configuration file is located at: -- **Linux/macOS**: `~/.starknode-kit/config.yaml` -- **Windows**: `%USERPROFILE%\.starknode-kit\config.yaml` - -## Configuration Structure - -```yaml -network: mainnet # Network to connect to -execution_client: - name: geth - port: [8545, 8546] - execution_type: full -consensus_client: - name: lighthouse - port: [9000, 9001] - consensus_checkpoint: "" -starknet_client: - name: juno - port: [6060, 6061] - eth_node_url: "http://localhost:8545" -``` - -## Network Configuration - -### Supported Networks - -| Network | Description | Use Case | -|---------|-------------|----------| -| `mainnet` | Ethereum mainnet | Production | -| `sepolia` | Ethereum testnet | Testing | -| `goerli` | Ethereum testnet (deprecated) | Legacy testing | -| `holesky` | Ethereum testnet | Testing | - -### Setting Network - -```bash -# Set network via command line -starknode-kit config -n sepolia - -# Or edit config file directly -network: sepolia -``` - -## Execution Client Configuration - -### Supported Clients - -- **Geth**: Go Ethereum client -- **Reth**: Rust Ethereum client - -### Configuration Options - -```yaml -execution_client: - name: geth # or reth - port: [8545, 8546] # [HTTP, WebSocket] - execution_type: full # full, archive, light - additional_args: [] # Custom command line arguments -``` - -### Execution Types - -| Type | Description | Storage | Sync Speed | -|------|-------------|---------|------------| -| `full` | Full node with recent state | ~1.5 TB | Fast | -| `archive` | Complete historical data | ~3+ TB | Slow | -| `light` | Minimal data, relies on peers | ~50 GB | Very Fast | - -### Port Configuration - -```bash -# Set custom ports -starknode-kit config el client=geth port=8545,8546 - -# Default ports: -# Geth: 8545 (HTTP), 8546 (WebSocket) -# Reth: 8545 (HTTP), 8546 (WebSocket) -``` - -## Consensus Client Configuration - -### Supported Clients - -- **Lighthouse**: Rust-based consensus client -- **Prysm**: Go-based consensus client - -### Configuration Options - -```yaml -consensus_client: - name: lighthouse # or prysm - port: [9000, 9001] # [P2P, HTTP API] - consensus_checkpoint: "" # Optional checkpoint URL - additional_args: [] # Custom command line arguments -``` - -### Checkpoint Sync - -Speed up initial sync using a trusted checkpoint: - -```yaml -consensus_client: - name: lighthouse - consensus_checkpoint: "https://mainnet.checkpoint.sigp.io" -``` - -**Available checkpoints**: -- Lighthouse: `https://mainnet.checkpoint.sigp.io` -- Prysm: `https://beaconstate.info/` - -### Port Configuration - -```bash -# Set custom ports -starknode-kit config cl client=lighthouse port=9000,9001 - -# Default ports: -# Lighthouse: 9000 (P2P), 9001 (HTTP API) -# Prysm: 13000 (P2P), 3500 (HTTP API) -``` - -## Starknet Client Configuration - -### Supported Clients - -- **Juno**: Go-based Starknet full node - -### Configuration Options - -```yaml -starknet_client: - name: juno - port: [6060, 6061] # [HTTP, WebSocket] - eth_node_url: "http://localhost:8545" # Ethereum node URL - additional_args: [] # Custom command line arguments -``` - -### Ethereum Node Connection - -Juno requires an Ethereum node to verify L1 state: - -```yaml -starknet_client: - name: juno - eth_node_url: "http://localhost:8545" # Local Geth/Reth - # or - eth_node_url: "https://eth-mainnet.alchemyapi.io/v2/YOUR_KEY" # External provider -``` - -### Port Configuration - -```bash -# Set custom ports -starknode-kit config starknet client=juno port=6060,6061 - -# Default ports: -# Juno: 6060 (HTTP), 6061 (WebSocket) -``` - -## Advanced Configuration - -### Custom Command Line Arguments - -Add custom arguments to any client: - -```yaml -execution_client: - name: geth - additional_args: - - "--maxpeers" - - "50" - - "--cache" - - "4096" - -consensus_client: - name: lighthouse - additional_args: - - "--max-peers" - - "50" - - "--target-peers" - - "25" -``` - -### Environment Variables - -Set environment variables for clients: - -```yaml -execution_client: - name: geth - env_vars: - GETH_CACHE: "4096" - GETH_MAXPEERS: "50" -``` - -### Resource Limits - -Configure resource limits: - -```yaml -execution_client: - name: geth - resource_limits: - memory: "8Gi" - cpu: "4" -``` - -## Configuration Management - -### View Current Configuration - -```bash -# Show current config -starknode-kit config - -# Show specific client config -starknode-kit config el -starknode-kit config cl -starknode-kit config starknet -``` - -### Edit Configuration - -```bash -# Edit config file directly -nano ~/.starknode-kit/config.yaml - -# Or use command line -starknode-kit config -n sepolia -starknode-kit config el client=reth port=8545,8546 -``` - -### Validate Configuration - -```bash -# Check if config is valid -starknode-kit config --validate -``` - -## Configuration Examples - -### Development Setup - -```yaml -network: sepolia -execution_client: - name: geth - port: [8545, 8546] - execution_type: full -consensus_client: - name: lighthouse - port: [9000, 9001] -starknet_client: - name: juno - port: [6060, 6061] - eth_node_url: "http://localhost:8545" -``` - -### Production Setup - -```yaml -network: mainnet -execution_client: - name: reth - port: [8545, 8546] - execution_type: full - additional_args: - - "--max-peers" - - "100" -consensus_client: - name: lighthouse - port: [9000, 9001] - consensus_checkpoint: "https://mainnet.checkpoint.sigp.io" - additional_args: - - "--max-peers" - - "50" -starknet_client: - name: juno - port: [6060, 6061] - eth_node_url: "http://localhost:8545" -``` - -### Archive Node Setup - -```yaml -network: mainnet -execution_client: - name: geth - port: [8545, 8546] - execution_type: archive - additional_args: - - "--cache" - - "8192" -consensus_client: - name: lighthouse - port: [9000, 9001] - execution_type: archive -``` - -## Troubleshooting Configuration - -### Common Issues - -**Invalid YAML Syntax** -```bash -# Validate YAML syntax -starknode-kit config --validate -``` - -**Port Conflicts** -```bash -# Check port usage -netstat -tulpn | grep :8545 -``` - -**Missing Dependencies** -```bash -# Check if clients are installed -starknode-kit config -``` - -### Configuration Validation - -The configuration is validated when you run commands. Common validation errors: - -- Invalid network name -- Unsupported client combinations -- Port conflicts -- Missing required fields - -## Best Practices - -### Security -- Use non-default ports in production -- Restrict RPC access to localhost -- Use strong authentication for external access - -### Performance -- Match execution type to your use case -- Use checkpoint sync for faster initial sync -- Configure appropriate resource limits - -### Reliability -- Use stable network configurations -- Set up monitoring for configuration changes -- Keep backups of working configurations - -## Getting Help - -For configuration issues: - -- Check the [Troubleshooting Guide](../operations/troubleshooting.md) -- Review client-specific documentation -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/getting-started/hardware-requirements.md b/docs/getting-started/hardware-requirements.md deleted file mode 100644 index 0150a69..0000000 --- a/docs/getting-started/hardware-requirements.md +++ /dev/null @@ -1,193 +0,0 @@ -# Hardware Requirements - -This guide outlines the hardware requirements for running Ethereum and Starknet nodes with Starknode Kit. Requirements vary depending on your use case, from casual development to production-grade operations. - -## Minimum Requirements - -### Development/Testing Environment - -- **CPU**: 4+ cores (Intel i5/AMD Ryzen 5 or better) -- **RAM**: 16 GB -- **Storage**: 1 TB NVMe SSD -- **Network**: Stable broadband connection (10+ Mbps) - -### Production Environment - -- **CPU**: 8+ cores (Intel i7/AMD Ryzen 7 or better) -- **RAM**: 32+ GB -- **Storage**: 2+ TB NVMe SSD with DRAM cache -- **Network**: Stable broadband connection (50+ Mbps) - -## Detailed Hardware Specifications - -### CPU Requirements - -**Recommended**: Intel i7/AMD Ryzen 7 or better -- Node operation doesn't require heavy CPU power -- The BG Client has run well on both i3 and i5 models -- **Avoid**: Celeron processors due to limitations - -**Why CPU matters**: -- Consensus client operations -- Block processing and validation -- Network protocol handling - -### Memory (RAM) Requirements - -**Minimum**: 16 GB -**Recommended**: 32+ GB -**Production**: 64+ GB - -**Memory usage breakdown**: -- Base system: ~4 GB -- Ethereum execution client: ~8-16 GB -- Consensus client: ~4-8 GB -- Starknet client (Juno): ~4-8 GB -- Operating system overhead: ~4 GB - -### Storage Requirements - -**Critical**: Use NVMe SSD with DRAM cache -**Avoid**: QLC (Quad-Level Cell) NAND architecture - -#### Storage Size Requirements - -| Network | Execution Client | Consensus Client | Total (Approx.) | -|---------|------------------|------------------|-----------------| -| Mainnet | 1.5 TB | 500 GB | 2+ TB | -| Sepolia | 200 GB | 50 GB | 300+ GB | -| Goerli | 300 GB | 100 GB | 500+ GB | - -#### Recommended SSDs - -See this [SSD List Gist](https://gist.github.com/bkase/fab02c5b3c404e9ef8e5c2071ac1558c) for tested options. - -**Key specifications to look for**: -- NVMe interface -- DRAM cache -- High endurance rating -- Good random read/write performance - -### Network Requirements - -**Bandwidth**: -- Development: 10+ Mbps -- Production: 50+ Mbps -- High-performance: 100+ Mbps - -**Latency**: -- Low latency connection preferred -- Stable connection more important than speed - -**Data usage**: -- Initial sync: 1-2 TB -- Daily operation: 10-50 GB - -## Hardware Recommendations by Use Case - -### Home Development Setup - -``` -CPU: Intel i5-12400 / AMD Ryzen 5 5600X -RAM: 32 GB DDR4 -Storage: 2 TB NVMe SSD (Samsung 980 Pro, WD Black SN850) -Network: 50+ Mbps broadband -``` - -### Production Validator - -``` -CPU: Intel i7-12700K / AMD Ryzen 7 5800X -RAM: 64 GB DDR4 -Storage: 4 TB NVMe SSD (Samsung 980 Pro, WD Black SN850) -Network: 100+ Mbps dedicated connection -``` - -### Enterprise/High-Performance - -``` -CPU: Intel i9-12900K / AMD Ryzen 9 5900X -RAM: 128 GB DDR4 -Storage: 8 TB NVMe SSD (Enterprise grade) -Network: 1 Gbps dedicated connection -``` - -## Cloud Provider Recommendations - -### AWS -- **Instance**: c6i.2xlarge or larger -- **Storage**: gp3 or io2 volumes -- **Network**: Enhanced networking enabled - -### Google Cloud -- **Instance**: c2-standard-8 or larger -- **Storage**: SSD persistent disks -- **Network**: Premium tier - -### Azure -- **Instance**: Standard_D8s_v3 or larger -- **Storage**: Premium SSD -- **Network**: Accelerated networking - -## Performance Optimization Tips - -### Storage Optimization -- Use separate drives for different clients -- Enable TRIM for SSD maintenance -- Monitor disk health regularly - -### Memory Optimization -- Enable swap space (8-16 GB) -- Monitor memory usage patterns -- Consider memory overcommit settings - -### Network Optimization -- Use wired connections when possible -- Configure QoS for node traffic -- Monitor bandwidth usage - -## Monitoring Hardware Health - -### Key Metrics to Monitor -- CPU usage and temperature -- Memory usage and swap usage -- Disk I/O and available space -- Network bandwidth and latency - -### Recommended Tools -- `htop` for system monitoring -- `iotop` for disk I/O monitoring -- `nethogs` for network monitoring -- `smartctl` for SSD health - -## Troubleshooting Hardware Issues - -### Common Problems - -**High CPU Usage** -- Check for stuck processes -- Verify client configurations -- Monitor system logs - -**Memory Issues** -- Check for memory leaks -- Adjust client memory limits -- Consider adding swap space - -**Storage Problems** -- Monitor disk space -- Check for disk errors -- Verify SSD health - -**Network Issues** -- Test connection stability -- Check firewall settings -- Verify port configurations - -## Getting Help - -For hardware-specific questions: - -- Check our [Troubleshooting Guide](../operations/troubleshooting.md) -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Review the [Rocket Pool Hardware Guide](https://docs.rocketpool.net/guides/node/hardware.html) for additional insights diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md deleted file mode 100644 index 996f39c..0000000 --- a/docs/getting-started/installation.md +++ /dev/null @@ -1,116 +0,0 @@ -# Installation and Setup - -This guide will walk you through installing Starknode Kit on your system. We provide multiple installation methods to suit different preferences and environments. - -## Prerequisites - -Before installing Starknode Kit, ensure you have the following installed: - -- **Go**: Version 1.24 or later ([Download](https://go.dev/dl/)) -- **Rust**: For building Starknet clients ([Install Rust](https://rustup.rs/)) -- **Make**: For building certain clients - - Ubuntu/Debian: `sudo apt install make` - - macOS: `brew install make` - - Windows (WSL): `sudo apt install make` - -## Installation Methods - -### Method 1: Install Script (Recommended) - -The easiest way to install Starknode Kit is using our installation script: - -```bash -curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh | bash -``` - -Or download and run manually: - -```bash -wget https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh -chmod +x install.sh -./install.sh -``` - -### Method 2: Go Install - -If you have Go installed, you can install directly: - -```bash -go install github.com/thebuidl-grid/starknode-kit@latest -``` - -### Method 3: Build from Source - -For development or custom builds: - -```bash -# Clone the repository -git clone https://github.com/thebuidl-grid/starknode-kit.git -cd starknode-kit - -# Build and install -go build -o starknode-kit . -sudo mv starknode-kit /usr/local/bin/ -``` - -## Verify Installation - -After installation, verify that Starknode Kit is working correctly: - -```bash -starknode-kit --help -``` - -You should see the help output with available commands. - -## Initialize Configuration - -Create your initial configuration file: - -```bash -starknode-kit init -``` - -This creates a default configuration file in your home directory that you can customize for your needs. - -## Next Steps - -Now that you have Starknode Kit installed: - -1. [Review Hardware Requirements](hardware-requirements.md) -2. [Follow the Quick Start Guide](quick-start.md) -3. [Configure your first client](configuration.md) - -## Troubleshooting Installation - -### Common Issues - -**Permission Denied Error** -```bash -sudo chmod +x /usr/local/bin/starknode-kit -``` - -**Command Not Found** -Ensure `/usr/local/bin` is in your PATH: -```bash -echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc -source ~/.bashrc -``` - -**Go Version Issues** -Update Go to version 1.24 or later: -```bash -# Check current version -go version - -# Update if needed -# Visit https://go.dev/dl/ for latest version -``` - -### Getting Help - -If you encounter issues during installation: - -- Check our [Troubleshooting Guide](../operations/troubleshooting.md) -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/getting-started/quick-start.md b/docs/getting-started/quick-start.md deleted file mode 100644 index a1580bf..0000000 --- a/docs/getting-started/quick-start.md +++ /dev/null @@ -1,205 +0,0 @@ -# Quick Start Guide - -Get your first Ethereum and Starknet node running in under 10 minutes with this step-by-step guide. - -## Prerequisites - -Before starting, ensure you have: -- [Starknode Kit installed](installation.md) -- [Adequate hardware](hardware-requirements.md) -- Stable internet connection - -## Step 1: Initialize Configuration - -Create your initial configuration file: - -```bash -starknode-kit init -``` - -This creates a default configuration in your home directory that you can customize later. - -## Step 2: Add Your First Client Pair - -Add an Ethereum execution and consensus client pair: - -```bash -# Add Geth (execution) + Lighthouse (consensus) -starknode-kit add --execution_client geth --consensus_client lighthouse -``` - -**Alternative combinations**: -```bash -# Reth + Prysm -starknode-kit add --execution_client reth --consensus_client prysm - -# Geth + Prysm -starknode-kit add --execution_client geth --consensus_client prysm -``` - -## Step 3: Add a Starknet Client - -Add Juno for Starknet support: - -```bash -starknode-kit add --starknet_client juno -``` - -## Step 4: Verify Configuration - -Check your current configuration: - -```bash -starknode-kit config -``` - -You should see your configured clients listed. - -## Step 5: Start Your Ethereum Node - -Start the Ethereum execution and consensus clients: - -```bash -starknode-kit start -``` - -This will: -- Download and install the client binaries -- Start the execution client first -- Start the consensus client -- Begin syncing with the network - -## Step 6: Start Your Starknet Node - -In a separate terminal, start your Juno Starknet node: - -```bash -starknode-kit run juno -``` - -## Step 7: Monitor Your Nodes - -Launch the monitoring dashboard: - -```bash -starknode-kit monitor -``` - -This provides real-time information about: -- Client status and health -- Sync progress -- Resource usage -- Network connections - -## What Happens Next - -### Initial Sync Process - -**Ethereum Node**: -- Execution client syncs the blockchain state -- Consensus client syncs the beacon chain -- Full sync can take 1-3 days depending on hardware - -**Starknet Node (Juno)**: -- Syncs Starknet state from L1 -- Requires Ethereum node connection -- Typically faster than Ethereum sync - -### Expected Timeline - -| Phase | Duration | Description | -|-------|----------|-------------| -| Client Installation | 5-15 minutes | Download and setup binaries | -| Ethereum Sync Start | 1-2 hours | Begin blockchain synchronization | -| Partial Sync | 6-12 hours | Sync recent blocks | -| Full Sync | 1-3 days | Complete historical sync | -| Starknet Sync | 2-6 hours | Sync Starknet state | - -## Common First-Time Issues - -### Client Installation Fails - -**Problem**: Clients fail to download or install -**Solution**: Check internet connection and available disk space - -```bash -# Check disk space -df -h - -# Check internet connection -ping google.com -``` - -### Sync Stalls - -**Problem**: Sync progress stops or becomes very slow -**Solution**: Restart the clients - -```bash -# Stop clients -starknode-kit stop - -# Start again -starknode-kit start -``` - -### Port Conflicts - -**Problem**: Clients can't bind to required ports -**Solution**: Check for conflicting services - -```bash -# Check port usage -netstat -tulpn | grep :8545 # Geth default port -netstat -tulpn | grep :9000 # Lighthouse default port -``` - -## Next Steps - -Once your nodes are synced and running: - -1. **Configure Monitoring**: Set up alerts and monitoring -2. **Security Hardening**: Review security best practices -3. **Performance Tuning**: Optimize for your hardware -4. **Backup Strategy**: Implement backup procedures - -## Quick Commands Reference - -```bash -# Check status -starknode-kit config - -# Stop all clients -starknode-kit stop - -# Restart clients -starknode-kit stop && starknode-kit start - -# Update clients -starknode-kit update - -# Remove a client -starknode-kit remove --consensus_client lighthouse - -# Get help -starknode-kit --help -starknode-kit help -``` - -## Getting Help - -If you encounter issues: - -1. Check the [Troubleshooting Guide](../operations/troubleshooting.md) -2. Review client-specific logs -3. Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -4. Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) - -## What's Next? - -Now that you have your first node running: - -- [Learn about client configuration](configuration.md) -- [Set up monitoring and alerts](../operations/monitoring.md) -- [Explore advanced features](../advanced/network-configuration.md) -- [Join the community](https://t.me/+SCPbza9fk8dkYWI0) diff --git a/docs/next.config.ts b/docs/next.config.ts new file mode 100644 index 0000000..e9ffa30 --- /dev/null +++ b/docs/next.config.ts @@ -0,0 +1,7 @@ +import type { NextConfig } from "next"; + +const nextConfig: NextConfig = { + /* config options here */ +}; + +export default nextConfig; diff --git a/docs/operations/monitoring.md b/docs/operations/monitoring.md deleted file mode 100644 index fdc4332..0000000 --- a/docs/operations/monitoring.md +++ /dev/null @@ -1,353 +0,0 @@ -# Monitoring - -Starknode Kit includes a built-in monitoring dashboard that provides real-time insights into your node's health, performance, and synchronization status. - -## Built-in Monitoring Dashboard - -### Launch the Dashboard - -```bash -starknode-kit monitor -``` - -This opens an interactive terminal-based dashboard showing: - -- **Client Status**: Running/stopped status of all clients -- **Sync Progress**: Current synchronization status -- **Resource Usage**: CPU, memory, and disk usage -- **Network Stats**: Peer connections and bandwidth -- **Logs**: Real-time log output from clients - -### Dashboard Features - -#### Real-time Updates -- Automatic refresh every few seconds -- Live log streaming -- Status change notifications - -#### Multi-client View -- Execution client status -- Consensus client status -- Starknet client status -- Combined system overview - -#### Resource Monitoring -- CPU usage per client -- Memory consumption -- Disk I/O statistics -- Network bandwidth - -## Monitoring Components - -### Client Status Monitoring - -**Execution Client (Geth/Reth)**: -- Sync status and progress -- Peer connections -- Block height -- Transaction pool status - -**Consensus Client (Lighthouse/Prysm)**: -- Beacon chain sync -- Validator status (if applicable) -- Attestation performance -- Finality status - -**Starknet Client (Juno)**: -- L2 sync progress -- L1 verification status -- Transaction processing -- State root updates - -### System Resource Monitoring - -**CPU Usage**: -- Per-client CPU consumption -- System-wide CPU usage -- Load average - -**Memory Usage**: -- RAM consumption per client -- Available memory -- Swap usage - -**Disk Usage**: -- Database size -- Available disk space -- I/O operations per second - -**Network Monitoring**: -- Inbound/outbound bandwidth -- Peer connections -- Latency measurements - -## Advanced Monitoring - -### Custom Monitoring Scripts - -Create custom monitoring scripts for specific needs: - -```bash -#!/bin/bash -# monitor_health.sh - -# Check if clients are running -if ! pgrep -f "geth" > /dev/null; then - echo "Geth is not running!" - exit 1 -fi - -if ! pgrep -f "lighthouse" > /dev/null; then - echo "Lighthouse is not running!" - exit 1 -fi - -# Check sync status -GETH_SYNC=$(curl -s -X POST -H "Content-Type: application/json" \ - --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' \ - http://localhost:8545 | jq -r '.result') - -if [ "$GETH_SYNC" != "false" ]; then - echo "Geth is still syncing" -fi - -echo "All systems healthy" -``` - -### Log Monitoring - -Monitor specific log patterns: - -```bash -# Monitor Geth logs -tail -f ~/.starknode-kit/logs/geth.log | grep -E "(ERROR|WARN|FATAL)" - -# Monitor Lighthouse logs -tail -f ~/.starknode-kit/logs/lighthouse.log | grep -E "(ERROR|WARN|FATAL)" - -# Monitor Juno logs -tail -f ~/.starknode-kit/logs/juno.log | grep -E "(ERROR|WARN|FATAL)" -``` - -### Performance Metrics - -Track key performance indicators: - -```bash -# Check sync speed -starknode-kit monitor --metrics sync-speed - -# Check peer count -starknode-kit monitor --metrics peers - -# Check resource usage -starknode-kit monitor --metrics resources -``` - -## External Monitoring Tools - -### Prometheus Integration - -Set up Prometheus metrics collection: - -```yaml -# prometheus.yml -global: - scrape_interval: 15s - -scrape_configs: - - job_name: 'starknode-kit' - static_configs: - - targets: ['localhost:9090'] - metrics_path: /metrics - scrape_interval: 5s -``` - -### Grafana Dashboards - -Create Grafana dashboards for visualization: - -**Key Metrics to Track**: -- Sync progress percentage -- Block height over time -- Peer connection count -- Resource usage trends -- Error rates - -### Alerting - -Set up alerts for critical issues: - -**Critical Alerts**: -- Client process down -- Sync stalled for > 1 hour -- Disk space < 10% -- Memory usage > 90% -- High error rate - -**Warning Alerts**: -- Sync progress slow -- Low peer count -- High CPU usage -- Network connectivity issues - -## Monitoring Best Practices - -### Regular Health Checks - -**Daily Checks**: -- Verify all clients are running -- Check sync progress -- Review error logs -- Monitor resource usage - -**Weekly Checks**: -- Review performance trends -- Check disk space usage -- Update monitoring configurations -- Test alerting systems - -### Log Management - -**Log Rotation**: -```bash -# Set up log rotation -sudo logrotate -f /etc/logrotate.d/starknode-kit -``` - -**Log Analysis**: -```bash -# Analyze error patterns -grep -E "(ERROR|WARN)" ~/.starknode-kit/logs/*.log | \ - awk '{print $1}' | sort | uniq -c | sort -nr -``` - -### Performance Optimization - -**Based on Monitoring Data**: -- Adjust client configurations -- Optimize resource allocation -- Tune network settings -- Update hardware if needed - -## Troubleshooting Monitoring Issues - -### Dashboard Not Loading - -**Problem**: Monitor dashboard fails to start -**Solutions**: -```bash -# Check if clients are configured -starknode-kit config - -# Restart monitoring -starknode-kit monitor --restart - -# Check for port conflicts -netstat -tulpn | grep :9090 -``` - -### Missing Metrics - -**Problem**: Some metrics not showing -**Solutions**: -```bash -# Verify client status -starknode-kit config - -# Check client logs -tail -f ~/.starknode-kit/logs/*.log - -# Restart clients -starknode-kit stop && starknode-kit start -``` - -### High Resource Usage - -**Problem**: Monitoring consumes too many resources -**Solutions**: -```bash -# Reduce monitoring frequency -starknode-kit monitor --interval 30s - -# Disable detailed metrics -starknode-kit monitor --basic - -# Use external monitoring instead -``` - -## Monitoring Configuration - -### Customize Monitoring Settings - -```yaml -# ~/.starknode-kit/monitoring.yaml -monitoring: - refresh_interval: 5s - log_level: info - metrics_enabled: true - alerts_enabled: true - - clients: - geth: - metrics_port: 6060 - log_level: info - lighthouse: - metrics_port: 5054 - log_level: info - juno: - metrics_port: 9090 - log_level: info -``` - -### Environment Variables - -```bash -# Set monitoring environment variables -export STARKNODE_MONITOR_INTERVAL=10s -export STARKNODE_MONITOR_LOG_LEVEL=debug -export STARKNODE_MONITOR_METRICS=true -``` - -## Integration with External Tools - -### System Monitoring - -**htop/btop**: -```bash -# Monitor system resources -htop -btop -``` - -**iotop**: -```bash -# Monitor disk I/O -sudo iotop -``` - -**nethogs**: -```bash -# Monitor network usage -sudo nethogs -``` - -### Log Aggregation - -**ELK Stack**: -- Elasticsearch for log storage -- Logstash for log processing -- Kibana for visualization - -**Fluentd**: -- Lightweight log collector -- Easy integration with Starknode Kit - -## Getting Help - -For monitoring issues: - -- Check the [Troubleshooting Guide](troubleshooting.md) -- Review client-specific monitoring docs -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/operations/running-nodes.md b/docs/operations/running-nodes.md deleted file mode 100644 index 0687eee..0000000 --- a/docs/operations/running-nodes.md +++ /dev/null @@ -1,383 +0,0 @@ -# Running Nodes - -This guide covers how to run and manage your Ethereum and Starknet nodes using Starknode Kit. - -## Starting Your Nodes - -### Start Ethereum Clients - -Start your configured execution and consensus clients: - -```bash -starknode-kit start -``` - -This command will: -1. Check your configuration -2. Start the execution client first -3. Start the consensus client -4. Begin the synchronization process - -### Start Starknet Client - -Start your Juno Starknet node: - -```bash -starknode-kit run juno -``` - -**Note**: Juno requires an Ethereum node connection to verify L1 state. - -## Node Startup Process - -### Execution Client Startup - -**Geth**: -```bash -# Geth starts with these default settings: -# - HTTP RPC on port 8545 -# - WebSocket RPC on port 8546 -# - P2P networking on port 30303 -# - Full sync mode -``` - -**Reth**: -```bash -# Reth starts with these default settings: -# - HTTP RPC on port 8545 -# - WebSocket RPC on port 8546 -# - P2P networking on port 30303 -# - Full sync mode -``` - -### Consensus Client Startup - -**Lighthouse**: -```bash -# Lighthouse starts with these default settings: -# - P2P networking on port 9000 -# - HTTP API on port 9001 -# - Beacon node mode -# - Mainnet network -``` - -**Prysm**: -```bash -# Prysm starts with these default settings: -# - P2P networking on port 13000 -# - HTTP API on port 3500 -# - Beacon node mode -# - Mainnet network -``` - -### Starknet Client Startup - -**Juno**: -```bash -# Juno starts with these default settings: -# - HTTP RPC on port 6060 -# - WebSocket RPC on port 6061 -# - Ethereum node connection required -# - Mainnet network -``` - -## Synchronization Process - -### Initial Sync - -When you first start your nodes, they will begin synchronizing with the network: - -**Execution Client Sync**: -- Downloads and verifies all blocks -- Builds the state trie -- Can take 1-3 days depending on hardware - -**Consensus Client Sync**: -- Downloads beacon chain data -- Verifies consensus rules -- Typically faster than execution sync - -**Starknet Client Sync**: -- Syncs L2 state from L1 -- Requires Ethereum node connection -- Usually completes in 2-6 hours - -### Sync Progress Monitoring - -Monitor sync progress using the built-in dashboard: - -```bash -starknode-kit monitor -``` - -Key metrics to watch: -- **Block height**: Current synced block number -- **Sync percentage**: Progress towards full sync -- **Peer count**: Number of connected peers -- **Sync speed**: Blocks per second - -### Checkpoint Sync - -Speed up initial sync using trusted checkpoints: - -```bash -# Configure checkpoint sync for Lighthouse -starknode-kit config cl client=lighthouse consensus_checkpoint="https://mainnet.checkpoint.sigp.io" - -# Configure checkpoint sync for Prysm -starknode-kit config cl client=prysm consensus_checkpoint="https://beaconstate.info/" -``` - -## Node Management - -### Stop Nodes - -Stop all running clients: - -```bash -starknode-kit stop -``` - -This gracefully shuts down all clients. - -### Restart Nodes - -Restart all clients: - -```bash -starknode-kit stop -starknode-kit start -``` - -### Check Node Status - -Check if nodes are running: - -```bash -# Check configuration -starknode-kit config - -# Check running processes -ps aux | grep -E "(geth|lighthouse|juno)" - -# Check ports -netstat -tulpn | grep -E "(8545|9000|6060)" -``` - -## Network Configuration - -### Mainnet - -Run on Ethereum mainnet: - -```bash -starknode-kit config -n mainnet -starknode-kit start -``` - -### Testnets - -Run on testnets for development: - -```bash -# Sepolia testnet -starknode-kit config -n sepolia -starknode-kit start - -# Holesky testnet -starknode-kit config -n holesky -starknode-kit start -``` - -### Custom Networks - -Configure custom network settings: - -```yaml -# config.yaml -network: custom -execution_client: - name: geth - additional_args: - - "--networkid" - - "12345" - - "--genesis" - - "/path/to/genesis.json" -``` - -## Performance Optimization - -### Resource Allocation - -Optimize resource usage for your hardware: - -```bash -# High-memory system (32GB+) -starknode-kit config el client=geth additional_args="--cache,8192,--maxpeers,100" - -# Low-memory system (16GB) -starknode-kit config el client=geth additional_args="--cache,2048,--maxpeers,25" - -# High-performance system -starknode-kit config el client=reth additional_args="--max-peers,100" -``` - -### Network Optimization - -Optimize network settings: - -```bash -# Increase peer connections -starknode-kit config el client=geth additional_args="--maxpeers,100" - -# Optimize for low bandwidth -starknode-kit config el client=geth additional_args="--maxpeers,25,--lightserv,0" -``` - -### Storage Optimization - -Optimize storage usage: - -```bash -# Use light client mode -starknode-kit config el client=geth execution_type=light - -# Use archive mode for complete data -starknode-kit config el client=geth execution_type=archive -``` - -## Monitoring and Logs - -### Real-time Monitoring - -Use the built-in monitoring dashboard: - -```bash -starknode-kit monitor -``` - -Features: -- Real-time sync progress -- Resource usage statistics -- Peer connection status -- Live log streaming - -### Log Files - -Access client log files: - -```bash -# Geth logs -tail -f ~/.starknode-kit/logs/geth.log - -# Lighthouse logs -tail -f ~/.starknode-kit/logs/lighthouse.log - -# Juno logs -tail -f ~/.starknode-kit/logs/juno.log -``` - -### Log Analysis - -Analyze logs for issues: - -```bash -# Search for errors -grep -i error ~/.starknode-kit/logs/*.log - -# Monitor sync progress -grep -i "sync" ~/.starknode-kit/logs/geth.log - -# Check peer connections -grep -i "peer" ~/.starknode-kit/logs/*.log -``` - -## Troubleshooting - -### Common Issues - -**Nodes Won't Start** -```bash -# Check configuration -starknode-kit config --validate - -# Check port conflicts -netstat -tulpn | grep -E "(8545|9000|6060)" - -# Check disk space -df -h -``` - -**Sync Stalls** -```bash -# Restart nodes -starknode-kit stop && starknode-kit start - -# Check network connectivity -ping 8.8.8.8 - -# Use checkpoint sync -starknode-kit config cl client=lighthouse consensus_checkpoint="https://mainnet.checkpoint.sigp.io" -``` - -**High Resource Usage** -```bash -# Check resource usage -htop -iotop - -# Reduce resource allocation -starknode-kit config el client=geth additional_args="--cache,2048,--maxpeers,25" -``` - -### Performance Issues - -**Slow Sync** -- Check disk I/O performance -- Verify network connection -- Consider using checkpoint sync -- Optimize client settings - -**High Memory Usage** -- Reduce cache size -- Use light client mode -- Add swap space -- Monitor for memory leaks - -**High CPU Usage** -- Reduce peer count -- Use lighter execution type -- Check for stuck processes -- Monitor system load - -## Best Practices - -### Security - -- Run nodes behind a firewall -- Use non-default ports in production -- Restrict RPC access to localhost -- Keep clients updated - -### Reliability - -- Use stable network configurations -- Monitor system resources -- Set up automated restarts -- Keep backups of configuration - -### Performance - -- Match execution type to use case -- Optimize for your hardware -- Use checkpoint sync for faster initial sync -- Monitor and tune settings - -## Getting Help - -For node operation issues: - -- Check the [Troubleshooting Guide](troubleshooting.md) -- Review client-specific documentation -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/operations/troubleshooting.md b/docs/operations/troubleshooting.md deleted file mode 100644 index 46dbf55..0000000 --- a/docs/operations/troubleshooting.md +++ /dev/null @@ -1,538 +0,0 @@ -# Troubleshooting - -This guide helps you diagnose and resolve common issues with Starknode Kit. - -## Common Issues - -### Installation Problems - -#### Command Not Found - -**Problem**: `starknode-kit: command not found` - -**Solutions**: -```bash -# Check if binary exists -ls -la /usr/local/bin/starknode-kit - -# Add to PATH -echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc -source ~/.bashrc - -# Reinstall if missing -curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh | bash -``` - -#### Permission Denied - -**Problem**: Permission denied when running commands - -**Solutions**: -```bash -# Fix permissions -sudo chmod +x /usr/local/bin/starknode-kit - -# Check ownership -sudo chown $USER:$USER /usr/local/bin/starknode-kit -``` - -#### Go Version Issues - -**Problem**: Go version too old - -**Solutions**: -```bash -# Check current version -go version - -# Update Go (Ubuntu/Debian) -sudo apt update -sudo apt install golang-go - -# Update Go (macOS) -brew install go - -# Update Go (manual) -# Visit https://go.dev/dl/ for latest version -``` - ---- - -### Configuration Issues - -#### Invalid Configuration - -**Problem**: Configuration validation fails - -**Solutions**: -```bash -# Validate configuration -starknode-kit config --validate - -# Reset to defaults -rm ~/.starknode-kit/config.yaml -starknode-kit init - -# Check YAML syntax -yamllint ~/.starknode-kit/config.yaml -``` - -#### Missing Configuration File - -**Problem**: Configuration file not found - -**Solutions**: -```bash -# Create default configuration -starknode-kit init - -# Check file location -ls -la ~/.starknode-kit/ - -# Set custom path -export STARKNODE_CONFIG_PATH=/custom/path/config.yaml -``` - ---- - -### Client Installation Issues - -#### Download Failures - -**Problem**: Client binaries fail to download - -**Solutions**: -```bash -# Check internet connection -ping google.com - -# Check available disk space -df -h - -# Check GitHub access -curl -I https://github.com - -# Manual download -wget https://github.com/ethereum/go-ethereum/releases/download/v1.13.5/geth-linux-amd64-1.13.5-916d9836.tar.gz -``` - -#### Installation Permissions - -**Problem**: Cannot install client binaries - -**Solutions**: -```bash -# Check directory permissions -ls -la ~/.starknode-kit/ - -# Fix permissions -chmod 755 ~/.starknode-kit/ -chmod 755 ~/.starknode-kit/bin/ - -# Create directories if missing -mkdir -p ~/.starknode-kit/bin/ -``` - ---- - -### Client Runtime Issues - -#### Port Conflicts - -**Problem**: Clients cannot bind to required ports - -**Solutions**: -```bash -# Check port usage -netstat -tulpn | grep :8545 # Geth -netstat -tulpn | grep :9000 # Lighthouse -netstat -tulpn | grep :6060 # Juno - -# Kill conflicting processes -sudo kill -9 $(lsof -t -i:8545) - -# Use different ports -starknode-kit config el client=geth port=8547,8548 -``` - -#### Sync Stalls - -**Problem**: Blockchain sync stops or becomes very slow - -**Solutions**: -```bash -# Check client status -starknode-kit monitor - -# Restart clients -starknode-kit stop -starknode-kit start - -# Check disk space -df -h - -# Check network connectivity -ping 8.8.8.8 - -# Use checkpoint sync -starknode-kit config cl client=lighthouse consensus_checkpoint="https://mainnet.checkpoint.sigp.io" -``` - -#### High Resource Usage - -**Problem**: Clients consume too much CPU/memory - -**Solutions**: -```bash -# Check resource usage -htop -iotop - -# Reduce client resources -starknode-kit config el client=geth additional_args="--cache,2048,--maxpeers,25" - -# Use lighter execution type -starknode-kit config el client=geth execution_type=light -``` - ---- - -### Network Issues - -#### Connection Problems - -**Problem**: Cannot connect to network - -**Solutions**: -```bash -# Check network connectivity -ping google.com - -# Check DNS resolution -nslookup google.com - -# Check firewall -sudo ufw status - -# Test specific ports -telnet 8.8.8.8 53 -``` - -#### Low Peer Count - -**Problem**: Few or no peer connections - -**Solutions**: -```bash -# Check peer count -starknode-kit monitor - -# Increase max peers -starknode-kit config el client=geth additional_args="--maxpeers,100" - -# Check network configuration -starknode-kit config -n mainnet - -# Restart clients -starknode-kit stop && starknode-kit start -``` - ---- - -### Monitoring Issues - -#### Dashboard Not Loading - -**Problem**: Monitor dashboard fails to start - -**Solutions**: -```bash -# Check if clients are running -starknode-kit config - -# Restart monitoring -starknode-kit monitor --restart - -# Check for port conflicts -netstat -tulpn | grep :9090 - -# Use basic monitoring -starknode-kit monitor --basic -``` - -#### Missing Metrics - -**Problem**: Some metrics not showing in dashboard - -**Solutions**: -```bash -# Verify client status -starknode-kit config - -# Check client logs -tail -f ~/.starknode-kit/logs/*.log - -# Restart clients -starknode-kit stop && starknode-kit start - -# Check monitoring configuration -starknode-kit monitor --interval 10s -``` - ---- - -## Diagnostic Commands - -### System Information - -```bash -# Check system resources -free -h -df -h -lscpu - -# Check network interfaces -ip addr show -ip route show - -# Check running processes -ps aux | grep -E "(geth|lighthouse|juno)" -``` - -### Client Status - -```bash -# Check client processes -pgrep -f geth -pgrep -f lighthouse -pgrep -f juno - -# Check client logs -tail -f ~/.starknode-kit/logs/geth.log -tail -f ~/.starknode-kit/logs/lighthouse.log -tail -f ~/.starknode-kit/logs/juno.log - -# Check client configuration -starknode-kit config -``` - -### Network Diagnostics - -```bash -# Test connectivity -ping -c 4 8.8.8.8 -ping -c 4 google.com - -# Check DNS -nslookup google.com -dig google.com - -# Test specific ports -nc -zv 8.8.8.8 53 -nc -zv localhost 8545 -``` - ---- - -## Log Analysis - -### Common Log Patterns - -#### Geth Logs - -**Sync Issues**: -```bash -grep -i "sync" ~/.starknode-kit/logs/geth.log -grep -i "peer" ~/.starknode-kit/logs/geth.log -``` - -**Memory Issues**: -```bash -grep -i "memory" ~/.starknode-kit/logs/geth.log -grep -i "cache" ~/.starknode-kit/logs/geth.log -``` - -#### Lighthouse Logs - -**Consensus Issues**: -```bash -grep -i "consensus" ~/.starknode-kit/logs/lighthouse.log -grep -i "beacon" ~/.starknode-kit/logs/lighthouse.log -``` - -**Network Issues**: -```bash -grep -i "network" ~/.starknode-kit/logs/lighthouse.log -grep -i "connection" ~/.starknode-kit/logs/lighthouse.log -``` - -#### Juno Logs - -**L1 Verification Issues**: -```bash -grep -i "l1" ~/.starknode-kit/logs/juno.log -grep -i "ethereum" ~/.starknode-kit/logs/juno.log -``` - -**Sync Issues**: -```bash -grep -i "sync" ~/.starknode-kit/logs/juno.log -grep -i "block" ~/.starknode-kit/logs/juno.log -``` - ---- - -## Performance Issues - -### Slow Sync - -**Causes**: -- Insufficient disk I/O -- Low memory -- Poor network connection -- High CPU usage - -**Solutions**: -```bash -# Check disk I/O -iotop -iostat -x 1 - -# Check memory usage -free -h -htop - -# Optimize client settings -starknode-kit config el client=geth additional_args="--cache,4096,--maxpeers,50" -``` - -### High Memory Usage - -**Causes**: -- Large cache settings -- Memory leaks -- Insufficient swap - -**Solutions**: -```bash -# Check memory usage -free -h -htop - -# Reduce cache size -starknode-kit config el client=geth additional_args="--cache,2048" - -# Add swap space -sudo fallocate -l 8G /swapfile -sudo chmod 600 /swapfile -sudo mkswap /swapfile -sudo swapon /swapfile -``` - -### High CPU Usage - -**Causes**: -- Intensive sync process -- High peer count -- Resource contention - -**Solutions**: -```bash -# Check CPU usage -htop -top - -# Reduce peer count -starknode-kit config el client=geth additional_args="--maxpeers,25" - -# Use lighter execution type -starknode-kit config el client=geth execution_type=light -``` - ---- - -## Recovery Procedures - -### Complete Reset - -```bash -# Stop all clients -starknode-kit stop - -# Remove configuration -rm -rf ~/.starknode-kit/ - -# Reinstall -curl -sSL https://raw.githubusercontent.com/thebuidl-grid/starknode-kit/main/install.sh | bash - -# Reinitialize -starknode-kit init -``` - -### Client Reset - -```bash -# Stop specific client -starknode-kit stop - -# Remove client -starknode-kit remove --execution_client geth - -# Reinstall client -starknode-kit add --execution_client geth - -# Restart -starknode-kit start -``` - -### Database Reset - -```bash -# Stop clients -starknode-kit stop - -# Remove database (WARNING: This will require full resync) -rm -rf ~/.starknode-kit/data/geth/ -rm -rf ~/.starknode-kit/data/lighthouse/ -rm -rf ~/.starknode-kit/data/juno/ - -# Restart clients -starknode-kit start -``` - ---- - -## Getting Help - -### Before Asking for Help - -1. **Check logs**: Review client logs for error messages -2. **Verify configuration**: Ensure configuration is valid -3. **Check system resources**: Verify adequate disk space and memory -4. **Test network**: Ensure stable internet connection -5. **Try restart**: Restart clients and check if issue persists - -### Information to Provide - -When seeking help, include: - -- **Operating system**: Linux distribution, macOS version, etc. -- **Hardware specs**: CPU, RAM, storage -- **Starknode Kit version**: `starknode-kit --version` -- **Configuration**: `starknode-kit config` -- **Error messages**: Full error output -- **Logs**: Relevant log excerpts -- **Steps to reproduce**: What you did before the issue occurred - -### Support Channels - -- **Telegram**: [Join our community](https://t.me/+SCPbza9fk8dkYWI0) -- **GitHub Issues**: [Report bugs and request features](https://github.com/thebuidl-grid/starknode-kit/issues) -- **Documentation**: This troubleshooting guide - -### Community Resources - -- **Discord**: Real-time community support -- **Reddit**: r/ethereum, r/starknet -- **Stack Overflow**: Tag questions with `starknode-kit` -- **GitHub Discussions**: Community discussions and Q&A diff --git a/docs/operations/updates.md b/docs/operations/updates.md deleted file mode 100644 index 1805b5b..0000000 --- a/docs/operations/updates.md +++ /dev/null @@ -1,503 +0,0 @@ -# Updates and Maintenance - -This guide covers how to keep your Starknode Kit installation and clients up to date, along with best practices for maintenance. - -## Client Updates - -### Check for Updates - -```bash -# Check for updates to all clients -starknode-kit update - -# Check for updates to specific client -starknode-kit update --execution_client geth -starknode-kit update --consensus_client lighthouse -starknode-kit update --starknet_client juno -``` - -### Update Process - -When you run `starknode-kit update`, the following happens: - -1. **Check versions**: Compare current vs. latest available versions -2. **Download updates**: Download new client binaries if available -3. **Backup current**: Backup existing binaries -4. **Install updates**: Replace old binaries with new ones -5. **Validate installation**: Verify new binaries work correctly - -### Automatic Updates - -Enable automatic update checking: - -```bash -# Set up cron job for daily updates -echo "0 2 * * * /usr/local/bin/starknode-kit update" | crontab - - -# Or weekly updates -echo "0 2 * * 0 /usr/local/bin/starknode-kit update" | crontab - -``` - ---- - -## Update Strategies - -### Rolling Updates - -Update clients one at a time to minimize downtime: - -```bash -# 1. Update execution client -starknode-kit stop -starknode-kit update --execution_client geth -starknode-kit start - -# 2. Wait for sync, then update consensus client -starknode-kit stop -starknode-kit update --consensus_client lighthouse -starknode-kit start - -# 3. Update Starknet client -starknode-kit stop -starknode-kit update --starknet_client juno -starknode-kit run juno -``` - -### Maintenance Windows - -Schedule updates during low-activity periods: - -```bash -# Create maintenance script -cat > ~/maintenance.sh << 'EOF' -#!/bin/bash -echo "Starting maintenance window..." - -# Stop clients -starknode-kit stop - -# Update all clients -starknode-kit update - -# Clean up old logs -find ~/.starknode-kit/logs -name "*.log" -mtime +30 -delete - -# Restart clients -starknode-kit start - -echo "Maintenance complete" -EOF - -chmod +x ~/maintenance.sh -``` - ---- - -## Version Management - -### Check Current Versions - -```bash -# Check Starknode Kit version -starknode-kit --version - -# Check client versions -~/.starknode-kit/bin/geth version -~/.starknode-kit/bin/lighthouse --version -~/.starknode-kit/bin/juno --version -``` - -### Version Compatibility - -| Starknode Kit | Geth | Lighthouse | Prysm | Juno | -|---------------|------|------------|-------|------| -| 1.0.0 | 1.13.5+ | 4.5.0+ | 4.0.0+ | 0.14.0+ | -| 1.1.0 | 1.13.8+ | 4.6.0+ | 4.1.0+ | 0.14.5+ | -| 1.2.0 | 1.14.0+ | 4.7.0+ | 4.2.0+ | 0.15.0+ | - -### Downgrade if Needed - -```bash -# Stop clients -starknode-kit stop - -# Remove current version -rm ~/.starknode-kit/bin/geth - -# Download specific version -wget https://github.com/ethereum/go-ethereum/releases/download/v1.13.5/geth-linux-amd64-1.13.5-916d9836.tar.gz -tar -xzf geth-linux-amd64-1.13.5-916d9836.tar.gz -mv geth ~/.starknode-kit/bin/ - -# Restart clients -starknode-kit start -``` - ---- - -## Maintenance Tasks - -### Regular Maintenance - -#### Daily Tasks - -```bash -# Check client status -starknode-kit monitor - -# Check disk space -df -h - -# Check logs for errors -grep -i error ~/.starknode-kit/logs/*.log -``` - -#### Weekly Tasks - -```bash -# Update clients -starknode-kit update - -# Clean old logs -find ~/.starknode-kit/logs -name "*.log" -mtime +7 -delete - -# Check system resources -htop -iotop -``` - -#### Monthly Tasks - -```bash -# Full system update -sudo apt update && sudo apt upgrade - -# Clean package cache -sudo apt autoremove -sudo apt autoclean - -# Check disk health -sudo smartctl -a /dev/sda -``` - -### Log Management - -#### Log Rotation - -```bash -# Set up logrotate -sudo tee /etc/logrotate.d/starknode-kit << 'EOF' -/home/*/.starknode-kit/logs/*.log { - daily - missingok - rotate 7 - compress - delaycompress - notifempty - create 644 $USER $USER -} -EOF -``` - -#### Log Analysis - -```bash -# Analyze error patterns -grep -E "(ERROR|WARN|FATAL)" ~/.starknode-kit/logs/*.log | \ - awk '{print $1}' | sort | uniq -c | sort -nr - -# Check sync performance -grep -i "sync" ~/.starknode-kit/logs/geth.log | tail -20 - -# Monitor peer connections -grep -i "peer" ~/.starknode-kit/logs/*.log | tail -20 -``` - ---- - -## Backup and Recovery - -### Configuration Backup - -```bash -# Backup configuration -cp ~/.starknode-kit/config.yaml ~/.starknode-kit/config.yaml.backup - -# Backup to cloud storage -rclone copy ~/.starknode-kit/config.yaml remote:backups/ - -# Version control -cd ~/.starknode-kit/ -git init -git add config.yaml -git commit -m "Initial configuration" -``` - -### Database Backup - -```bash -# Create backup script -cat > ~/backup_databases.sh << 'EOF' -#!/bin/bash -BACKUP_DIR="/backup/starknode-kit/$(date +%Y%m%d)" -mkdir -p "$BACKUP_DIR" - -# Stop clients -starknode-kit stop - -# Backup databases -tar -czf "$BACKUP_DIR/geth_data.tar.gz" ~/.starknode-kit/data/geth/ -tar -czf "$BACKUP_DIR/lighthouse_data.tar.gz" ~/.starknode-kit/data/lighthouse/ -tar -czf "$BACKUP_DIR/juno_data.tar.gz" ~/.starknode-kit/data/juno/ - -# Restart clients -starknode-kit start - -echo "Backup completed: $BACKUP_DIR" -EOF - -chmod +x ~/backup_databases.sh -``` - -### Recovery Procedures - -```bash -# Restore configuration -cp ~/.starknode-kit/config.yaml.backup ~/.starknode-kit/config.yaml - -# Restore database -starknode-kit stop -tar -xzf /backup/starknode-kit/20240101/geth_data.tar.gz -C ~/.starknode-kit/data/ -starknode-kit start -``` - ---- - -## Performance Monitoring - -### System Metrics - -```bash -# Monitor system resources -htop -iotop -nethogs - -# Check disk usage -du -sh ~/.starknode-kit/data/* - -# Monitor network -iftop -``` - -### Client Metrics - -```bash -# Monitor sync progress -starknode-kit monitor - -# Check peer count -curl -X POST -H "Content-Type: application/json" \ - --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' \ - http://localhost:8545 - -# Check block height -curl -X POST -H "Content-Type: application/json" \ - --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \ - http://localhost:8545 -``` - ---- - -## Security Updates - -### System Security - -```bash -# Update system packages -sudo apt update && sudo apt upgrade - -# Check for security updates -sudo apt list --upgradable - -# Update kernel if needed -sudo apt install linux-image-generic -``` - -### Client Security - -```bash -# Update clients regularly -starknode-kit update - -# Check for security advisories -# Monitor client GitHub repositories for security releases - -# Use latest stable versions -starknode-kit config --validate -``` - ---- - -## Troubleshooting Updates - -### Update Failures - -**Problem**: Update process fails - -**Solutions**: -```bash -# Check internet connection -ping google.com - -# Check disk space -df -h - -# Check permissions -ls -la ~/.starknode-kit/bin/ - -# Manual update -wget https://github.com/ethereum/go-ethereum/releases/download/v1.14.0/geth-linux-amd64-1.14.0.tar.gz -tar -xzf geth-linux-amd64-1.14.0.tar.gz -mv geth ~/.starknode-kit/bin/ -``` - -### Version Conflicts - -**Problem**: New version causes issues - -**Solutions**: -```bash -# Rollback to previous version -starknode-kit stop -rm ~/.starknode-kit/bin/geth -# Restore previous version from backup - -# Check compatibility -starknode-kit config --validate - -# Report issue -# Open GitHub issue with version information -``` - -### Sync Issues After Update - -**Problem**: Sync problems after updating - -**Solutions**: -```bash -# Check client logs -tail -f ~/.starknode-kit/logs/geth.log - -# Restart clients -starknode-kit stop && starknode-kit start - -# Use checkpoint sync -starknode-kit config cl client=lighthouse consensus_checkpoint="https://mainnet.checkpoint.sigp.io" -``` - ---- - -## Automation - -### Update Automation - -```bash -# Create update script -cat > ~/auto_update.sh << 'EOF' -#!/bin/bash -LOG_FILE="/var/log/starknode-kit-updates.log" - -echo "$(date): Starting automatic update" >> "$LOG_FILE" - -# Check for updates -if starknode-kit update --check-only; then - echo "$(date): Updates available, proceeding" >> "$LOG_FILE" - - # Stop clients - starknode-kit stop - - # Update clients - starknode-kit update - - # Restart clients - starknode-kit start - - echo "$(date): Update completed successfully" >> "$LOG_FILE" -else - echo "$(date): No updates available" >> "$LOG_FILE" -fi -EOF - -chmod +x ~/auto_update.sh - -# Schedule weekly updates -echo "0 3 * * 0 /home/$USER/auto_update.sh" | crontab - -``` - -### Monitoring Automation - -```bash -# Create health check script -cat > ~/health_check.sh << 'EOF' -#!/bin/bash -ALERT_EMAIL="admin@example.com" - -# Check if clients are running -if ! pgrep -f "geth" > /dev/null; then - echo "Geth is not running!" | mail -s "Starknode Kit Alert" "$ALERT_EMAIL" -fi - -if ! pgrep -f "lighthouse" > /dev/null; then - echo "Lighthouse is not running!" | mail -s "Starknode Kit Alert" "$ALERT_EMAIL" -fi - -# Check disk space -DISK_USAGE=$(df / | awk 'NR==2 {print $5}' | sed 's/%//') -if [ "$DISK_USAGE" -gt 90 ]; then - echo "Disk usage is ${DISK_USAGE}%" | mail -s "Starknode Kit Alert" "$ALERT_EMAIL" -fi -EOF - -chmod +x ~/health_check.sh - -# Schedule hourly health checks -echo "0 * * * * /home/$USER/health_check.sh" | crontab - -``` - ---- - -## Best Practices - -### Update Strategy - -1. **Test on testnets first**: Always test updates on testnets before mainnet -2. **Schedule maintenance windows**: Update during low-activity periods -3. **Keep backups**: Always backup before major updates -4. **Monitor after updates**: Watch for issues after updating -5. **Document changes**: Keep track of what was updated and when - -### Maintenance Schedule - -- **Daily**: Check client status and logs -- **Weekly**: Update clients and clean logs -- **Monthly**: Full system maintenance and security updates -- **Quarterly**: Review and optimize configurations - -### Monitoring - -- Set up alerts for critical issues -- Monitor resource usage trends -- Track sync performance -- Watch for security updates - ---- - -## Getting Help - -For update and maintenance issues: - -- Check the [Troubleshooting Guide](troubleshooting.md) -- Review client-specific update documentation -- Join our [Telegram community](https://t.me/+SCPbza9fk8dkYWI0) -- Open an issue on [GitHub](https://github.com/thebuidl-grid/starknode-kit/issues) diff --git a/docs/package.json b/docs/package.json index 60823cd..e0da70a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,33 +1,23 @@ { "name": "starknode-kit-docs", "version": "1.0.0", - "description": "Documentation for Starknode Kit - A CLI tool for managing Ethereum and Starknet nodes", - "main": "README.md", + "private": true, "scripts": { - "serve": "honkit serve", - "build": "honkit build", - "pdf": "honkit pdf . ./starknode-kit-docs.pdf", - "epub": "honkit epub . ./starknode-kit-docs.epub" + "dev": "next dev", + "build": "next build", + "start": "next start" }, - "repository": { - "type": "git", - "url": "https://github.com/thebuidl-grid/starknode-kit.git" + "dependencies": { + "react": "19.1.0", + "react-dom": "19.1.0", + "next": "15.5.4" }, - "keywords": [ - "ethereum", - "starknet", - "blockchain", - "node", - "cli", - "documentation", - "gitbook" - ], - "author": "The Buidl Grid", - "license": "MIT", "devDependencies": { - "honkit": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" + "typescript": "^5", + "@types/node": "^20", + "@types/react": "^19", + "@types/react-dom": "^19", + "@tailwindcss/postcss": "^4", + "tailwindcss": "^4" } -} \ No newline at end of file +} diff --git a/docs/postcss.config.mjs b/docs/postcss.config.mjs new file mode 100644 index 0000000..c7bcb4b --- /dev/null +++ b/docs/postcss.config.mjs @@ -0,0 +1,5 @@ +const config = { + plugins: ["@tailwindcss/postcss"], +}; + +export default config; diff --git a/docs/public/file.svg b/docs/public/file.svg new file mode 100644 index 0000000..004145c --- /dev/null +++ b/docs/public/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/public/globe.svg b/docs/public/globe.svg new file mode 100644 index 0000000..567f17b --- /dev/null +++ b/docs/public/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/public/next.svg b/docs/public/next.svg new file mode 100644 index 0000000..5174b28 --- /dev/null +++ b/docs/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/public/vercel.svg b/docs/public/vercel.svg new file mode 100644 index 0000000..7705396 --- /dev/null +++ b/docs/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/public/window.svg b/docs/public/window.svg new file mode 100644 index 0000000..b2b2a44 --- /dev/null +++ b/docs/public/window.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/src/app/clients/page.tsx b/docs/src/app/clients/page.tsx new file mode 100644 index 0000000..e83e87c --- /dev/null +++ b/docs/src/app/clients/page.tsx @@ -0,0 +1,254 @@ +import Link from 'next/link'; + +export default function Clients() { + return ( +
+

Supported Clients

+ +

+ starknode-kit supports multiple client implementations for both Ethereum + and Starknet networks. +

+ +

Why Multiple Clients?

+ +

+ Running diverse client implementations is crucial for network health and + resilience. Client diversity prevents single points of failure and + reduces the impact of bugs in any one implementation. +

+ +

Ethereum Clients

+ +

+ To run an Ethereum node, you need both an{" "} + execution client and a consensus client + . They work together to validate and process Ethereum blocks post-merge. +

+ +
+
+

Execution Clients

+

Handle transaction execution and state management

+
    +
  • • Geth (Go)
  • +
  • • Reth (Rust)
  • +
+
+ +
+

Consensus Clients

+

Handle proof-of-stake consensus mechanism

+
    +
  • • Lighthouse (Rust)
  • +
  • • Prysm (Go)
  • +
+
+
+ +

Starknet Clients

+ +

+ Starknet clients allow you to run a Starknet full node, enabling interaction with the Starknet Layer 2 network. +

+ +
+
+

Starknet Clients

+

Full node implementations for Starknet

+
    +
  • • Juno (Go) - Full node client
  • +
  • • Starknet Validator - Validator client for staking
  • +
+
+
+ +

Client Combinations

+ +

Popular client combinations for Ethereum nodes:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExecutionConsensusCharacteristics
GethLighthouseMost popular, well-tested
RethLighthouseHigh performance, modern
GethPrysmStable, feature-rich
RethPrysmPerformance-focused
+
+ +

Choosing Clients

+ +

Execution Clients

+ +

Geth

+
    +
  • ✅ Most widely used and tested
  • +
  • ✅ Excellent documentation
  • +
  • ✅ Large community support
  • +
  • ✅ Stable and reliable
  • +
  • ⚠️ Higher resource usage
  • +
  • ⚠️ Larger disk footprint
  • +
+ +

Reth

+
    +
  • ✅ Excellent performance
  • +
  • ✅ Lower disk usage
  • +
  • ✅ Modern codebase (Rust)
  • +
  • ✅ Fast sync times
  • +
  • ⚠️ Newer, less battle-tested
  • +
  • ⚠️ Smaller community
  • +
+ +

Consensus Clients

+ +

Lighthouse

+
    +
  • ✅ Fast and efficient
  • +
  • ✅ Low resource usage
  • +
  • ✅ Great documentation
  • +
  • ✅ Active development
  • +
  • ✅ Written in Rust
  • +
+ +

Prysm

+
    +
  • ✅ Feature-rich
  • +
  • ✅ Good performance
  • +
  • ✅ Strong community
  • +
  • ✅ Comprehensive tooling
  • +
  • ✅ Written in Go
  • +
+ +

Starknet Clients

+ +

Juno

+
    +
  • ✅ Official full node client
  • +
  • ✅ Well-maintained
  • +
  • ✅ Fast sync
  • +
  • ✅ Active community
  • +
  • ✅ Required for Starknet validator
  • +
+ +

Resource Requirements by Client

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClientRAMDiskCPU
Geth16+ GB~1.2 TB4+ cores
Reth16+ GB~900 GB4+ cores
Lighthouse8+ GB~200 GB2+ cores
Prysm8+ GB~250 GB2+ cores
Juno8+ GB~300 GB2+ cores
+
+ +
+

💡 Recommendation

+

+ For most users, we recommend Reth + Lighthouse for Ethereum (best performance) + and Juno for Starknet. +

+
+ +

Client Diversity

+ +

+ Client diversity is critical for network health. If a single client has a bug and it's used by the majority of nodes, + it could cause network issues or even finality problems. +

+ +

Current client distribution matters! Consider using minority clients to help decentralize the network.

+ +

Switching Clients

+ +

You can switch clients at any time:

+ +
    +
  1. Stop your current clients: starknode-kit stop
  2. +
  3. Remove old client: starknode-kit remove --execution_client geth
  4. +
  5. Add new client: starknode-kit add --execution_client reth
  6. +
  7. Start nodes: starknode-kit start
  8. +
+ +
+

⚠️ Note

+

+ Switching clients may require re-syncing from scratch, which can take several days. + Plan accordingly and ensure you have sufficient disk space. +

+
+ +
+

📖 Next Steps

+

+ Ready to dive deeper? Check out our validator guide: +

+
+ Validator Guide +
+
+
+ ); +} + diff --git a/docs/src/app/commands/page.tsx b/docs/src/app/commands/page.tsx new file mode 100644 index 0000000..3fd0b4f --- /dev/null +++ b/docs/src/app/commands/page.tsx @@ -0,0 +1,157 @@ +import Link from 'next/link'; +import CodeBlock from '@/components/CodeBlock'; + +export default function Commands() { + return ( +
+

Commands Reference

+ +

+ Complete reference for all starknode-kit commands. Each command helps + you manage different aspects of your Ethereum and Starknet nodes. +

+ +

Command Overview

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandDescription
addAdd an Ethereum or Starknet client to the config
completionGenerate the autocompletion script for the specified shell
configCreate, show, and update your Starknet node configuration
monitorLaunch real-time monitoring dashboard
removeRemove a specified resource
runRun a specific local infrastructure service
startRun the configured Ethereum clients
statusDisplay status of running clients
stopStop the configured Ethereum clients
updateCheck for and install client updates
validatorManage the Starknet validator client
versionShow version of starknode-kit or a specific client
+
+ +

Quick Examples

+ +

Add Clients

+ + +

Configure Network

+ + +

+ Start Ethereum Clients +

+ + +

Monitor Nodes

+ + +

Check Status

+ + +

+ Run Individual Client +

+ + +

+ Stop Ethereum Clients +

+ + +

Check Version

+ + +

Getting Help

+ +

+ For any command, you can use the --help flag to get + detailed usage information: +

+ + + +

Shell Completion

+ +

+ Generate autocompletion scripts for your shell: +

+ + /etc/bash_completion.d/starknode-kit + +# Zsh +starknode-kit completion zsh > "\${fpath[1]}/_starknode-kit" + +# Fish +starknode-kit completion fish > ~/.config/fish/completions/starknode-kit.fish`} + /> + +
+

📖 Next Steps

+

+ Ready to dive deeper? Check out our comprehensive guides: +

+
+ Supported Clients +
+
+
+ ); +} + diff --git a/docs/src/app/configuration/page.tsx b/docs/src/app/configuration/page.tsx new file mode 100644 index 0000000..3cee155 --- /dev/null +++ b/docs/src/app/configuration/page.tsx @@ -0,0 +1,331 @@ +import CodeBlock from '@/components/CodeBlock'; +import Link from 'next/link'; + +export default function Configuration() { + return ( +
+

Configuration

+ +

+ Learn how to configure starknode-kit for your Ethereum and Starknet + nodes. +

+ +

Configuration File

+ +

+ starknode-kit stores its configuration in a YAML file located at: +

+ + + +

+ Creating a Configuration +

+ +

+ Generate a new configuration file with default settings: +

+ + + +

+ Viewing Configuration +

+ +

View your entire configuration:

+ + + +

View specific sections:

+ + + +

+ Configuration Structure +

+ +

+ The configuration file has the following structure: +

+ + + +

+ Modifying Configuration +

+ +

Change Network

+ +

+ Switch between mainnet, sepolia, or custom networks: +

+ + + +

+ Configure Execution Client +

+ +

Set execution client and ports:

+ + + +

+ Configure Consensus Client +

+ +

Set consensus client and checkpoint:

+ + + +

+ Configure Juno (Starknet) +

+ +

Configure your Juno Starknet client:

+ + + +

Network Settings

+ +

starknode-kit supports multiple networks:

+ +
    +
  • + mainnet - Ethereum and Starknet mainnet +
  • +
  • + sepolia - Ethereum Sepolia and Starknet Sepolia + testnet +
  • +
+ +
+

⚠️ Important

+

+ Changing the network will affect all clients. Make sure to stop your + nodes before changing networks. +

+
+ +

+ Port Configuration +

+ +

Default Ports

+ +

Default ports for each client:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClientPortsPurpose
Geth8545, 8546, 30303HTTP RPC, WS RPC, P2P
Reth8545, 8546, 30303HTTP RPC, WS RPC, P2P
Lighthouse5052, 9000HTTP API, P2P
Prysm4000, 13000HTTP API, P2P
Juno6060RPC
+
+ +

+ Validator Configuration +

+ +

+ For validator nodes, additional configuration is required. See the + Validator Setup page for details. +

+ +

+ Environment Variables +

+ +

+ Some sensitive data can be stored as environment variables: +

+ +
    +
  • + STARKNET_WALLET - Wallet address +
  • +
  • + STARKNET_PRIVATE_KEY - Private key +
  • +
  • + STARKNET_PUBLIC_KEY - Public key +
  • +
  • + STARKNET_CLASS_HASH - Class hash +
  • +
  • + STARKNET_SALT - Salt value +
  • +
+ +

+ Configuration Best Practices +

+ +
    +
  1. + Backup your config - Keep a backup of your + configuration file +
  2. +
  3. + Use environment variables - Store sensitive data in + environment variables +
  4. +
  5. + Document changes - Keep notes of any custom + configurations +
  6. +
  7. + Test on testnet - Always test configuration changes + on a testnet first +
  8. +
+ +

Troubleshooting

+ +

+ Configuration not loading +

+ +

+ If your configuration isn't loading, check: +

+ +
    +
  • + File exists at ~/.starknode-kit/starknode.yml +
  • +
  • File has correct YAML syntax
  • +
  • + File has correct permissions (readable by your user) +
  • +
+ +

Port conflicts

+ +

If you get port conflicts:

+ +
    +
  • + Check if ports are already in use: lsof -i :[port] +
  • +
  • Configure different ports in your config
  • +
  • Stop conflicting services
  • +
+ +
+

📖 Next Steps

+

+ Ready to dive deeper? Check out our comprehensive guides: +

+
+ Commands Reference +
+
+
+ ); +} + diff --git a/docs/src/app/contributing/page.tsx b/docs/src/app/contributing/page.tsx new file mode 100644 index 0000000..d003597 --- /dev/null +++ b/docs/src/app/contributing/page.tsx @@ -0,0 +1,265 @@ +import CodeBlock from '@/components/CodeBlock'; +import Link from 'next/link'; + +export default function Contributing() { + return ( +
+

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:

+ + + +

2. Clone Your Fork

+ + + +

3. Set Up Development Environment

+ +

Make sure you have the required tools:

+ +
    +
  • Go 1.24 or later
  • +
  • Make
  • +
  • Git
  • +
+ + + +

4. Create a Branch

+ +

Create a branch for your changes:

+ + + +

Development Workflow

+ +

Project Structure

+ + + +

Making Changes

+ +
    +
  1. Write your code - Implement your feature or fix
  2. +
  3. Follow Go conventions - Use gofmt and follow Go best practices
  4. +
  5. Add tests - Write tests for your changes when applicable
  6. +
  7. Update documentation - Update README or add docs as needed
  8. +
+ +

Testing

+ +

Run tests before submitting:

+ + + +

Code Style

+ +

Format your code with gofmt:

+ + + +

Submitting Changes

+ +

1. Commit Your Changes

+ +

Write clear, descriptive commit messages:

+ + + +

2. Push to Your Fork

+ + + +

3. Create a Pull Request

+ +
    +
  1. Go to the original repository on GitHub
  2. +
  3. Click "New Pull Request"
  4. +
  5. Select your fork and branch
  6. +
  7. Fill out the PR template with: +
      +
    • Description of changes
    • +
    • Related issues
    • +
    • Testing performed
    • +
    • Screenshots (if UI changes)
    • +
    +
  8. +
  9. Submit the pull request
  10. +
+ +

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. +
  3. Steps to reproduce - How to trigger the bug
  4. +
  5. Expected behavior - What should happen
  6. +
  7. Actual behavior - What actually happens
  8. +
  9. Environment - OS, Go version, starknode-kit version
  10. +
  11. Logs - Relevant log output or error messages
  12. +
+ + + +

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. +

+
+ + +
+ ); +} + diff --git a/docs/src/app/favicon.ico b/docs/src/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c GIT binary patch literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/docs/src/app/getting-started/page.tsx b/docs/src/app/getting-started/page.tsx new file mode 100644 index 0000000..f7e0251 --- /dev/null +++ b/docs/src/app/getting-started/page.tsx @@ -0,0 +1,228 @@ +import Link from "next/link"; +import CodeBlock from "@/components/CodeBlock"; + +export default function GettingStarted() { + return ( +
+

Getting Started

+ +

+ Welcome to starknode-kit! This guide will help you get up and running + with your Ethereum and Starknet nodes in just a few minutes. +

+ +

Prerequisites

+ +

Before you begin, make sure you have:

+ +
    +
  • + Operating System: Linux or macOS (Windows via WSL) +
  • +
  • + Go: Version 1.24 or later (if building from source) +
  • +
  • + Storage: At least 2TB of free SSD space +
  • +
  • + RAM: Minimum 32GB recommended +
  • +
  • + Network: Stable internet connection +
  • +
+ +
+

📝 Note

+

+ For detailed hardware requirements, check out our{" "} + + Requirements page + + . +

+
+ +

Installation

+ +

+ The quickest way to install starknode-kit is using the installation + script: +

+ + + +

This script will:

+
    +
  • + Download the latest version of starknode-kit +
  • +
  • + Install it to /usr/local/bin/ +
  • +
  • + Create necessary configuration directories +
  • +
+ +

+ Initial Configuration +

+ +

+ After installation, generate your initial configuration file: +

+ + + +

+ This creates a configuration file at{" "} + ~/.starknode-kit/starknode.yml with default settings. +

+ +

+ Add Your First Clients +

+ +

+ Ethereum Clients (Execution + Consensus) +

+ +

+ To run an Ethereum node, you need both an execution client and a + consensus client: +

+ + + +

Or with Reth and Prysm:

+ + + +

Starknet Client

+ +

To add a Starknet client (Juno):

+ + + +

Configure Network

+ +

+ By default, starknode-kit is configured for mainnet. To change to a + test network: +

+ + + +

Start Your Nodes

+ +

+ Start Ethereum Clients +

+ +

+ To start your configured Ethereum execution and consensus clients: +

+ + + +
+

⚠️ Important

+

+ The start command only launches Ethereum clients + (execution + consensus). It does not start Starknet clients. +

+
+ +

+ Run Individual Clients +

+ +

To run a specific client:

+ + + +

Monitor Your Nodes

+ +

+ Launch the real-time monitoring dashboard to see the status of your + nodes: +

+ + + +

The monitoring dashboard provides real-time insights:

+ +
+
+
+ 🔄 +
+

Node Sync Status

+

Real-time synchronization progress and health

+
+
+
+ +
+
+ 📊 +
+

Current Block Height

+

Latest block number and sync progress

+
+
+
+ +
+
+ 🌐 +
+

Network Statistics

+

Peer connections and network performance

+
+
+
+ +
+
+ 💻 +
+

System Resources

+

CPU, RAM, and disk usage metrics

+
+
+
+
+ +

Check Status

+ +

+ For a quick status check of all running clients: +

+ + + +
+

📖 Next Steps

+

+ Ready to dive deeper? Check out our installation guide: +

+
+ Installation Guide +
+
+
+ ); +} + diff --git a/docs/src/app/globals.css b/docs/src/app/globals.css new file mode 100644 index 0000000..b60e14f --- /dev/null +++ b/docs/src/app/globals.css @@ -0,0 +1,93 @@ +@import "tailwindcss"; + +body { + font-family: var(--font-inter), system-ui, -apple-system, sans-serif; + line-height: 1.7; +} + +/* Scrollbar styling */ +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: #cbd5e0; + border-radius: 4px; +} + +::-webkit-scrollbar-thumb:hover { + background: #a0aec0; +} + +/* Prose styling for documentation */ +.prose { + max-width: none; + line-height: 1.8; +} + +.prose p { + margin-bottom: 1.5rem; +} + +.prose h2 { + margin-top: 3rem; + margin-bottom: 1.5rem; +} + +.prose h3 { + margin-bottom: 1.25rem; +} + +.prose a { + color: #2563eb; + text-decoration: none; + transition: color 0.2s; +} + +.prose a:hover { + color: #1d4ed8; + text-decoration: none; +} + +.prose code { + background: #f3f4f6; + padding: 0.2em 0.4em; + border-radius: 0.25rem; + font-size: 0.875em; + font-family: 'Courier New', monospace; +} + +.prose pre { + background: #1a202c !important; + padding: 1rem; + border-radius: 0.5rem; + overflow-x: auto; +} + +.prose pre code { + background: transparent; + padding: 0; + color: #e2e8f0; +} + +.prose table { + width: 100%; + border-collapse: collapse; +} + +.prose th { + text-align: left; + font-weight: 600; +} + +.prose blockquote { + border-left: 4px solid #e5e7eb; + padding-left: 1rem; + font-style: italic; + color: #6b7280; +} diff --git a/docs/src/app/installation/page.tsx b/docs/src/app/installation/page.tsx new file mode 100644 index 0000000..9dcd313 --- /dev/null +++ b/docs/src/app/installation/page.tsx @@ -0,0 +1,179 @@ +import Link from 'next/link'; +import CodeBlock from '@/components/CodeBlock'; + +export default function Installation() { + return ( +
+

Installation

+ +

+ There are multiple ways to install starknode-kit. Choose the method that + best suits your needs. +

+ +

+ Option 1: Install Script (Recommended) +

+ +

+ The easiest and recommended way to install starknode-kit: +

+ + + +

+ Or download the script first and then run it: +

+ + + +

+ Option 2: Install using Go +

+ +

+ If you have Go installed (version 1.24 or later), you can install + starknode-kit directly: +

+ + + +

+ This installs the latest version from the main branch. +

+ +

+ Option 3: Manual Installation from Source +

+ +

+ 1. Clone the Repository +

+ + + +

2. Build and Install

+ + + +

Verify Installation

+ +

+ After installation, verify that starknode-kit is working correctly: +

+ + + +

You should see output similar to:

+ + + +

Initial Setup

+ +

+ After successful installation, generate your configuration file: +

+ + + +

+ This creates a configuration file at{" "} + ~/.starknode-kit/starknode.yml. +

+ +

Uninstallation

+ +

+ To uninstall starknode-kit, remove the binary and configuration + directory: +

+ + + +
+

⚠️ Note

+

+ This will not remove any client data (e.g., blockchain data). The data + is stored in the locations specified in your{" "} + ~/.starknode-kit/starknode.yml file. +

+
+ +

Troubleshooting

+ +

Command not found

+ +

+ If you get a "command not found" error, make sure{" "} + /usr/local/bin is in your PATH: +

+ + + +

+ Add this to your ~/.bashrc or ~/.zshrc to make + it permanent. +

+ +

Permission denied

+ +

+ If you encounter permission issues during installation, make sure you + have sudo access or contact your system administrator. +

+ +
+

📖 Next Steps

+

+ Ready to dive deeper? Check out our configuration guide: +

+
+ Configuration Guide +
+
+
+ ); +} + diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx new file mode 100644 index 0000000..66099db --- /dev/null +++ b/docs/src/app/layout.tsx @@ -0,0 +1,40 @@ +import type { Metadata } from "next"; +import { Inter, Source_Code_Pro } from "next/font/google"; +import "./globals.css"; +import Sidebar from "@/components/Sidebar"; +import Header from "@/components/Header"; + +const inter = Inter({ + subsets: ["latin"], + variable: "--font-inter", +}); + +const source_code_pro = Source_Code_Pro({ + subsets: ["latin"], + variable: "--font-source-code" +}) + +export const metadata: Metadata = { + title: "starknode-kit Documentation", + description: "Complete documentation for starknode-kit - A CLI tool for setting up and managing Ethereum and Starknet nodes", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + +
+
+
+ {children} +
+
+ + + ); +} diff --git a/docs/src/app/page.tsx b/docs/src/app/page.tsx new file mode 100644 index 0000000..ea7a66d --- /dev/null +++ b/docs/src/app/page.tsx @@ -0,0 +1,144 @@ +import Link from "next/link"; +import CodeBlock from "@/components/CodeBlock"; + +export default function Home() { + return ( +
+

Welcome to starknode-kit

+ +

+ A powerful command-line tool to help developers and node operators + easily set up, manage, and maintain Ethereum and Starknet nodes. +

+ +
+ +

+ 🚀 Getting Started +

+

+ Learn how to install and configure starknode-kit for your node + setup. +

+ + + +

+ 📘 Commands +

+

+ Explore all available commands and their usage. +

+ + + +

+ ⚙️ Configuration +

+

+ Configure your Ethereum and Starknet clients. +

+ + + +

+ 🔐 Validator Setup +

+

+ Set up and manage your Starknet validator node. +

+ +
+ +

Quick Start

+ +

Install starknode-kit with a single command:

+ + + +

Generate your configuration file:

+ + + +

Add your first client pair:

+ + + +

Key Features

+ +
    +
  • + ✅ Easy Setup - Get your node running in minutes +
  • +
  • + ✅ Multi-Client Support - Works with Geth, Reth, + Lighthouse, Prysm, and Juno +
  • +
  • + ✅ Real-time Monitoring - Built-in dashboard to + monitor your nodes +
  • +
  • + ✅ Auto Updates - Keep your clients up to date + automatically +
  • +
  • + ✅ Validator Management - Simplified Starknet + validator operations +
  • +
  • + ✅ Network Flexibility - Support for mainnet, + sepolia, and custom networks +
  • +
+ +

Supported Clients

+ +
+
+

Execution Layer

+
    +
  • • Geth
  • +
  • • Reth
  • +
+
+
+

Consensus Layer

+
    +
  • • Lighthouse
  • +
  • • Prysm
  • +
+
+
+

Starknet

+
    +
  • • Juno
  • +
  • • Starknet Validator
  • +
+
+
+ +
+

📖 Next Steps

+

+ Ready to dive deeper? Check out our comprehensive guides: +

+
+ Installation Guide +
+
+
+ ); +} diff --git a/docs/src/app/requirements/page.tsx b/docs/src/app/requirements/page.tsx new file mode 100644 index 0000000..8ef1256 --- /dev/null +++ b/docs/src/app/requirements/page.tsx @@ -0,0 +1,319 @@ +import Link from 'next/link'; +import CodeBlock from '@/components/CodeBlock'; + +export default function Requirements() { + return ( +
+

Requirements

+ +

+ Hardware and software requirements for running Ethereum and Starknet + nodes with starknode-kit. +

+ +

Hardware Requirements

+ +
+

📚 Reference

+

+ For a detailed breakdown of node hardware requirements, see the Rocket Pool Hardware Guide. +

+
+ +

Minimum Requirements

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentRequirementNotes
CPU4+ coresIntel i3/i5 or AMD equivalent. Avoid Celeron.
RAM32 GBMinimum 16GB, 32GB recommended for comfort
Storage2+ TB NVMe SSDMust have DRAM cache, no QLC NAND
Network100+ MbpsStable connection, unlimited data preferred
Power24/7 uptimeUPS recommended for validators
+
+ +

Recommended Specifications

+ +
    +
  • CPU: Intel i5/i7 or AMD Ryzen 5/7 (6+ cores)
  • +
  • RAM: 64 GB DDR4
  • +
  • Storage: 4 TB NVMe SSD with DRAM cache
  • +
  • Network: 1 Gbps fiber connection
  • +
  • Backup Power: UPS with 30+ minutes runtime
  • +
+ +

Storage Requirements

+ +

Storage is the most critical component for node operation.

+ +

Storage Size

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClientCurrent SizeGrowth Rate
Ethereum (Geth)~1.2 TB~150 GB/year
Ethereum (Reth)~900 GB~120 GB/year
Lighthouse~200 GB~50 GB/year
Prysm~250 GB~60 GB/year
Juno (Starknet)~300 GB~100 GB/year
+
+ +

SSD Requirements

+ +

Your SSD must have:

+ +
    +
  • DRAM cache - Essential for performance
  • +
  • TLC or better NAND - No QLC (Quad-Level Cell)
  • +
  • High endurance rating - 600+ TBW recommended
  • +
  • NVMe interface - SATA SSDs are too slow
  • +
+ +
+

⚠️ Warning

+

+ Using a QLC SSD or SSD without DRAM cache will result in poor performance and potential node failures. + See the tested SSD list for recommendations. +

+
+ +

Software Requirements

+ +

Operating System

+ +

Supported operating systems:

+ +
    +
  • Linux: Ubuntu 20.04+, Debian 11+, or other modern distributions
  • +
  • macOS: macOS 12 (Monterey) or later
  • +
  • Windows: Windows 10/11 with WSL2 (Ubuntu)
  • +
+ +

Linux is highly recommended for production use.

+ +

Required Software

+ +

Go (for building from source)

+ +

Version 1.24 or later required:

+ + + +

Install from: https://go.dev/dl/

+ +

Rust (for Starknet clients)

+ +

Recommended for building Juno and other Starknet clients:

+ + + +

Make

+ +

Required for building certain clients:

+ + + +

Network Requirements

+ +

Bandwidth

+ +
    +
  • Download: 100+ Mbps
  • +
  • Upload: 25+ Mbps
  • +
  • Data Cap: Unlimited (or 2+ TB/month)
  • +
+ +

Ports

+ +

Ensure these ports are accessible:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PortProtocolPurpose
30303TCP/UDPEthereum execution P2P
9000TCP/UDPLighthouse consensus P2P
13000TCPPrysm consensus P2P
6060TCPJuno RPC (localhost only)
+
+ +

For Validator Nodes

+ +

Additional requirements for running a validator:

+ +
    +
  • Uptime: 99.9%+ availability required
  • +
  • Backup Power: UPS mandatory
  • +
  • Monitoring: 24/7 monitoring and alerting
  • +
  • Backup Internet: Secondary connection recommended
  • +
  • Dedicated Hardware: No shared resources
  • +
+ +

Tested Hardware Configurations

+ +

Budget Build (~$800)

+ +
    +
  • Intel NUC 13 PRO (i5)
  • +
  • 32 GB DDR4 RAM
  • +
  • 2 TB NVMe SSD (Samsung 980 PRO)
  • +
  • Ubuntu 22.04 LTS
  • +
+ +

Recommended Build (~$1500)

+ +
    +
  • Custom build: AMD Ryzen 7 or Intel i7
  • +
  • 64 GB DDR4 RAM
  • +
  • 4 TB NVMe SSD (Samsung 990 PRO)
  • +
  • 1 Gbps fiber connection
  • +
  • UPS with 30min+ runtime
  • +
  • Ubuntu 22.04 LTS
  • +
+ +

Pro Build (~$3000+)

+ +
    +
  • High-end workstation or server
  • +
  • 128 GB ECC RAM
  • +
  • 8 TB NVMe SSD (enterprise grade)
  • +
  • Redundant power supplies
  • +
  • Redundant network connections
  • +
  • Professional monitoring and alerting
  • +
+ +

Cloud Providers

+ +

If running in the cloud, recommended specifications:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ProviderInstance TypeEst. Cost/Month
AWSm5.2xlarge + 4TB gp3~$500-700
Google Cloudn2-standard-8 + 4TB SSD~$600-800
AzureStandard_D8s_v3 + 4TB Premium SSD~$550-750
+
+ +
+

💡 Cost Consideration

+

+ Running on dedicated hardware is often more cost-effective long-term than cloud hosting, especially for validators. +

+
+
+ ); +} + diff --git a/docs/src/app/validator/page.tsx b/docs/src/app/validator/page.tsx new file mode 100644 index 0000000..156aa27 --- /dev/null +++ b/docs/src/app/validator/page.tsx @@ -0,0 +1,239 @@ +import CodeBlock from '@/components/CodeBlock'; +import Link from 'next/link'; +export default function Validator() { + return ( +
+

Validator Setup

+ +

+ Set up and manage your Starknet validator node using starknode-kit. +

+ +
+

⚠️ Important

+

+ Running a validator requires significant responsibility. Make sure you + understand the requirements and risks before proceeding. +

+
+ +

Prerequisites

+ +

Before setting up a validator, ensure you have:

+ +
    +
  • ✅ A fully synced Juno (Starknet) node
  • +
  • ✅ A Starknet wallet with sufficient funds for staking
  • +
  • ✅ Stable internet connection with 99.9%+ uptime
  • +
  • ✅ Understanding of validator responsibilities
  • +
+ +

Installation

+ +

The validator client is managed through starknode-kit. First, ensure you have starknode-kit installed and configured.

+ +

Validator Commands

+ +

Check Validator Status

+ +

Check the status of your validator:

+ + + +

Get Validator Version

+ +

Check the installed version of the validator client:

+ + + +

Set Juno RPC Endpoint

+ +

Configure the Juno RPC endpoint for your validator:

+ + + +

Or use a remote Juno node:

+ + + +

Configuration

+ +

Validator configuration is stored in your starknode-kit config file. Key settings include:

+ + + +

Setting Up Environment Variables

+ +

Store sensitive validator data in environment variables:

+ + + +

Add these to your ~/.bashrc or ~/.zshrc to make them persistent.

+ +

Starting Your Validator

+ +

Step 1: Ensure Juno is Running

+ +

Your Juno node must be fully synced and running:

+ + + +

Step 2: Verify Configuration

+ +

Check your validator configuration:

+ + + +

Step 3: Start the Validator

+ +

Start your validator client:

+ + + +

Monitoring Your Validator

+ +

Monitor your validator status:

+ + + +

Validator Responsibilities

+ +
    +
  1. Uptime - Maintain high availability (99.9%+)
  2. +
  3. Security - Keep your keys secure and never share them
  4. +
  5. Updates - Keep your validator software up to date
  6. +
  7. Monitoring - Actively monitor your validator performance
  8. +
  9. Backup - Maintain secure backups of your keys
  10. +
+ +

Security Best Practices

+ +
    +
  • ✅ Use hardware wallets when possible
  • +
  • ✅ Store keys in environment variables, not in config files
  • +
  • ✅ Use firewall to restrict access to validator ports
  • +
  • ✅ Enable SSH key-based authentication
  • +
  • ✅ Keep your server updated with security patches
  • +
  • ✅ Monitor for unusual activity
  • +
  • ✅ Have a disaster recovery plan
  • +
  • ❌ Never share your private keys
  • +
  • ❌ Don't run validators on shared hosting
  • +
  • ❌ Avoid storing keys in version control
  • +
+ +

Staking and Commission

+ +

Configure your validator's commission rate:

+ + + +

This sets a 10% commission on staking rewards. Validators typically charge 5-15% commission.

+ +

Troubleshooting

+ +

Validator Not Connecting to Juno

+ +

Check that:

+
    +
  • Juno is running: starknode-kit status
  • +
  • RPC endpoint is correct in config
  • +
  • Firewall allows connections to Juno port
  • +
+ +

Keys Not Loading

+ +

Verify environment variables are set:

+ + + +

If empty, add to your shell profile and reload.

+ +

Validator Offline

+ +

If your validator goes offline:

+
    +
  1. ✅ Check system resources
  2. +
  3. ✅ Check network connectivity
  4. +
  5. ✅ Review validator logs
  6. +
  7. ✅ Restart validator if needed
  8. +
+ +

Performance Metrics

+ +

Monitor these key metrics:

+ +
    +
  • Attestation rate - Percentage of successful attestations
  • +
  • Block proposals - Number of blocks proposed
  • +
  • Uptime - Validator availability percentage
  • +
  • Rewards - Staking rewards earned
  • +
+ +

Validator Economics

+ +

Understand the economics:

+ +
    +
  • Minimum Stake - Required amount to become a validator
  • +
  • Rewards - Earned from successful validation
  • +
  • Commission - Your fee for running the validator
  • +
  • Penalties - For downtime or malicious behavior
  • +
+ +
+

💡 Tip

+

+ Start on the testnet (Sepolia) to familiarize yourself with validator operations before running on mainnet. +

+
+ +

Resources

+ + + +
+

📖 Next Steps

+

+ Ready to dive deeper? Check out our comprehensive guides: +

+
+ System Requirements +
+
+
+ ); +} + diff --git a/docs/src/components/CodeBlock.tsx b/docs/src/components/CodeBlock.tsx new file mode 100644 index 0000000..8f6f33e --- /dev/null +++ b/docs/src/components/CodeBlock.tsx @@ -0,0 +1,35 @@ +'use client'; + +import { useState } from 'react'; + +interface CodeBlockProps { + code: string; + language?: string; +} + +export default function CodeBlock({ code, language = 'bash' }: CodeBlockProps) { + const [copied, setCopied] = useState(false); + + const copyToClipboard = async () => { + await navigator.clipboard.writeText(code); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }; + + return ( +
+
+ +
+
+        

{code}

+
+
+ ); +} + diff --git a/docs/src/components/Header.tsx b/docs/src/components/Header.tsx new file mode 100644 index 0000000..7be998d --- /dev/null +++ b/docs/src/components/Header.tsx @@ -0,0 +1,41 @@ +'use client'; + +import Link from 'next/link'; + +export default function Header() { + return ( +
+
+
+ + + + + + + + + + +
+
+
+ ); +} + diff --git a/docs/src/components/Sidebar.tsx b/docs/src/components/Sidebar.tsx new file mode 100644 index 0000000..0c7c350 --- /dev/null +++ b/docs/src/components/Sidebar.tsx @@ -0,0 +1,60 @@ +'use client'; + +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; + +interface NavItem { + title: string; + href: string; +} + +const navigation: NavItem[] = [ + { title: 'Introduction', href: '/' }, + { title: 'Getting Started', href: '/getting-started' }, + { title: 'Installation', href: '/installation' }, + { title: 'Configuration', href: '/configuration' }, + { title: 'Commands', href: '/commands' }, + { title: 'Clients', href: '/clients' }, + { title: 'Validator Setup', href: '/validator' }, + { title: 'Requirements', href: '/requirements' }, + { title: 'Contributing', href: '/contributing' }, +]; + +export default function Sidebar() { + const pathname = usePathname(); + + const isActive = (href: string) => { + if (href === '/') return pathname === href; + return pathname.startsWith(href); + }; + + return ( + + ); +} + diff --git a/docs/styles/website.css b/docs/styles/website.css deleted file mode 100644 index 1288007..0000000 --- a/docs/styles/website.css +++ /dev/null @@ -1,282 +0,0 @@ -/* Custom styles for Starknode Kit documentation */ - -/* Brand colors */ -:root { - --primary-color: #6366f1; - --secondary-color: #8b5cf6; - --accent-color: #06b6d4; - --success-color: #10b981; - --warning-color: #f59e0b; - --error-color: #ef4444; - --text-color: #1f2937; - --bg-color: #ffffff; - --border-color: #e5e7eb; -} - -/* Header styling */ -.book-header { - background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); - border-bottom: 1px solid var(--border-color); -} - -.book-header h1 { - color: white; - font-weight: 600; -} - -/* Navigation styling */ -.book-summary { - background-color: #f8fafc; - border-right: 1px solid var(--border-color); -} - -.book-summary ul.summary li a { - color: var(--text-color); - font-weight: 500; -} - -.book-summary ul.summary li.active > a { - color: var(--primary-color); - background-color: #e0e7ff; - border-left: 3px solid var(--primary-color); -} - -.book-summary ul.summary li a:hover { - color: var(--primary-color); - background-color: #f1f5f9; -} - -/* Content styling */ -.book-body { - background-color: var(--bg-color); -} - -.markdown-section { - max-width: 900px; - line-height: 1.6; - color: var(--text-color); -} - -.markdown-section h1, -.markdown-section h2, -.markdown-section h3, -.markdown-section h4, -.markdown-section h5, -.markdown-section h6 { - color: var(--text-color); - font-weight: 600; - margin-top: 2rem; - margin-bottom: 1rem; -} - -.markdown-section h1 { - font-size: 2.5rem; - border-bottom: 2px solid var(--primary-color); - padding-bottom: 0.5rem; -} - -.markdown-section h2 { - font-size: 2rem; - color: var(--primary-color); -} - -.markdown-section h3 { - font-size: 1.5rem; - color: var(--secondary-color); -} - -/* Code styling */ -.markdown-section pre { - background-color: #1e293b; - border: 1px solid #334155; - border-radius: 8px; - padding: 1rem; - overflow-x: auto; -} - -.markdown-section code { - background-color: #f1f5f9; - color: var(--primary-color); - padding: 0.2rem 0.4rem; - border-radius: 4px; - font-size: 0.9em; -} - -.markdown-section pre code { - background-color: transparent; - color: #e2e8f0; - padding: 0; -} - -/* Blockquote styling */ -.markdown-section blockquote { - border-left: 4px solid var(--accent-color); - background-color: #f0f9ff; - padding: 1rem; - margin: 1rem 0; - border-radius: 0 8px 8px 0; -} - -.markdown-section blockquote p { - margin: 0; - color: #0c4a6e; -} - -/* Table styling */ -.markdown-section table { - border-collapse: collapse; - width: 100%; - margin: 1rem 0; - border-radius: 8px; - overflow: hidden; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -} - -.markdown-section table th { - background-color: var(--primary-color); - color: white; - padding: 0.75rem; - text-align: left; - font-weight: 600; -} - -.markdown-section table td { - padding: 0.75rem; - border-bottom: 1px solid var(--border-color); -} - -.markdown-section table tr:nth-child(even) { - background-color: #f8fafc; -} - -.markdown-section table tr:hover { - background-color: #f1f5f9; -} - -/* Alert boxes */ -.alert { - padding: 1rem; - margin: 1rem 0; - border-radius: 8px; - border-left: 4px solid; -} - -.alert-info { - background-color: #f0f9ff; - border-left-color: var(--accent-color); - color: #0c4a6e; -} - -.alert-warning { - background-color: #fffbeb; - border-left-color: var(--warning-color); - color: #92400e; -} - -.alert-success { - background-color: #f0fdf4; - border-left-color: var(--success-color); - color: #166534; -} - -.alert-error { - background-color: #fef2f2; - border-left-color: var(--error-color); - color: #991b1b; -} - -/* Button styling */ -.btn { - display: inline-block; - padding: 0.5rem 1rem; - background-color: var(--primary-color); - color: white; - text-decoration: none; - border-radius: 6px; - font-weight: 500; - transition: background-color 0.2s; -} - -.btn:hover { - background-color: var(--secondary-color); - color: white; - text-decoration: none; -} - -.btn-secondary { - background-color: var(--secondary-color); -} - -.btn-secondary:hover { - background-color: var(--primary-color); -} - -/* Feature highlights */ -.feature-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); - gap: 1.5rem; - margin: 2rem 0; -} - -.feature-card { - background: white; - border: 1px solid var(--border-color); - border-radius: 12px; - padding: 1.5rem; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); - transition: transform 0.2s, box-shadow 0.2s; -} - -.feature-card:hover { - transform: translateY(-2px); - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); -} - -.feature-card h3 { - color: var(--primary-color); - margin-top: 0; - margin-bottom: 1rem; -} - -.feature-card .icon { - font-size: 2rem; - margin-bottom: 1rem; -} - -/* Responsive design */ -@media (max-width: 768px) { - .markdown-section { - padding: 1rem; - } - - .markdown-section h1 { - font-size: 2rem; - } - - .markdown-section h2 { - font-size: 1.5rem; - } - - .feature-grid { - grid-template-columns: 1fr; - } -} - -/* Print styles */ -@media print { - .book-header, - .book-summary, - .book-body .navigation { - display: none; - } - - .book-body { - margin: 0; - padding: 0; - } - - .markdown-section { - max-width: none; - } -} diff --git a/docs/tailwind.config.ts b/docs/tailwind.config.ts new file mode 100644 index 0000000..f67c807 --- /dev/null +++ b/docs/tailwind.config.ts @@ -0,0 +1,16 @@ +import type { Config } from "tailwindcss"; + +const config: Config = { + content: [ + "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", + "./src/components/**/*.{js,ts,jsx,tsx,mdx}", + "./src/app/**/*.{js,ts,jsx,tsx,mdx}", + ], + theme: { + extend: {}, + }, + plugins: [], +}; + +export default config; + diff --git a/docs/tsconfig.json b/docs/tsconfig.json new file mode 100644 index 0000000..c133409 --- /dev/null +++ b/docs/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2017", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} From facbfb6324bbd38376a0ae1642e8d7d53d4c03fe Mon Sep 17 00:00:00 2001 From: OtowoSamuel Date: Mon, 6 Oct 2025 17:02:27 +0100 Subject: [PATCH 07/18] feat: implement dynamic monitor with validator support and adaptive layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ New Features: - Added Validator log panel for Starknet Validator (starknet-staking-v2) - Dynamic layout that shows only running clients - 'No Clients Running' message when no clients are active - Automatic layout rebuild based on client state changes 🏗️ Architecture: - Created layout.go for dynamic layout management - Implemented rebuildDynamicLayout() for adaptive UI - Added updateLayoutDynamically() for state monitoring - Added updateValidatorLogs() for validator log updates 🔧 Technical Details: - Validator detection in GetRunningClients() - ValidatorLogBox and ValidatorLogChan added to types - Dynamic row configuration based on active clients - State signature comparison to minimize rebuilds - 5-second polling interval for client state changes ✅ Testing: - Added comprehensive test suite in dynamic_test.go - All 8 tests passing - Tested no-clients, single-client, and all-clients scenarios 📚 Documentation: - Complete implementation documentation in DYNAMIC_MONITOR_IMPLEMENTATION.md - Inline code documentation - Architecture decisions explained 🎯 Acceptance Criteria Met: ✓ Validator log panel implemented ✓ Dynamic layout adjustment working ✓ No clients running message displayed ✓ Clean and responsive layout This implementation provides a professional, adaptive monitoring dashboard that automatically adjusts to show only active blockchain clients. --- pkg/monitoring/dynamic_test.go | 189 +++++++++++++++++++++++++++++++++ pkg/monitoring/layout.go | 156 +++++++++++++++++++++++++++ pkg/monitoring/monitor.go | 37 +++++-- pkg/monitoring/types.go | 3 + pkg/monitoring/ui.go | 62 +++++------ pkg/monitoring/updaters.go | 162 ++++++++++++++++++++++++++++ pkg/utils/utils.go | 12 +++ 7 files changed, 576 insertions(+), 45 deletions(-) create mode 100644 pkg/monitoring/dynamic_test.go create mode 100644 pkg/monitoring/layout.go diff --git a/pkg/monitoring/dynamic_test.go b/pkg/monitoring/dynamic_test.go new file mode 100644 index 0000000..f20c5b1 --- /dev/null +++ b/pkg/monitoring/dynamic_test.go @@ -0,0 +1,189 @@ +package monitoring + +import ( + "testing" + "time" + + "github.com/thebuidl-grid/starknode-kit/pkg/types" + "github.com/thebuidl-grid/starknode-kit/pkg/utils" +) + +// TestDynamicLayout tests that the layout rebuilds correctly based on running clients +func TestDynamicLayout(t *testing.T) { + app := NewMonitorApp() + + // Test 1: Initial layout should have all panels created + if app.ExecutionLogBox == nil { + t.Error("ExecutionLogBox should be created") + } + if app.ConsensusLogBox == nil { + t.Error("ConsensusLogBox should be created") + } + if app.JunoLogBox == nil { + t.Error("JunoLogBox should be created") + } + if app.ValidatorLogBox == nil { + t.Error("ValidatorLogBox should be created") + } + if app.NoClientsBox == nil { + t.Error("NoClientsBox should be created") + } +} + +// TestValidatorLogChannel tests that the validator log channel is created and working +func TestValidatorLogChannel(t *testing.T) { + app := NewMonitorApp() + + // Test that channel is created + if app.ValidatorLogChan == nil { + t.Fatal("ValidatorLogChan should be created") + } + + // Test that we can send to the channel + testMessage := "Test validator log message" + select { + case app.ValidatorLogChan <- testMessage: + // Successfully sent + case <-time.After(time.Second): + t.Error("Failed to send to ValidatorLogChan") + } + + // Test that we can receive from the channel + select { + case msg := <-app.ValidatorLogChan: + if msg != testMessage { + t.Errorf("Expected '%s', got '%s'", testMessage, msg) + } + case <-time.After(time.Second): + t.Error("Failed to receive from ValidatorLogChan") + } +} + +// TestRebuildDynamicLayoutNoClients tests layout when no clients are running +func TestRebuildDynamicLayoutNoClients(t *testing.T) { + app := NewMonitorApp() + + // Mock no running clients + // Note: This test assumes GetRunningClients returns empty array when no clients running + app.rebuildDynamicLayout() + + // The grid should be rebuilt but we can't easily test the internal state + // We just verify it doesn't panic + t.Log("Dynamic layout rebuild completed without panics") +} + +// TestValidatorClientDetection tests that validator is properly detected +func TestValidatorClientDetection(t *testing.T) { + // Get running clients + clients := utils.GetRunningClients() + + // Check if Validator is in the supported client types + hasValidator := false + for _, client := range clients { + if client.Name == "Validator" || client.Name == "StarknetValidator" { + hasValidator = true + t.Logf("Validator client detected: %s (PID: %d)", client.Name, client.PID) + break + } + } + + if !hasValidator { + t.Log("No validator client currently running (expected if not started)") + } +} + +// TestValidatorClientType tests the ClientStarkValidator constant +func TestValidatorClientType(t *testing.T) { + if types.ClientStarkValidator != "starknet-staking-v2" { + t.Errorf("Expected ClientStarkValidator to be 'starknet-staking-v2', got '%s'", types.ClientStarkValidator) + } +} + +// TestAllLogChannelsCreated tests that all log channels are properly initialized +func TestAllLogChannelsCreated(t *testing.T) { + app := NewMonitorApp() + + channels := map[string]chan string{ + "ExecutionLogChan": app.ExecutionLogChan, + "ConsensusLogChan": app.ConsensusLogChan, + "JunoLogChan": app.JunoLogChan, + "ValidatorLogChan": app.ValidatorLogChan, + "StatusChan": app.StatusChan, + "NetworkChan": app.NetworkChan, + "JunoStatusChan": app.JunoStatusChan, + "ChainInfoChan": app.ChainInfoChan, + "SystemStatsChan": app.SystemStatsChan, + "RPCInfoChan": app.RPCInfoChan, + } + + for name, ch := range channels { + if ch == nil { + t.Errorf("Channel %s should be initialized", name) + } + } +} + +// TestNoClientsMessage tests the "No Clients Running" message box +func TestNoClientsMessage(t *testing.T) { + app := NewMonitorApp() + + if app.NoClientsBox == nil { + t.Fatal("NoClientsBox should be created") + } + + text := app.NoClientsBox.GetText(false) + if text == "" { + t.Error("NoClientsBox should have a message") + } + + // Check that it contains the expected warning message + if !contains(text, "NO CLIENTS RUNNING") { + t.Error("NoClientsBox should contain 'NO CLIENTS RUNNING' message") + } +} + +// TestLogFormatting tests that log lines are properly formatted +func TestLogFormatting(t *testing.T) { + testCases := []struct { + input string + contains []string + }{ + { + input: "INFO [12-07|15:32:22.145] Test message", + contains: []string{"INFO", "Test message"}, + }, + { + input: "WARN something happened", + contains: []string{"WARN", "something happened"}, + }, + { + input: "ERROR critical failure", + contains: []string{"ERROR", "critical failure"}, + }, + } + + for _, tc := range testCases { + formatted := formatLogLines(tc.input) + for _, expected := range tc.contains { + if !contains(formatted, expected) { + t.Errorf("Formatted log should contain '%s'\nInput: %s\nOutput: %s", expected, tc.input, formatted) + } + } + } +} + +// Helper function to check if a string contains a substring +func contains(s, substr string) bool { + return len(s) >= len(substr) && (s == substr || len(s) > len(substr) && + (s[:len(substr)] == substr || s[len(s)-len(substr):] == substr || + indexInString(s, substr) >= 0)) +} + +func indexInString(s, substr string) int { + for i := 0; i <= len(s)-len(substr); i++ { + if s[i:i+len(substr)] == substr { + return i + } + } + return -1 +} diff --git a/pkg/monitoring/layout.go b/pkg/monitoring/layout.go new file mode 100644 index 0000000..c268623 --- /dev/null +++ b/pkg/monitoring/layout.go @@ -0,0 +1,156 @@ +package monitoring + +import ( + "context" + "time" + + "github.com/rivo/tview" + "github.com/thebuidl-grid/starknode-kit/pkg/utils" +) + +// rebuildDynamicLayout rebuilds the entire grid layout based on running clients +func (m *MonitorApp) rebuildDynamicLayout() { + runningClients := utils.GetRunningClients() + + // Determine which clients are running + hasExecution := false + hasConsensus := false + hasJuno := false + hasValidator := false + + for _, client := range runningClients { + switch client.Name { + case "Geth", "Reth": + hasExecution = true + case "Lighthouse", "Prysm": + hasConsensus = true + case "Juno": + hasJuno = true + case "Validator": + hasValidator = true + } + } + + // Count active log panels + activeLogPanels := 0 + if hasExecution { + activeLogPanels++ + } + if hasConsensus { + activeLogPanels++ + } + if hasJuno { + activeLogPanels++ + } + if hasValidator { + activeLogPanels++ + } + + // Clear the grid + m.Grid.Clear() + + // If no clients are running, show "No Clients Running" message + if activeLogPanels == 0 { + m.Grid.SetRows(-1). + SetColumns(-1). + SetBorders(false) + m.Grid.AddItem(m.NoClientsBox, 0, 0, 1, 1, 0, 0, false) + return + } + + // Create dynamic row configuration based on number of active clients + rows := make([]int, activeLogPanels) + for i := range rows { + rows[i] = -1 // Equal height for all rows + } + + m.Grid.SetRows(rows...). + SetColumns(-3, -2). // LEFT(60%), RIGHT(40%) + SetBorders(false). + SetGap(0, 0) + + // Add active log panels to the left side + currentRow := 0 + if hasExecution { + m.Grid.AddItem(m.ExecutionLogBox, currentRow, 0, 1, 1, 0, 0, false) + currentRow++ + } + if hasConsensus { + m.Grid.AddItem(m.ConsensusLogBox, currentRow, 0, 1, 1, 0, 0, false) + currentRow++ + } + if hasJuno { + m.Grid.AddItem(m.JunoLogBox, currentRow, 0, 1, 1, 0, 0, false) + currentRow++ + } + if hasValidator { + m.Grid.AddItem(m.ValidatorLogBox, currentRow, 0, 1, 1, 0, 0, false) + currentRow++ + } + + // RIGHT SIDE - Create sub-grid for info panels (5 rows total) + rightGrid := tview.NewGrid(). + SetRows(-1, -1, -1, -1, -1). // 5 equal rows + SetColumns(-1). // Single column + SetBorders(false). + SetGap(0, 0) + + // Create status grid for ETH and Starknet status side by side + statusGrid := tview.NewGrid(). + SetRows(-1). // Single row + SetColumns(-1, -1). // 2 equal columns for ETH and Starknet + SetBorders(false). + SetGap(1, 0) // Small gap between status panels + + // Add ETH and Starknet status to the status grid + statusGrid.AddItem(m.StatusBox, 0, 0, 1, 1, 0, 0, false) // ETH Status (left) + statusGrid.AddItem(m.StarknetStatusBox, 0, 1, 1, 1, 0, 0, false) // Starknet Status (right) + + // Add all panels to the right side sub-grid + rightGrid.AddItem(m.NetworkBox, 0, 0, 1, 1, 0, 0, false) // Row 0: Network + rightGrid.AddItem(statusGrid, 1, 0, 1, 1, 0, 0, false) // Row 1: Status grid (ETH + Starknet) + rightGrid.AddItem(m.ChainInfoBox, 2, 0, 1, 1, 0, 0, false) // Row 2: Chain Info + rightGrid.AddItem(m.RPCInfoBox, 3, 0, 1, 1, 0, 0, false) // Row 3: RPC Info + rightGrid.AddItem(m.SystemStatsBox, 4, 0, 1, 1, 0, 0, false) // Row 4: System Stats + + // Add the right side sub-grid to main grid (spans all rows on right) + m.Grid.AddItem(rightGrid, 0, 1, activeLogPanels, 1, 0, 0, false) +} + +// updateLayoutDynamically periodically checks for running clients and updates the layout +func (m *MonitorApp) updateLayoutDynamically(ctx context.Context) { + ticker := time.NewTicker(5 * time.Second) // Check every 5 seconds + defer ticker.Stop() + + previousState := "" + + for { + select { + case <-ctx.Done(): + return + case <-m.StopChan: + return + case <-ticker.C: + if m.paused { + continue + } + + // Get current running clients + runningClients := utils.GetRunningClients() + + // Create a state signature based on running clients + currentState := "" + for _, client := range runningClients { + currentState += client.Name + "," + } + + // Only rebuild layout if the state has changed + if currentState != previousState { + m.App.QueueUpdateDraw(func() { + m.rebuildDynamicLayout() + }) + previousState = currentState + } + } + } +} diff --git a/pkg/monitoring/monitor.go b/pkg/monitoring/monitor.go index 72af68e..58866d9 100644 --- a/pkg/monitoring/monitor.go +++ b/pkg/monitoring/monitor.go @@ -22,6 +22,7 @@ func NewMonitorApp() *MonitorApp { ExecutionLogChan: make(chan string, 100), ConsensusLogChan: make(chan string, 100), JunoLogChan: make(chan string, 100), + ValidatorLogChan: make(chan string, 100), // New validator channel StatusChan: make(chan string, 10), JunoStatusChan: make(chan string, 10), NetworkChan: make(chan string, 10), @@ -113,17 +114,34 @@ func (m *MonitorApp) detectAndUpdateClientTitles() { } else { m.JunoLogBox.SetTitle(" Juno (Not Running) ❌ ") } + + // Check for Validator + var validatorClient *types.ClientStatus + for _, client := range runningClients { + if client.Name == "Validator" || client.Name == "StarknetValidator" { + validatorClient = &client + break + } + } + + if validatorClient != nil { + m.ValidatorLogBox.SetTitle(" Starknet Validator 🛡️ ") + } else { + m.ValidatorLogBox.SetTitle(" Validator (Not Running) ❌ ") + } } func (m *MonitorApp) Start(ctx context.Context) error { // Start new update goroutines matching JavaScript components exactly - go m.updateExecutionLogs(ctx) // executionLog.js equivalent - go m.updateConsensusLogs(ctx) // consensusLog.js equivalent - go m.updateJunoLogs(ctx) // junoLog.js equivalent (Starknet client) - go m.updateStatusBox(ctx) // statusBox.js equivalent - go m.updateChainInfoBox(ctx) // chainInfoBox.js equivalent - go m.updateSystemStatsGauge(ctx) // systemStatsGauge.js equivalent - go m.updateRPCInfo(ctx) // RPC info component + go m.updateExecutionLogs(ctx) // executionLog.js equivalent + go m.updateConsensusLogs(ctx) // consensusLog.js equivalent + go m.updateJunoLogs(ctx) // junoLog.js equivalent (Starknet client) + go m.updateValidatorLogs(ctx) // validatorLog.js equivalent (Starknet validator) + go m.updateStatusBox(ctx) // statusBox.js equivalent + go m.updateChainInfoBox(ctx) // chainInfoBox.js equivalent + go m.updateSystemStatsGauge(ctx) // systemStatsGauge.js equivalent + go m.updateRPCInfo(ctx) // RPC info component + go m.updateLayoutDynamically(ctx) // Dynamic layout updater // Removed: go m.updateBandwidthGauge(ctx) // Bandwidth component removed // Removed: go m.updatePeerCountGauge(ctx) // Peer count component removed @@ -164,6 +182,11 @@ func (m *MonitorApp) handleUpdates(ctx context.Context) { m.JunoLogBox.SetText(text) m.JunoLogBox.ScrollToEnd() }) + case text := <-m.ValidatorLogChan: + m.App.QueueUpdateDraw(func() { + m.ValidatorLogBox.SetText(text) + m.ValidatorLogBox.ScrollToEnd() + }) case text := <-m.StatusChan: m.App.QueueUpdateDraw(func() { m.StatusBox.SetText(text) diff --git a/pkg/monitoring/types.go b/pkg/monitoring/types.go index 3f12d3a..97310f2 100644 --- a/pkg/monitoring/types.go +++ b/pkg/monitoring/types.go @@ -14,6 +14,7 @@ type MonitorApp struct { ExecutionLogBox *tview.TextView ConsensusLogBox *tview.TextView JunoLogBox *tview.TextView + ValidatorLogBox *tview.TextView // New validator log panel StatusBox *tview.TextView NetworkBox *tview.TextView StarknetStatusBox *tview.TextView @@ -21,6 +22,7 @@ type MonitorApp struct { SystemStatsBox *tview.TextView RPCInfoBox *tview.TextView StatusBar *tview.TextView + NoClientsBox *tview.TextView // Message box when no clients are running // Legacy panels (for backward compatibility during transition) SystemBox *tview.TextView @@ -39,6 +41,7 @@ type MonitorApp struct { ExecutionLogChan chan string ConsensusLogChan chan string JunoLogChan chan string + ValidatorLogChan chan string // New validator log channel NetworkChan chan string StatusChan chan string JunoStatusChan chan string diff --git a/pkg/monitoring/ui.go b/pkg/monitoring/ui.go index 85d141a..6218534 100644 --- a/pkg/monitoring/ui.go +++ b/pkg/monitoring/ui.go @@ -41,6 +41,28 @@ func (m *MonitorApp) setupUI() { SetTitle(" Juno (Detecting...) 🌟 "). SetTitleAlign(tview.AlignLeft) + // Create Validator log panel + m.ValidatorLogBox = m.createVibrantPanel("Validator", tcell.ColorTeal) + m.ValidatorLogBox.SetBorder(true). + SetBorderColor(tcell.ColorTeal). + SetTitle(" Validator (Detecting...) 🛡️ "). + SetTitleAlign(tview.AlignLeft) + + // Create "No Clients Running" message box + m.NoClientsBox = m.createVibrantPanel("Status", tcell.ColorYellow) + m.NoClientsBox.SetBorder(true). + SetBorderColor(tcell.ColorYellow). + SetTitle(" System Status ⚠️ "). + SetTitleAlign(tview.AlignCenter) + m.NoClientsBox.SetText("\n\n[yellow]━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n" + + "[white] ⚠️ NO CLIENTS RUNNING ⚠️\n\n" + + "[dim]No Ethereum or Starknet clients are currently active.\n\n" + + "[yellow]To start clients, use:[white]\n" + + " • starknode-kit start\n" + + " • starknode-kit run\n\n" + + "[yellow]━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━[white]"). + SetTextAlign(tview.AlignCenter) + // Create status boxes m.StatusBox = m.createVibrantPanel("L1 Status", tcell.ColorTeal) m.StatusBox.SetText("INITIALIZING...") @@ -56,44 +78,8 @@ func (m *MonitorApp) setupUI() { m.SystemStatsBox = m.createVibrantPanel("System Stats", tcell.ColorTeal) m.RPCInfoBox = m.createVibrantPanel("RPC Info", tcell.ColorTeal) - // Setup main grid: LEFT (60%) for logs, RIGHT (40%) for info panels - m.Grid.SetRows(-1, -1, -1). // 3 rows for the 3 log panels - SetColumns(-3, -2). // LEFT(60%), RIGHT(40%) - SetBorders(false). - SetGap(0, 0) - - // LEFT SIDE - Add log panels directly to main grid - m.Grid.AddItem(m.ExecutionLogBox, 0, 0, 1, 1, 0, 0, false) // Row 0, left col - m.Grid.AddItem(m.ConsensusLogBox, 1, 0, 1, 1, 0, 0, false) // Row 1, left col - m.Grid.AddItem(m.JunoLogBox, 2, 0, 1, 1, 0, 0, false) // Row 2, left col - - // RIGHT SIDE - Create sub-grid for info panels (5 rows total) - rightGrid := tview.NewGrid(). - SetRows(-1, -1, -1, -1, -1). // 5 equal rows - SetColumns(-1). // Single column - SetBorders(false). - SetGap(0, 0) - - // Create status grid for ETH and Starknet status side by side - statusGrid := tview.NewGrid(). - SetRows(-1). // Single row - SetColumns(-1, -1). // 2 equal columns for ETH and Starknet - SetBorders(false). - SetGap(1, 0) // Small gap between status panels - - // Add ETH and Starknet status to the status grid - statusGrid.AddItem(m.StatusBox, 0, 0, 1, 1, 0, 0, false) // ETH Status (left) - statusGrid.AddItem(m.StarknetStatusBox, 0, 1, 1, 1, 0, 0, false) // Starknet Status (right) - - // Add all panels to the right side sub-grid - rightGrid.AddItem(m.NetworkBox, 0, 0, 1, 1, 0, 0, false) // Row 0: Network - rightGrid.AddItem(statusGrid, 1, 0, 1, 1, 0, 0, false) // Row 1: Status grid (ETH + Starknet) - rightGrid.AddItem(m.ChainInfoBox, 2, 0, 1, 1, 0, 0, false) // Row 2: Chain Info - rightGrid.AddItem(m.RPCInfoBox, 3, 0, 1, 1, 0, 0, false) // Row 3: RPC Info - rightGrid.AddItem(m.SystemStatsBox, 4, 0, 1, 1, 0, 0, false) // Row 4: System Stats - - // Add the right side sub-grid to main grid (spans all 3 rows on right) - m.Grid.AddItem(rightGrid, 0, 1, 3, 1, 0, 0, false) // Spans rows 0-2 on right column + // Initial setup with placeholder - will be rebuilt dynamically + m.rebuildDynamicLayout() // Enhanced input handling m.App.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { diff --git a/pkg/monitoring/updaters.go b/pkg/monitoring/updaters.go index 826f6fc..0b4a378 100644 --- a/pkg/monitoring/updaters.go +++ b/pkg/monitoring/updaters.go @@ -637,6 +637,168 @@ func (m *MonitorApp) updateJunoLogs(ctx context.Context) { } } +// updateValidatorLogs updates the validator client logs +func (m *MonitorApp) updateValidatorLogs(ctx context.Context) { + ticker := time.NewTicker(3 * time.Second) + defer ticker.Stop() + + // Placeholder validator logs (fallback when no real logs available) + validatorLogs := []string{ + "INFO [12-07|15:32:22.145] Validator initialized address=0x1234...5678", + "INFO [12-07|15:32:23.256] Connected to Juno RPC endpoint=http://localhost:6060", + "INFO [12-07|15:32:24.367] Validator account loaded public_key=0xabcd...ef01", + "INFO [12-07|15:32:25.478] Starting attestation service slot=1234567", + "INFO [12-07|15:32:26.589] Listening for new blocks height=650328", + "INFO [12-07|15:32:27.690] Block attestation submitted block=650329 status=pending", + "INFO [12-07|15:32:28.801] Attestation confirmed block=650329 tx_hash=0x7890...abcd", + "INFO [12-07|15:32:29.912] Validator balance updated balance=1000.50 STRK", + "INFO [12-07|15:32:31.023] New epoch started epoch=1234 validators=150", + "INFO [12-07|15:32:32.134] Proposer duty assigned slot=1234570 block=650330", + } + + var logBuffer []string + logIndex := 0 + var currentClientName string + + for { + select { + case <-ctx.Done(): + return + case <-m.StopChan: + return + case <-ticker.C: + if m.paused { + continue + } + + // Detect if Validator client is running + runningClients := utils.GetRunningClients() + var validatorClient *types.ClientStatus + + for _, client := range runningClients { + if client.Name == "Validator" || client.Name == "StarknetValidator" { + validatorClient = &client + break + } + } + + // Update panel title and logs based on detected client + if validatorClient != nil { + if currentClientName != validatorClient.Name { + // Client changed, reset everything + currentClientName = validatorClient.Name + logIndex = 0 + logBuffer = []string{} + + // Update panel title to show it's running + m.App.QueueUpdateDraw(func() { + m.ValidatorLogBox.SetTitle(" Starknet Validator 🛡️ (Running) ") + }) + } + + // Try to get real logs first from Validator log directory + realLogs := GetLatestLogs("starknet-staking-v2", 10) + if len(realLogs) > 0 && realLogs[0] != "No log files found for starknet-staking-v2" { + // Use real logs from Validator client + var formattedRealLogs []string + for _, logLine := range realLogs { + if strings.TrimSpace(logLine) != "" { + formattedLine := formatLogLines(logLine) + formattedRealLogs = append(formattedRealLogs, formattedLine) + } + } + + content := strings.Join(formattedRealLogs, "\n") + select { + case m.ValidatorLogChan <- content: + default: + // Channel full, skip update + } + } else { + // Fall back to simulated logs if real logs aren't available + if logIndex < len(validatorLogs) { + currentEntry := validatorLogs[logIndex] + + // Dynamic updates for realistic logs + if strings.Contains(currentEntry, "block=") { + // Update block numbers progressively + baseBlock := 650328 + currentBlock := baseBlock + int(time.Now().Unix()%100) + currentEntry = strings.ReplaceAll(currentEntry, "650328", fmt.Sprintf("%d", currentBlock)) + currentEntry = strings.ReplaceAll(currentEntry, "650329", fmt.Sprintf("%d", currentBlock+1)) + currentEntry = strings.ReplaceAll(currentEntry, "650330", fmt.Sprintf("%d", currentBlock+2)) + } + + // Update slot numbers progressively + if strings.Contains(currentEntry, "slot=") { + baseSlot := 1234567 + currentSlot := baseSlot + int(time.Now().Unix()%1000) + currentEntry = strings.ReplaceAll(currentEntry, "1234567", fmt.Sprintf("%d", currentSlot)) + currentEntry = strings.ReplaceAll(currentEntry, "1234570", fmt.Sprintf("%d", currentSlot+3)) + } + + // Update epoch numbers + if strings.Contains(currentEntry, "epoch=") { + baseEpoch := 1234 + currentEpoch := baseEpoch + int(time.Now().Unix()/86400) // Changes daily + currentEntry = strings.ReplaceAll(currentEntry, "1234", fmt.Sprintf("%d", currentEpoch)) + } + + // Update timestamps to current time + if strings.Contains(currentEntry, "15:32:") { + now := time.Now() + timeStr := now.Format("15:04:05") + // Replace the timestamp part + parts := strings.Split(currentEntry, "] ") + if len(parts) >= 2 { + parts[0] = fmt.Sprintf("INFO [12-07|%s.%03d", timeStr, now.Nanosecond()/1000000) + currentEntry = strings.Join(parts, "] ") + } + } + + // Format the log line + formattedLine := formatLogLines(currentEntry) + + // Add to buffer + logBuffer = append(logBuffer, formattedLine) + + // Keep buffer size manageable + if len(logBuffer) > 50 { + logBuffer = logBuffer[len(logBuffer)-45:] + } + + // Send to Validator log channel + content := strings.Join(logBuffer, "\n") + select { + case m.ValidatorLogChan <- content: + default: + // Channel full, skip update + } + + logIndex++ + } else { + // Reset to beginning for continuous simulation + logIndex = 0 + } + } + } else { + // No Validator client running + if currentClientName != "None" { + currentClientName = "None" + m.App.QueueUpdateDraw(func() { + m.ValidatorLogBox.SetTitle(" Validator (Not Running) ❌ ") + }) + + select { + case m.ValidatorLogChan <- "[red]No Validator client detected.[white]\n[yellow]Start Starknet Validator to see live logs.[white]": + default: + } + } + } + } + } +} + // Legacy update methods for backward compatibility func (m *MonitorApp) updateSystemStats(ctx context.Context) { diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 720f476..d03c02f 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -198,6 +198,18 @@ func GetRunningClients() []types.ClientStatus { clients = append(clients, status) } + // Check for Starknet Validator + if validatorInfo := process.GetProcessInfo("starknet-staking-v2"); validatorInfo != nil { + status := types.ClientStatus{ + Name: "Validator", + Status: validatorInfo.Status, + PID: validatorInfo.PID, + Uptime: validatorInfo.Uptime, + Version: versions.GetVersionNumber("starknet-staking-v2"), + } + clients = append(clients, status) + } + return clients } From 7d551673ed029d00eac5a346f208e8eadd4cc052 Mon Sep 17 00:00:00 2001 From: emperorsixpacks Date: Tue, 7 Oct 2025 12:48:11 +0100 Subject: [PATCH 08/18] fix: client tests --- pkg/clients/client_test.go | 248 ++++++++++++++++++ pkg/clients/geth_test.go | 174 ------------- pkg/clients/juno_test.go | 510 ------------------------------------- pkg/clients/reth_test.go | 112 -------- pkg/installer_test.go | 283 -------------------- 5 files changed, 248 insertions(+), 1079 deletions(-) create mode 100644 pkg/clients/client_test.go delete mode 100644 pkg/clients/geth_test.go delete mode 100644 pkg/clients/juno_test.go delete mode 100644 pkg/clients/reth_test.go delete mode 100644 pkg/installer_test.go diff --git a/pkg/clients/client_test.go b/pkg/clients/client_test.go new file mode 100644 index 0000000..bf9b63d --- /dev/null +++ b/pkg/clients/client_test.go @@ -0,0 +1,248 @@ +package clients + +import ( + "path/filepath" + "testing" + + "github.com/thebuidl-grid/starknode-kit/pkg/constants" + "github.com/thebuidl-grid/starknode-kit/pkg/types" +) + +func TestGethClient(t *testing.T) { + config := &gethConfig{ + port: 30303, + executionType: "full", + network: "mainnet", + } + + args := config.buildArgs() + + expectedArgs := []string{ + "--mainnet", + "--port=30303", + "--discovery.port=30303", + "--http", + "--http.api=eth,net,engine,admin", + "--http.corsdomain=*", + "--http.addr=0.0.0.0", + "--http.port=8545", + "--authrpc.jwtsecret=" + constants.JWTPath, + "--authrpc.addr=0.0.0.0", + "--authrpc.port=8551", + "--authrpc.vhosts=*", + "--metrics", + "--metrics.addr=0.0.0.0", + "--metrics.port=7878", + "--syncmode=snap", + "--datadir=" + filepath.Join(constants.InstallClientsDir, "geth", "database"), + } + + if len(args) != len(expectedArgs) { + t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) + } + + for i, expected := range expectedArgs { + if args[i] != expected { + t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) + } + } + + +} + +func TestRethClient(t *testing.T) { + config := &rethConfig{ + port: 30303, + executionType: "full", + network: "mainnet", + } + + args := config.buildArgs() + + expectedArgs := []string{ + "node", + "--chain", "mainnet", + "--http", + "--http.addr", "0.0.0.0", + "--http.port", "8545", + "--http.api", "eth,net,admin", + "--http.corsdomain", "*", + "--authrpc.addr", "0.0.0.0", + "--authrpc.port", "8551", + "--authrpc.jwtsecret", constants.JWTPath, + "--port", "30303", + "--metrics", "0.0.0.0:7878", + "--datadir", filepath.Join(constants.InstallClientsDir, "reth", "database"), + } + + if len(args) != len(expectedArgs) { + t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) + } + + for i, expected := range expectedArgs { + if args[i] != expected { + t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) + } + } + + +} + +func TestLighthouseClient(t *testing.T) { + config := &lightHouseConfig{ + port: []int{9000, 9001}, + consensusCheckpoint: "https://checkpoint.sync", + network: "mainnet", + } + + args := config.buildArgs() + + expectedArgs := []string{ + "bn", + "--network", + "mainnet", + "--port=9000", + "--quic-port=9001", + "--execution-endpoint", + "http://localhost:8551", + "--checkpoint-sync-url", + "https://checkpoint.sync", + "--checkpoint-sync-url-timeout", + "1200", + "--disable-deposit-contract-sync", + "--execution-jwt", + constants.JWTPath, + "--metrics", + "--metrics-address", + "127.0.0.1", + "--metrics-port", + "5054", + "--http", + "--disable-upnp", + "--datadir=" + filepath.Join(constants.InstallClientsDir, "lighthouse", "database"), + } + + if len(args) != len(expectedArgs) { + t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) + } + + for i, expected := range expectedArgs { + if args[i] != expected { + t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) + } + } + + +} + +func TestPrysmClient(t *testing.T) { + config := &prysmConfig{ + port: []int{9000, 9001}, + consensusCheckpoint: "https://checkpoint.sync", + network: "mainnet", + } + + args := config.buildArgs() + + expectedArgs := []string{ + "beacon-chain", + "--mainnet", + "--p2p-udp-port=9001", + "--p2p-quic-port=9000", + "--p2p-tcp-port=9000", + "--execution-endpoint", + "http://localhost:8551", + "--grpc-gateway-host=0.0.0.0", + "--grpc-gateway-port=5052", + "--checkpoint-sync-url=https://checkpoint.sync", + "--genesis-beacon-api-url=https://checkpoint.sync", + "--accept-terms-of-use=true", + "--jwt-secret", + constants.JWTPath, + "--monitoring-host", + "127.0.0.1", + "--monitoring-port", + "5054", + "--datadir=" + filepath.Join(constants.InstallClientsDir, "prsym", "database"), + } + + if len(args) != len(expectedArgs) { + t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) + } + + for i, expected := range expectedArgs { + if args[i] != expected { + t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) + } + } + + +} + +func TestJunoClient(t *testing.T) { + config := types.JunoConfig{ + Port: 6060, + EthNode: "ws://localhost:8546", + } + + client := &JunoClient{config: config, network: "mainnet"} + args := client.buildJunoArgs() + + expectedArgs := []string{ + "--http", + "--http-port=6060", + "--http-host=0.0.0.0", + "--db-path=" + filepath.Join(constants.InstallStarknetDir, "juno", "database"), + "--eth-node=ws://localhost:8546", + "--ws=false", + "--ws-port=6061", + "--ws-host=0.0.0.0", + "--network=mainnet", + } + + if len(args) != len(expectedArgs) { + t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) + } + + for i, expected := range expectedArgs { + if args[i] != expected { + t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) + } + } + + +} + +func TestStarknetValidatorClient(t *testing.T) { + config := &StakingValidator{ + Provider: stakingValidatorProviderConfig{ + starknetHttp: "http://localhost:6060", + starkentWS: "ws://localhost:6061", + }, + Wallet: stakingValidatorWalletConfig{ + address: "0x123", + privatekey: "0x456", + }, + } + + args := config.buildArgs() + + expectedArgs := []string{ + "--provider-http", "http://localhost:6060", + "--provider-ws", "ws://localhost:6061", + "--signer-op-address", "0x123", + "--signer-priv-key", "0x456", + } + + if len(args) != len(expectedArgs) { + t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) + } + + for i, expected := range expectedArgs { + if args[i] != expected { + t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) + } + } + + +} diff --git a/pkg/clients/geth_test.go b/pkg/clients/geth_test.go deleted file mode 100644 index 4be3c32..0000000 --- a/pkg/clients/geth_test.go +++ /dev/null @@ -1,174 +0,0 @@ -package clients - -import ( - "runtime" - "strings" - "testing" -) - -// Mock configuration for testing -func createTestGethConfig() *gethConfig { - return &gethConfig{ - port: 30303, - executionType: "full", - } -} - -func TestGethConfig_Creation(t *testing.T) { - config := createTestGethConfig() - - if config.executionType != "full" { - t.Errorf("executionType = %v, want %v", config.executionType, "full") - } - - if config.port != 30303 { - t.Errorf("port = %v, want %v", config.port, 30303) - } - -} - -func TestGetGethCommand(t *testing.T) { - t.Run("current platform", func(t *testing.T) { - geth := gethConfig{ - port: 30303, - executionType: "full", - } - result := geth.getCommand() - - if runtime.GOOS == "windows" { - expectedSuffix := "geth.exe" - if !strings.HasSuffix(result, expectedSuffix) { - t.Errorf("On Windows, command should end with %s, got %s", expectedSuffix, result) - } - } else { - expectedSuffix := "geth" - if !strings.HasSuffix(result, expectedSuffix) && !strings.HasSuffix(result, "geth.exe") { - t.Errorf("On non-Windows, command should end with geth, got %s", result) - } - } - - // Check that the path contains the expected directory structure - expectedParts := []string{"geth"} - for _, part := range expectedParts { - if !strings.Contains(result, part) { - t.Errorf("Command should contain %s, got %s", part, result) - } - } - }) -} - -func TestStartGeth_Parameters(t *testing.T) { - t.Run("parameter validation", func(t *testing.T) { - // Test that StartGeth accepts the correct parameters - - // We can't actually start geth in tests, but we can verify the function signature - // and basic parameter handling by checking it doesn't panic with valid inputs - geth := gethConfig{ - port: 30303, - executionType: "full", - } - err := geth.Start() - - // We expect this to fail since geth binary likely doesn't exist in test environment - // but it shouldn't panic and should return an error - if err == nil { - t.Log("StartGeth succeeded (geth binary must be present)") - } else { - t.Logf("StartGeth failed as expected in test environment: %v", err) - } - }) - - t.Run("different execution types", func(t *testing.T) { - executionTypes := []string{"full", "archive"} - - for _, execType := range executionTypes { - geth := gethConfig{ - port: 30303, - executionType: execType, - } - err := geth.Start() - // Again, we expect this to fail in test environment, but shouldn't panic - if err != nil { - t.Logf("StartGeth with type %s failed as expected: %v", execType, err) - } - } - }) - - t.Run("different ports", func(t *testing.T) { - testPorts := []int{30303, 30304, 31313} - - for _, port := range testPorts { - geth := gethConfig{ - port: port, - executionType: "full", - } - err := geth.Start() - // Expected to fail in test environment - if err != nil { - t.Logf("StartGeth with ports %v failed as expected: %v", port, err) - } - } - }) -} - -func TestGethConfig_Validation(t *testing.T) { - t.Run("valid config", func(t *testing.T) { - config := createTestGethConfig() - - if config.executionType == "" { - t.Error("executionType should not be empty") - } - - if config.port <= 0 { - t.Error("port should be positive") - } - - }) - - t.Run("execution types", func(t *testing.T) { - validTypes := []string{"full", "archive"} - - for _, execType := range validTypes { - config := createTestGethConfig() - config.executionType = execType - - // Verify the config accepts valid execution types - if config.executionType != execType { - t.Errorf("Failed to set executionType to %s", execType) - } - } - }) - - t.Run("port ranges", func(t *testing.T) { - config := createTestGethConfig() - - // Test various port values - testPorts := []int{1024, 30303, 30304, 65535} - - for _, port := range testPorts { - config.port = port - if config.port != port { - t.Errorf("Failed to set port to %d", port) - } - } - }) -} - -// Benchmark tests -func BenchmarkGetGethCommand(b *testing.B) { - b.ResetTimer() - for i := 0; i < b.N; i++ { - geth := gethConfig{ - port: 30303, - executionType: "full", - } - geth.getCommand() - } -} - -func BenchmarkGethConfigCreation(b *testing.B) { - b.ResetTimer() - for i := 0; i < b.N; i++ { - createTestGethConfig() - } -} diff --git a/pkg/clients/juno_test.go b/pkg/clients/juno_test.go deleted file mode 100644 index b19783a..0000000 --- a/pkg/clients/juno_test.go +++ /dev/null @@ -1,510 +0,0 @@ -package clients - -import ( - "context" - "os" - "path/filepath" - "strings" - "testing" - "time" - - "github.com/thebuidl-grid/starknode-kit/pkg/constants" -) - -func TestDefaultJunoConfig(t *testing.T) { - config := DefaultJunoConfig() - - // Test default values - if config.Network != "mainnet" { - t.Errorf("Expected Network to be 'mainnet', got '%s'", config.Network) - } - - if config.Port != "6060" { - t.Errorf("Expected Port to be '6060', got '%s'", config.Port) - } - - if !config.UseSnapshot { - t.Error("Expected UseSnapshot to be true") - } - - if config.DataDir != "./juno-data" { - t.Errorf("Expected DataDir to be './juno-data', got '%s'", config.DataDir) - } - - if config.EthNode != "ws://localhost:8546" { - t.Errorf("Expected EthNode to be 'ws://localhost:8546', got '%s'", config.EthNode) - } - - // Test environment variables - expectedEnv := []string{ - "JUNO_NETWORK=mainnet", - "JUNO_HTTP_PORT=6060", - "JUNO_HTTP_HOST=0.0.0.0", - } - - if len(config.Environment) != len(expectedEnv) { - t.Errorf("Expected %d environment variables, got %d", len(expectedEnv), len(config.Environment)) - } - - for i, expected := range expectedEnv { - if config.Environment[i] != expected { - t.Errorf("Expected environment variable %d to be '%s', got '%s'", i, expected, config.Environment[i]) - } - } -} - -func TestNewJunoClient(t *testing.T) { - // Mock the presence of the Juno binary - tempDir := t.TempDir() - junoDir := filepath.Join(tempDir, "juno") - if err := os.MkdirAll(junoDir, 0755); err != nil { - t.Fatalf("Failed to create juno dir: %v", err) - } - junoPath := filepath.Join(junoDir, "juno") - if err := os.WriteFile(junoPath, []byte("#!/bin/sh\necho 'juno version 0.14.6'\n"), 0755); err != nil { - t.Fatalf("Failed to create dummy juno binary: %v", err) - } - // Save and override InstallClientsDir - origInstallClientsDir := constants.InstallClientsDir - constants.InstallClientsDir = tempDir - defer func() { constants.InstallClientsDir = origInstallClientsDir }() - - // Test with nil config - client, err := NewJunoClient(nil) - if err != nil { - t.Errorf("Expected no error when config is nil, got: %v", err) - } - if client == nil { - t.Error("Expected client to be created when config is nil") - } - - // Test with custom config - customConfig := &JunoConfig{ - Network: "sepolia", - Port: "6061", - UseSnapshot: false, - DataDir: "/custom/path", - EthNode: "ws://custom:8546", - Environment: []string{"CUSTOM_VAR=value"}, - } - - client, err = NewJunoClient(customConfig) - if err != nil { - t.Errorf("Expected no error with custom config, got: %v", err) - } - if client == nil { - t.Error("Expected client to be created with custom config") - } - - if client.config.Network != "sepolia" { - t.Errorf("Expected Network to be 'sepolia', got '%s'", client.config.Network) - } - - if client.config.Port != "6061" { - t.Errorf("Expected Port to be '6061', got '%s'", client.config.Port) - } - - if client.config.UseSnapshot { - t.Error("Expected UseSnapshot to be false") - } - - if client.config.DataDir != "/custom/path" { - t.Errorf("Expected DataDir to be '/custom/path', got '%s'", client.config.DataDir) - } - - if client.config.EthNode != "ws://custom:8546" { - t.Errorf("Expected EthNode to be 'ws://custom:8546', got '%s'", client.config.EthNode) - } -} - -func TestGetJunoPath(t *testing.T) { - // Test when Juno is not installed - path := getJunoPath() - if path != "" { - t.Errorf("Expected empty path when Juno is not installed, got '%s'", path) - } -} - -func TestBuildJunoArgs(t *testing.T) { - config := &JunoConfig{ - Network: "mainnet", - Port: "6060", - UseSnapshot: true, - DataDir: "/test/data", - EthNode: "ws://localhost:8546", - } - - client := &JunoClient{config: config} - args := client.buildJunoArgs() - - // Test required arguments - expectedArgs := []string{ - "--http", - "--http-port=6060", - "--http-host=0.0.0.0", - "--db-path=/test/data", - "--eth-node=ws://localhost:8546", - "--network=mainnet", - "--snapshot", - "--metrics", - "--metrics-port=6060", - } - - if len(args) != len(expectedArgs) { - t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) - } - - for i, expected := range expectedArgs { - if args[i] != expected { - t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) - } - } -} - -func TestBuildJunoArgsSepolia(t *testing.T) { - config := &JunoConfig{ - Network: "sepolia", - Port: "6061", - UseSnapshot: false, - DataDir: "/test/sepolia", - EthNode: "ws://sepolia:8546", - } - - client := &JunoClient{config: config} - args := client.buildJunoArgs() - - // Test sepolia network arguments - expectedArgs := []string{ - "--http", - "--http-port=6061", - "--http-host=0.0.0.0", - "--db-path=/test/sepolia", - "--eth-node=ws://sepolia:8546", - "--network=sepolia", - "--metrics", - "--metrics-port=6060", - } - - if len(args) != len(expectedArgs) { - t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) - } - - for i, expected := range expectedArgs { - if args[i] != expected { - t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) - } - } -} - -func TestBuildJunoArgsSepoliaIntegration(t *testing.T) { - config := &JunoConfig{ - Network: "sepolia-integration", - Port: "6062", - UseSnapshot: true, - DataDir: "/test/sepolia-integration", - EthNode: "ws://sepolia-integration:8546", - } - - client := &JunoClient{config: config} - args := client.buildJunoArgs() - - // Test sepolia-integration network arguments - expectedArgs := []string{ - "--http", - "--http-port=6062", - "--http-host=0.0.0.0", - "--db-path=/test/sepolia-integration", - "--eth-node=ws://sepolia-integration:8546", - "--network=sepolia-integration", - "--snapshot", - "--metrics", - "--metrics-port=6060", - } - - if len(args) != len(expectedArgs) { - t.Errorf("Expected %d arguments, got %d", len(expectedArgs), len(args)) - } - - for i, expected := range expectedArgs { - if args[i] != expected { - t.Errorf("Expected argument %d to be '%s', got '%s'", i, expected, args[i]) - } - } -} - -func TestJunoClientStartNode(t *testing.T) { - // Create temporary directory for test - tempDir := t.TempDir() - - config := &JunoConfig{ - Network: "mainnet", - Port: "6060", - UseSnapshot: true, - DataDir: tempDir, - EthNode: "ws://localhost:8546", - } - - client := &JunoClient{config: config} - - // Mock the junoPath to avoid actual binary execution - client.junoPath = "echo" // Use echo as a mock command - - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) - defer cancel() - - // The dummy binary (echo) will start successfully, so we do not expect an error - err := client.StartNode(ctx) - if err != nil { - t.Errorf("Expected no error when starting with dummy binary, got: %v", err) - } - - // Test that directories were created - if _, err := os.Stat(tempDir); os.IsNotExist(err) { - t.Error("Expected data directory to be created") - } - - logsDir := filepath.Join(filepath.Dir(tempDir), "logs") - if _, err := os.Stat(logsDir); os.IsNotExist(err) { - t.Error("Expected logs directory to be created") - } -} - -func TestJunoClientStopNode(t *testing.T) { - client := &JunoClient{} - - // Test stopping when no process is running - _ = client.StopNode(context.Background()) // Should not panic - - // Test with mock process - client.process = &os.Process{Pid: 99999} // Non-existent PID - _ = client.StopNode(context.Background()) // Should not panic -} - -func TestJunoClientGetNodeStatus(t *testing.T) { - client := &JunoClient{} - - // Test when no process is running - status, err := client.GetNodeStatus(context.Background()) - if err != nil { - t.Errorf("Expected no error when getting status of non-existent process, got: %v", err) - } - if status != "not running" { - t.Errorf("Expected status 'not running', got '%s'", status) - } - - // Test with mock process - client.process = &os.Process{Pid: 99999} // Non-existent PID - status, err = client.GetNodeStatus(context.Background()) - if err != nil { - t.Errorf("Expected no error when getting status of invalid process, got: %v", err) - } - if status != "stopped" { - t.Errorf("Expected status 'stopped', got '%s'", status) - } -} - -func TestJunoClientClose(t *testing.T) { - client := &JunoClient{} - - // Test closing when no log file is open - err := client.Close() - if err != nil { - t.Errorf("Expected no error when closing without log file, got: %v", err) - } - - // Test closing with log file - tempFile, err := os.CreateTemp("", "juno_test") - if err != nil { - t.Fatalf("Failed to create temp file: %v", err) - } - defer os.Remove(tempFile.Name()) - - client.logFile = tempFile - err = client.Close() - if err != nil { - t.Errorf("Expected no error when closing with log file, got: %v", err) - } -} - -func TestJunoConfigValidation(t *testing.T) { - tests := []struct { - name string - config *JunoConfig - wantErr bool - }{ - { - name: "valid mainnet config", - config: &JunoConfig{ - Network: "mainnet", - Port: "6060", - UseSnapshot: true, - DataDir: "/test/data", - EthNode: "ws://localhost:8546", - }, - wantErr: false, - }, - { - name: "valid sepolia config", - config: &JunoConfig{ - Network: "sepolia", - Port: "6061", - UseSnapshot: false, - DataDir: "/test/sepolia", - EthNode: "ws://sepolia:8546", - }, - wantErr: false, - }, - { - name: "valid sepolia-integration config", - config: &JunoConfig{ - Network: "sepolia-integration", - Port: "6062", - UseSnapshot: true, - DataDir: "/test/sepolia-integration", - EthNode: "ws://sepolia-integration:8546", - }, - wantErr: false, - }, - { - name: "invalid network", - config: &JunoConfig{ - Network: "invalid", - Port: "6060", - UseSnapshot: true, - DataDir: "/test/data", - EthNode: "ws://localhost:8546", - }, - wantErr: false, // We don't validate network in buildJunoArgs - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - client := &JunoClient{config: tt.config} - args := client.buildJunoArgs() - - // Check that required arguments are present - requiredArgs := []string{ - "--http", - "--http-host=0.0.0.0", - "--metrics", - "--metrics-port=6060", - } - - for _, required := range requiredArgs { - found := false - for _, arg := range args { - if arg == required { - found = true - break - } - } - if !found { - t.Errorf("Required argument '%s' not found in args", required) - } - } - - // Check that eth-node is present (substring match) - ethNodeFound := false - for _, arg := range args { - if strings.Contains(arg, "--eth-node=") { - ethNodeFound = true - break - } - } - if !ethNodeFound { - t.Error("--eth-node argument not found in args") - } - }) - } -} - -func TestJunoClientIntegration(t *testing.T) { - if testing.Short() { - t.Skip("Skipping integration test in short mode") - } - - // Create temporary directory for test - tempDir := t.TempDir() - - config := &JunoConfig{ - Network: "mainnet", - Port: "6060", - UseSnapshot: true, - DataDir: tempDir, - EthNode: "ws://localhost:8546", - } - - client := &JunoClient{config: config} - - // Test that client can be created - if client == nil { - t.Fatal("Failed to create Juno client") - } - - // Test that config is properly set - if client.config.Network != "mainnet" { - t.Errorf("Expected Network to be 'mainnet', got '%s'", client.config.Network) - } - - // Test that arguments can be built - args := client.buildJunoArgs() - if len(args) == 0 { - t.Error("Expected non-empty arguments list") - } - - // Test that required arguments are present - hasHttp := false - hasEthNode := false - for _, arg := range args { - if arg == "--http" { - hasHttp = true - } - if strings.Contains(arg, "--eth-node=") { - hasEthNode = true - } - } - - if !hasHttp { - t.Error("Expected --http argument to be present") - } - if !hasEthNode { - t.Error("Expected --eth-node argument to be present") - } -} - -// Benchmark tests -func BenchmarkBuildJunoArgs(b *testing.B) { - config := &JunoConfig{ - Network: "mainnet", - Port: "6060", - UseSnapshot: true, - DataDir: "/test/data", - EthNode: "ws://localhost:8546", - } - - client := &JunoClient{config: config} - - b.ResetTimer() - for i := 0; i < b.N; i++ { - client.buildJunoArgs() - } -} - -func BenchmarkNewJunoClient(b *testing.B) { - config := &JunoConfig{ - Network: "mainnet", - Port: "6060", - UseSnapshot: true, - DataDir: "/test/data", - EthNode: "ws://localhost:8546", - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - _, err := NewJunoClient(config) - if err != nil { - b.Fatalf("Failed to create client: %v", err) - } - } -} diff --git a/pkg/clients/reth_test.go b/pkg/clients/reth_test.go deleted file mode 100644 index 0a2bacd..0000000 --- a/pkg/clients/reth_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package clients - -import ( - "runtime" - "strings" - "testing" -) - -// Mock configuration for testing -func createTestRethConfig() *rethConfig { - return &rethConfig{ - executionType: "full", - port: 30303, - } -} - -func TestRethConfig_Creation(t *testing.T) { - config := createTestRethConfig() - - if config.executionType != "full" { - t.Errorf("executionType = %v, want %v", config.executionType, "full") - } - - if config.port != 30303 { - t.Errorf("port = %v, want %v", config.port, 30303) - } -} - -func TestGetRethCommand(t *testing.T) { - t.Run("current platform", func(t *testing.T) { - config := createTestRethConfig() - result := config.getCommand() - - if runtime.GOOS == "windows" { - if !strings.HasSuffix(result, "reth.exe") { - t.Errorf("On Windows, command should end with reth.exe, got %s", result) - } - } else { - if !strings.HasSuffix(result, "reth") { - t.Errorf("On non-Windows, command should end with reth, got %s", result) - } - } - - if !strings.Contains(result, "reth") { - t.Errorf("Command should contain 'reth', got %s", result) - } - }) -} - -func TestBuildRethArgs(t *testing.T) { - tests := []struct { - name string - config *rethConfig - expected string // partial string match for simplicity - }{ - { - name: "full sync mode", - config: &rethConfig{ - executionType: "full", - port: 30303, - }, - expected: "--port 30303", - }, - { - name: "archive mode", - config: &rethConfig{ - executionType: "archive", - port: 30304, - }, - expected: "--archive", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - args := tt.config.buildArgs() - argsStr := strings.Join(args, " ") - - if !strings.Contains(argsStr, tt.expected) { - t.Errorf("Expected args to contain %s, got %s", tt.expected, argsStr) - } - - if tt.config.executionType == "archive" && !strings.Contains(argsStr, "--archive") { - t.Error("Expected --archive flag for archive mode") - } - }) - } -} - -func TestStartReth_DoesNotPanic(t *testing.T) { - t.Run("start simulation", func(t *testing.T) { - config := createTestRethConfig() - err := config.Start() - if err != nil { - t.Logf("Start failed as expected (e.g., binary/log path may be missing): %v", err) - } - }) -} - -func BenchmarkBuildRethArgs(b *testing.B) { - config := createTestRethConfig() - for i := 0; i < b.N; i++ { - config.buildArgs() - } -} - -func BenchmarkGetRethCommand(b *testing.B) { - config := createTestRethConfig() - for i := 0; i < b.N; i++ { - config.getCommand() - } -} diff --git a/pkg/installer_test.go b/pkg/installer_test.go deleted file mode 100644 index 97ee2af..0000000 --- a/pkg/installer_test.go +++ /dev/null @@ -1,283 +0,0 @@ -package pkg - -import ( - "fmt" - "os" - "os/exec" - "strings" - "testing" - - "github.com/thebuidl-grid/starknode-kit/pkg/types" - "github.com/thebuidl-grid/starknode-kit/pkg/versions" -) - -func TestCompareClientVersions(t *testing.T) { - installed := "1.2.3" - - // We're testing the reth client which has a hardcoded LatestRethVersion - expectedVersion := versions.LatestRethVersion - - isLatest := CompareClientVersions("reth", installed, expectedVersion) - if compareVersions(installed, expectedVersion) >= 0 && !isLatest { - t.Errorf("Expected latest, got not latest") - } - if compareVersions(installed, expectedVersion) < 0 && isLatest { - t.Errorf("Expected not latest, got latest") - } -} - -// -------------------- exec.Command Mocking -------------------- - -func fakeExecCommand(command string, args ...string) *exec.Cmd { - cs := []string{"-test.run=TestHelperProcess", "--", command} - cs = append(cs, args...) - cmd := exec.Command(os.Args[0], cs...) - cmd.Env = append(os.Environ(), "GO_WANT_HELPER_PROCESS=1") - return cmd -} - -// Test helper function that simulates binary output -func TestHelperProcess(t *testing.T) { - if os.Getenv("GO_WANT_HELPER_PROCESS") != "1" { - return - } - - args := os.Args - if len(args) > 3 { - if strings.Contains(args[3], "reth") { - fmt.Fprint(os.Stdout, "reth Version: 1.2.3") - } else if strings.Contains(args[3], "lighthouse") { - fmt.Fprint(os.Stdout, "Lighthouse v2.3.4") - } else if strings.Contains(args[3], "geth") { - fmt.Fprint(os.Stdout, "geth version 3.4.5") - } else if strings.Contains(args[3], "prysm") { - fmt.Fprint(os.Stdout, "beacon-chain-v4.5.6-commit") - } - } - - os.Exit(0) -} - -func TestGetVersionNumber(t *testing.T) { - // Override execCommand with our mock - execCommand = fakeExecCommand - defer func() { execCommand = exec.Command }() - - // Note: InstallClientsDir is used by GetVersionNumber internally - - tests := []struct { - client string - expected string - }{ - {"reth", "1.2.3"}, - {"lighthouse", "2.3.4"}, - {"geth", "3.4.5"}, - {"prysm", "4.5.6"}, - } - - for _, tt := range tests { - t.Run(tt.client, func(t *testing.T) { - version := versions.GetVersionNumber(tt.client) - if version != tt.expected { - t.Errorf("expected %s, got %s", tt.expected, version) - } - }) - } -} - -func TestGetClientFileName(t *testing.T) { - installer := NewInstaller() - - tests := []struct { - client types.ClientType - version string - wantErr bool - }{ - {types.ClientGeth, "1.15.10", false}, - {types.ClientReth, "1.3.4", false}, - {types.ClientLighthouse, "7.0.1", false}, - {types.ClientPrysm, "4.5.6", false}, - {types.ClientJuno, "0.11.7", false}, - {"unknown", "1.0.0", true}, - } - - for _, tt := range tests { - t.Run(string(tt.client), func(t *testing.T) { - fileName, err := installer.getClientFileName(tt.client, tt.version) - if (err != nil) != tt.wantErr { - t.Errorf("GetClientFileName() error = %v, wantErr %v", err, tt.wantErr) - return - } - - if !tt.wantErr && fileName == "" { - t.Errorf("GetClientFileName() returned empty filename") - } - }) - } -} - -func TestGetDownloadURL(t *testing.T) { - installer := NewInstaller() - - tests := []struct { - client types.ClientType - fileName string - version string - wantErr bool - }{ - {types.ClientGeth, "geth-linux-amd64-1.15.10-2bf8a789", "1.15.10", false}, - {types.ClientReth, "reth-v1.3.4-x86_64-unknown-linux-gnu", "1.3.4", false}, - {types.ClientLighthouse, "lighthouse-v7.0.1-x86_64-unknown-linux-gnu", "7.0.1", false}, - {types.ClientPrysm, "prysm.sh", "4.5.6", false}, - {types.ClientJuno, "juno-" + versions.LatestJunoVersion, versions.LatestJunoVersion, false}, - {"unknown", "unknown", "1.0.0", true}, - } - - for _, tt := range tests { - t.Run(string(tt.client), func(t *testing.T) { - url, err := installer.getDownloadURL(tt.client, tt.fileName, tt.version) - if (err != nil) != tt.wantErr { - t.Errorf("getDownloadURL() error = %v, wantErr %v", err, tt.wantErr) - return - } - - if !tt.wantErr && url == "" { - t.Errorf("getDownloadURL() returned empty url") - } - }) - } -} - -func TestNewInstaller(t *testing.T) { - installer := NewInstaller() - - // Since installer is a struct, it cannot be nil - // We can test that it has the expected InstallDir set - if installer.InstallDir == "" { - t.Error("NewInstaller() returned installer with empty InstallDir") - } -} - -func TestCompareVersions(t *testing.T) { - tests := []struct { - v1 string - v2 string - expected int - }{ - {"1.2.3", "1.2.3", 0}, - {"1.2.3", "1.2.4", -1}, - {"1.2.4", "1.2.3", 1}, - {"1.3.0", "1.2.9", 1}, - {"2.0.0", "1.9.9", 1}, - {"1.10.0", "1.9.0", 1}, - } - - for _, tt := range tests { - t.Run(fmt.Sprintf("%s_vs_%s", tt.v1, tt.v2), func(t *testing.T) { - result := compareVersions(tt.v1, tt.v2) - if result != tt.expected { - t.Errorf("compareVersions(%s, %s) = %d, want %d", tt.v1, tt.v2, result, tt.expected) - } - }) - } -} - -// TestIsClientLatestVersion tests the CompareClientVersions function -func TestIsClientLatestVersion(t *testing.T) { - tests := []struct { - client types.ClientType - version string - latest string - wantLatest bool - }{ - {types.ClientReth, "0.1.0", versions.LatestRethVersion, false}, // Older version - {types.ClientReth, versions.LatestRethVersion, versions.LatestRethVersion, true}, // Latest version - {types.ClientReth, "999.999.999", versions.LatestRethVersion, true}, // Future version - {types.ClientGeth, "1.0.0", versions.LatestGethVersion, false}, // Older version - {types.ClientGeth, versions.LatestGethVersion, versions.LatestGethVersion, true}, // Latest version - {types.ClientLighthouse, "1.0.0", versions.LatestLighthouseVersion, false}, // Older version - {types.ClientLighthouse, versions.LatestLighthouseVersion, versions.LatestLighthouseVersion, true}, // Latest version - } - - for _, tt := range tests { - t.Run(fmt.Sprintf("%s_%s", tt.client, tt.version), func(t *testing.T) { - isLatest := CompareClientVersions(string(tt.client), tt.version, tt.latest) - if isLatest != tt.wantLatest { - t.Errorf("CompareClientVersions() isLatest = %v, want %v", isLatest, tt.wantLatest) - } - }) - } -} - -// MockInstaller represents a mock installer for testing -type MockInstaller struct { - *installer - RemoveClientCalled bool - InstallClientCalled bool - SetupJWTSecretCalled bool -} - -// Override RemoveClient for testing -func (m *MockInstaller) RemoveClient(client types.ClientType) error { - m.RemoveClientCalled = true - return nil -} - -// TestCommandLineRun tests the CommandLine.Run method -// func TestCommandLineRun(t *testing.T) { -//installDir := "/tmp" -//baseInstaller := NewInstaller(installDir) - -//mockInstaller := &MockInstaller{ -// installer: baseInstaller, -//} - -//cmdLine := &CommandLine{ -//installer: mockInstaller.installer, -//} - -// Test with remove flag -//args := []string{"installer", "--client", "geth", "--remove"} -//err := cmdLine.Run(args) -//if err != nil { -//t.Errorf("CommandLine.Run() error = %v", err) -//} - -// Test with invalid client -//args = []string{"installer", "--client", "unknown"} -//err = cmdLine.Run(args) -//if err == nil { -//t.Errorf("CommandLine.Run() with invalid client should return error") -//} - -// Test with missing client -//args = []string{"installer"} -//err = cmdLine.Run(args) -//if err == nil { -//t.Errorf("CommandLine.Run() with missing client should return error") -//} -//} - -// TestDownloadFile tests the downloadFile function with a mock HTTP server -func TestDownloadFile(t *testing.T) { - // Skip this test for now as it requires setting up a mock HTTP server - t.Skip("Skipping downloadFile test as it requires a mock HTTP server") -} - -// TestInstallClient tests the InstallClient method -func TestInstallClient(t *testing.T) { - // Skip this test as it requires filesystem operations - t.Skip("Skipping InstallClient test as it requires filesystem operations") -} - -// TestSetupJWTSecret tests the SetupJWTSecret method -func TestSetupJWTSecret(t *testing.T) { - // Skip this test as it requires filesystem operations - t.Skip("Skipping SetupJWTSecret test as it requires filesystem operations") -} - -// TestRemoveClient tests the RemoveClient method -func TestRemoveClient(t *testing.T) { - // Skip this test as it requires filesystem operations - t.Skip("Skipping RemoveClient test as it requires filesystem operations") -} From ace8e757273efd7cb2a9930f6f38df3305265d60 Mon Sep 17 00:00:00 2001 From: emperorsixpacks Date: Tue, 7 Oct 2025 12:52:30 +0100 Subject: [PATCH 09/18] fix: pipline --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 99216e2..dfd3d82 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,4 +24,4 @@ jobs: run: go build ./... - name: Test - run: go test ./... + run: cd pkg && go test ./... From 875ca179c2ac1fbc883fb80ae41064d850890ca9 Mon Sep 17 00:00:00 2001 From: JayWebtech Date: Wed, 8 Oct 2025 10:30:22 +0100 Subject: [PATCH 10/18] chore : responsiveness --- .gitignore | 8 + docs/src/app/clients/page.tsx | 158 ++++++++-------- docs/src/app/commands/page.tsx | 122 ++++++------ docs/src/app/configuration/page.tsx | 78 ++++---- docs/src/app/globals.css | 75 +++++++- docs/src/app/layout.tsx | 32 +++- docs/src/app/requirements/page.tsx | 282 +++++++++++++++------------- docs/src/components/CodeBlock.tsx | 8 +- docs/src/components/Header.tsx | 41 +++- docs/src/components/Sidebar.tsx | 114 ++++++++--- 10 files changed, 567 insertions(+), 351 deletions(-) diff --git a/.gitignore b/.gitignore index 2adc832..a6f9c08 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,14 @@ docs/.gitbook/ docs/dist/ docs/build/ +# Next.js build outputs +docs/.next/ +docs/out/ +docs/next-env.d.ts +.next/ +out/ +next-env.d.ts + # IDE and editor files .vscode/ .idea/ diff --git a/docs/src/app/clients/page.tsx b/docs/src/app/clients/page.tsx index e83e87c..7eb9d48 100644 --- a/docs/src/app/clients/page.tsx +++ b/docs/src/app/clients/page.tsx @@ -67,38 +67,42 @@ export default function Clients() {

Popular client combinations for Ethereum nodes:

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExecutionConsensusCharacteristics
GethLighthouseMost popular, well-tested
RethLighthouseHigh performance, modern
GethPrysmStable, feature-rich
RethPrysmPerformance-focused
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExecutionConsensusCharacteristics
GethLighthouseMost popular, well-tested
RethLighthouseHigh performance, modern
GethPrysmStable, feature-rich
RethPrysmPerformance-focused
+
+

Choosing Clients

@@ -158,49 +162,53 @@ export default function Clients() {

Resource Requirements by Client

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClientRAMDiskCPU
Geth16+ GB~1.2 TB4+ cores
Reth16+ GB~900 GB4+ cores
Lighthouse8+ GB~200 GB2+ cores
Prysm8+ GB~250 GB2+ cores
Juno8+ GB~300 GB2+ cores
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClientRAMDiskCPU
Geth16+ GB~1.2 TB4+ cores
Reth16+ GB~900 GB4+ cores
Lighthouse8+ GB~200 GB2+ cores
Prysm8+ GB~250 GB2+ cores
Juno8+ GB~300 GB2+ cores
+
+
diff --git a/docs/src/app/commands/page.tsx b/docs/src/app/commands/page.tsx index 3fd0b4f..5cbf217 100644 --- a/docs/src/app/commands/page.tsx +++ b/docs/src/app/commands/page.tsx @@ -13,65 +13,69 @@ export default function Commands() {

Command Overview

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CommandDescription
addAdd an Ethereum or Starknet client to the config
completionGenerate the autocompletion script for the specified shell
configCreate, show, and update your Starknet node configuration
monitorLaunch real-time monitoring dashboard
removeRemove a specified resource
runRun a specific local infrastructure service
startRun the configured Ethereum clients
statusDisplay status of running clients
stopStop the configured Ethereum clients
updateCheck for and install client updates
validatorManage the Starknet validator client
versionShow version of starknode-kit or a specific client
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandDescription
addAdd an Ethereum or Starknet client to the config
completionGenerate the autocompletion script for the specified shell
configCreate, show, and update your Starknet node configuration
monitorLaunch real-time monitoring dashboard
removeRemove a specified resource
runRun a specific local infrastructure service
startRun the configured Ethereum clients
statusDisplay status of running clients
stopStop the configured Ethereum clients
updateCheck for and install client updates
validatorManage the Starknet validator client
versionShow version of starknode-kit or a specific client
+
+

Quick Examples

diff --git a/docs/src/app/configuration/page.tsx b/docs/src/app/configuration/page.tsx index 3cee155..e22f031 100644 --- a/docs/src/app/configuration/page.tsx +++ b/docs/src/app/configuration/page.tsx @@ -187,43 +187,47 @@ starknode-kit config set juno eth_node=http://localhost:8545`}

Default ports for each client:

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClientPortsPurpose
Geth8545, 8546, 30303HTTP RPC, WS RPC, P2P
Reth8545, 8546, 30303HTTP RPC, WS RPC, P2P
Lighthouse5052, 9000HTTP API, P2P
Prysm4000, 13000HTTP API, P2P
Juno6060RPC
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClientPortsPurpose
Geth8545, 8546, 30303HTTP RPC, WS RPC, P2P
Reth8545, 8546, 30303HTTP RPC, WS RPC, P2P
Lighthouse5052, 9000HTTP API, P2P
Prysm4000, 13000HTTP API, P2P
Juno6060RPC
+
+

diff --git a/docs/src/app/globals.css b/docs/src/app/globals.css index b60e14f..44b567d 100644 --- a/docs/src/app/globals.css +++ b/docs/src/app/globals.css @@ -34,19 +34,57 @@ body { margin-bottom: 1.5rem; } +.prose h1 { + font-size: 2rem; + line-height: 1.2; +} + +@media (min-width: 640px) { + .prose h1 { + font-size: 2.5rem; + } +} + .prose h2 { - margin-top: 3rem; + margin-top: 2rem; margin-bottom: 1.5rem; + font-size: 1.5rem; +} + +@media (min-width: 640px) { + .prose h2 { + margin-top: 3rem; + font-size: 1.875rem; + } } .prose h3 { - margin-bottom: 1.25rem; + margin-bottom: 1rem; + font-size: 1.25rem; +} + +@media (min-width: 640px) { + .prose h3 { + margin-bottom: 1.25rem; + font-size: 1.5rem; + } +} + +.prose h4 { + font-size: 1.125rem; +} + +@media (min-width: 640px) { + .prose h4 { + font-size: 1.25rem; + } } .prose a { color: #2563eb; text-decoration: none; transition: color 0.2s; + word-break: break-word; } .prose a:hover { @@ -60,6 +98,7 @@ body { border-radius: 0.25rem; font-size: 0.875em; font-family: 'Courier New', monospace; + word-break: break-word; } .prose pre { @@ -73,11 +112,20 @@ body { background: transparent; padding: 0; color: #e2e8f0; + word-break: normal; } .prose table { width: 100%; border-collapse: collapse; + display: block; + overflow-x: auto; +} + +@media (min-width: 768px) { + .prose table { + display: table; + } } .prose th { @@ -91,3 +139,26 @@ body { font-style: italic; color: #6b7280; } + +.prose ul, .prose ol { + padding-left: 1.5rem; +} + +@media (min-width: 640px) { + .prose ul, .prose ol { + padding-left: 2rem; + } +} + +/* Responsive table wrapper */ +.table-wrapper { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + margin: 1.5rem 0; +} + +/* Ensure images are responsive */ +.prose img { + max-width: 100%; + height: auto; +} diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx index 66099db..2d2725b 100644 --- a/docs/src/app/layout.tsx +++ b/docs/src/app/layout.tsx @@ -1,8 +1,10 @@ -import type { Metadata } from "next"; +'use client'; + import { Inter, Source_Code_Pro } from "next/font/google"; import "./globals.css"; import Sidebar from "@/components/Sidebar"; import Header from "@/components/Header"; +import { useState, useCallback } from "react"; const inter = Inter({ subsets: ["latin"], @@ -14,23 +16,33 @@ const source_code_pro = Source_Code_Pro({ variable: "--font-source-code" }) -export const metadata: Metadata = { - title: "starknode-kit Documentation", - description: "Complete documentation for starknode-kit - A CLI tool for setting up and managing Ethereum and Starknet nodes", -}; - export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { + const [isSidebarOpen, setIsSidebarOpen] = useState(false); + + const toggleSidebar = useCallback(() => { + setIsSidebarOpen(prev => !prev); + }, []); + + const closeSidebar = useCallback(() => { + setIsSidebarOpen(false); + }, []); + return ( + + starknode-kit Documentation + + + - -
-
-
+ +
+
+
{children}
diff --git a/docs/src/app/requirements/page.tsx b/docs/src/app/requirements/page.tsx index 8ef1256..fa45c6c 100644 --- a/docs/src/app/requirements/page.tsx +++ b/docs/src/app/requirements/page.tsx @@ -22,43 +22,47 @@ export default function Requirements() {

Minimum Requirements

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ComponentRequirementNotes
CPU4+ coresIntel i3/i5 or AMD equivalent. Avoid Celeron.
RAM32 GBMinimum 16GB, 32GB recommended for comfort
Storage2+ TB NVMe SSDMust have DRAM cache, no QLC NAND
Network100+ MbpsStable connection, unlimited data preferred
Power24/7 uptimeUPS recommended for validators
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentRequirementNotes
CPU4+ coresIntel i3/i5 or AMD equivalent. Avoid Celeron.
RAM32 GBMinimum 16GB, 32GB recommended for comfort
Storage2+ TB NVMe SSDMust have DRAM cache, no QLC NAND
Network100+ MbpsStable connection, unlimited data preferred
Power24/7 uptimeUPS recommended for validators
+
+

Recommended Specifications

@@ -77,43 +81,47 @@ export default function Requirements() {

Storage Size

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClientCurrent SizeGrowth Rate
Ethereum (Geth)~1.2 TB~150 GB/year
Ethereum (Reth)~900 GB~120 GB/year
Lighthouse~200 GB~50 GB/year
Prysm~250 GB~60 GB/year
Juno (Starknet)~300 GB~100 GB/year
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClientCurrent SizeGrowth Rate
Ethereum (Geth)~1.2 TB~150 GB/year
Ethereum (Reth)~900 GB~120 GB/year
Lighthouse~200 GB~50 GB/year
Prysm~250 GB~60 GB/year
Juno (Starknet)~300 GB~100 GB/year
+
+

SSD Requirements

@@ -195,38 +203,42 @@ make --version`} />

Ensure these ports are accessible:

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PortProtocolPurpose
30303TCP/UDPEthereum execution P2P
9000TCP/UDPLighthouse consensus P2P
13000TCPPrysm consensus P2P
6060TCPJuno RPC (localhost only)
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PortProtocolPurpose
30303TCP/UDPEthereum execution P2P
9000TCP/UDPLighthouse consensus P2P
13000TCPPrysm consensus P2P
6060TCPJuno RPC (localhost only)
+
+

For Validator Nodes

@@ -278,33 +290,37 @@ make --version`} />

If running in the cloud, recommended specifications:

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
ProviderInstance TypeEst. Cost/Month
AWSm5.2xlarge + 4TB gp3~$500-700
Google Cloudn2-standard-8 + 4TB SSD~$600-800
AzureStandard_D8s_v3 + 4TB Premium SSD~$550-750
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ProviderInstance TypeEst. Cost/Month
AWSm5.2xlarge + 4TB gp3~$500-700
Google Cloudn2-standard-8 + 4TB SSD~$600-800
AzureStandard_D8s_v3 + 4TB Premium SSD~$550-750
+
+
diff --git a/docs/src/components/CodeBlock.tsx b/docs/src/components/CodeBlock.tsx index 8f6f33e..60c496a 100644 --- a/docs/src/components/CodeBlock.tsx +++ b/docs/src/components/CodeBlock.tsx @@ -17,17 +17,17 @@ export default function CodeBlock({ code, language = 'bash' }: CodeBlockProps) { }; return ( -
+
-
-        

{code}

+
+        {code}
       
); diff --git a/docs/src/components/Header.tsx b/docs/src/components/Header.tsx index 7be998d..fd5e8ac 100644 --- a/docs/src/components/Header.tsx +++ b/docs/src/components/Header.tsx @@ -2,11 +2,44 @@ import Link from 'next/link'; -export default function Header() { +interface HeaderProps { + onMenuClick: () => void; +} + +export default function Header({ onMenuClick }: HeaderProps) { return ( -
-
-
+
+
+ {/* Hamburger button for mobile */} + + + {/* Mobile title - shown only on mobile */} +
+ + starknode-kit + +
+ + {/* Social links */} +
void; +} + +export default function Sidebar({ isOpen, onClose }: SidebarProps) { const pathname = usePathname(); const isActive = (href: string) => { @@ -28,33 +34,87 @@ export default function Sidebar() { return pathname.startsWith(href); }; + // Close sidebar when route changes on mobile + useEffect(() => { + onClose(); + }, [pathname, onClose]); + + // Prevent body scroll when mobile menu is open + useEffect(() => { + if (isOpen) { + document.body.style.overflow = 'hidden'; + } else { + document.body.style.overflow = 'unset'; + } + return () => { + document.body.style.overflow = 'unset'; + }; + }, [isOpen]); + return ( - + <> + {/* Backdrop for mobile */} + {isOpen && ( +
+ )} + + {/* Sidebar */} + + ); } From 04d176c37f0840fdeae8a27f8d8b07a02404b629 Mon Sep 17 00:00:00 2001 From: JayWebtech Date: Wed, 8 Oct 2025 11:56:47 +0100 Subject: [PATCH 11/18] feat : dark mode --- docs/package.json | 11 +- docs/src/app/clients/page.tsx | 132 ++++++++++----------- docs/src/app/commands/page.tsx | 66 +++++------ docs/src/app/configuration/page.tsx | 56 ++++----- docs/src/app/contributing/page.tsx | 8 +- docs/src/app/getting-started/page.tsx | 46 ++++---- docs/src/app/globals.css | 2 +- docs/src/app/installation/page.tsx | 16 +-- docs/src/app/layout.tsx | 19 +-- docs/src/app/page.tsx | 52 ++++----- docs/src/app/requirements/page.tsx | 162 +++++++++++++------------- docs/src/app/validator/page.tsx | 22 ++-- docs/src/components/CodeBlock.tsx | 2 +- docs/src/components/Header.tsx | 10 +- docs/src/components/Sidebar.tsx | 12 +- docs/tailwind.config.ts | 1 + 16 files changed, 311 insertions(+), 306 deletions(-) diff --git a/docs/package.json b/docs/package.json index e0da70a..1e7d8b8 100644 --- a/docs/package.json +++ b/docs/package.json @@ -8,16 +8,17 @@ "start": "next start" }, "dependencies": { + "next": "15.5.4", + "next-themes": "^0.4.6", "react": "19.1.0", - "react-dom": "19.1.0", - "next": "15.5.4" + "react-dom": "19.1.0" }, "devDependencies": { - "typescript": "^5", + "@tailwindcss/postcss": "^4", "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", - "@tailwindcss/postcss": "^4", - "tailwindcss": "^4" + "tailwindcss": "^4", + "typescript": "^5" } } diff --git a/docs/src/app/clients/page.tsx b/docs/src/app/clients/page.tsx index 7eb9d48..c0602ba 100644 --- a/docs/src/app/clients/page.tsx +++ b/docs/src/app/clients/page.tsx @@ -5,7 +5,7 @@ export default function Clients() {

Supported Clients

-

+

starknode-kit supports multiple client implementations for both Ethereum and Starknet networks.

@@ -27,19 +27,19 @@ export default function Clients() {

-
-

Execution Clients

-

Handle transaction execution and state management

-
    +
    +

    Execution Clients

    +

    Handle transaction execution and state management

    +
    • • Geth (Go)
    • • Reth (Rust)
    -
    -

    Consensus Clients

    -

    Handle proof-of-stake consensus mechanism

    -
      +
      +

      Consensus Clients

      +

      Handle proof-of-stake consensus mechanism

      +
      • • Lighthouse (Rust)
      • • Prysm (Go)
      @@ -53,10 +53,10 @@ export default function Clients() {

      -
      -

      Starknet Clients

      -

      Full node implementations for Starknet

      -
        +
        +

        Starknet Clients

        +

        Full node implementations for Starknet

        +
        • • Juno (Go) - Full node client
        • • Starknet Validator - Validator client for staking
        @@ -71,33 +71,33 @@ export default function Clients() {
        - + - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + +
        ExecutionConsensusCharacteristicsExecutionConsensusCharacteristics
        GethLighthouseMost popular, well-testedGethLighthouseMost popular, well-tested
        RethLighthouseHigh performance, modernRethLighthouseHigh performance, modern
        GethPrysmStable, feature-richGethPrysmStable, feature-rich
        RethPrysmPerformance-focusedRethPrysmPerformance-focused
        @@ -166,44 +166,44 @@ export default function Clients() {
        - + - - - - + + + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + +
        ClientRAMDiskCPUClientRAMDiskCPU
        Geth16+ GB~1.2 TB4+ coresGeth16+ GB~1.2 TB4+ cores
        Reth16+ GB~900 GB4+ coresReth16+ GB~900 GB4+ cores
        Lighthouse8+ GB~200 GB2+ coresLighthouse8+ GB~200 GB2+ cores
        Prysm8+ GB~250 GB2+ coresPrysm8+ GB~250 GB2+ cores
        Juno8+ GB~300 GB2+ coresJuno8+ GB~300 GB2+ cores
        @@ -211,9 +211,9 @@ export default function Clients() {
        -
        -

        💡 Recommendation

        -

        +

        +

        💡 Recommendation

        +

        For most users, we recommend Reth + Lighthouse for Ethereum (best performance) and Juno for Starknet.

        @@ -239,21 +239,21 @@ export default function Clients() {
      • Start nodes: starknode-kit start
      • -
        -

        ⚠️ Note

        -

        +

        +

        ⚠️ Note

        +

        Switching clients may require re-syncing from scratch, which can take several days. Plan accordingly and ensure you have sufficient disk space.

        -
        -

        📖 Next Steps

        -

        +

        +

        📖 Next Steps

        +

        Ready to dive deeper? Check out our validator guide:

        - Validator Guide + Validator Guide
        diff --git a/docs/src/app/commands/page.tsx b/docs/src/app/commands/page.tsx index 5cbf217..7fcdabb 100644 --- a/docs/src/app/commands/page.tsx +++ b/docs/src/app/commands/page.tsx @@ -6,7 +6,7 @@ export default function Commands() {

        Commands Reference

        -

        +

        Complete reference for all starknode-kit commands. Each command helps you manage different aspects of your Ethereum and Starknet nodes.

        @@ -17,60 +17,60 @@ export default function Commands() {
        - + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
        CommandDescriptionCommandDescription
        addAdd an Ethereum or Starknet client to the configaddAdd an Ethereum or Starknet client to the config
        completionGenerate the autocompletion script for the specified shellcompletionGenerate the autocompletion script for the specified shell
        configCreate, show, and update your Starknet node configurationconfigCreate, show, and update your Starknet node configuration
        monitorLaunch real-time monitoring dashboardmonitorLaunch real-time monitoring dashboard
        removeRemove a specified resourceremoveRemove a specified resource
        runRun a specific local infrastructure servicerunRun a specific local infrastructure service
        startRun the configured Ethereum clientsstartRun the configured Ethereum clients
        statusDisplay status of running clientsstatusDisplay status of running clients
        stopStop the configured Ethereum clientsstopStop the configured Ethereum clients
        updateCheck for and install client updatesupdateCheck for and install client updates
        validatorManage the Starknet validator clientvalidatorManage the Starknet validator client
        versionShow version of starknode-kit or a specific clientversionShow version of starknode-kit or a specific client
        @@ -146,13 +146,13 @@ starknode-kit completion zsh > "\${fpath[1]}/_starknode-kit" starknode-kit completion fish > ~/.config/fish/completions/starknode-kit.fish`} /> -
        -

        📖 Next Steps

        -

        +

        +

        📖 Next Steps

        +

        Ready to dive deeper? Check out our comprehensive guides:

        - Supported Clients + Supported Clients
        diff --git a/docs/src/app/configuration/page.tsx b/docs/src/app/configuration/page.tsx index e22f031..c46d147 100644 --- a/docs/src/app/configuration/page.tsx +++ b/docs/src/app/configuration/page.tsx @@ -6,7 +6,7 @@ export default function Configuration() {

        Configuration

        -

        +

        Learn how to configure starknode-kit for your Ethereum and Starknet nodes.

        @@ -171,9 +171,9 @@ starknode-kit config set juno eth_node=http://localhost:8545`}
      -
      -

      ⚠️ Important

      -

      +

      +

      ⚠️ Important

      +

      Changing the network will affect all clients. Make sure to stop your nodes before changing networks.

      @@ -191,38 +191,38 @@ starknode-kit config set juno eth_node=http://localhost:8545`}
      - + - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
      ClientPortsPurposeClientPortsPurpose
      Geth8545, 8546, 30303HTTP RPC, WS RPC, P2PGeth8545, 8546, 30303HTTP RPC, WS RPC, P2P
      Reth8545, 8546, 30303HTTP RPC, WS RPC, P2PReth8545, 8546, 30303HTTP RPC, WS RPC, P2P
      Lighthouse5052, 9000HTTP API, P2PLighthouse5052, 9000HTTP API, P2P
      Prysm4000, 13000HTTP API, P2PPrysm4000, 13000HTTP API, P2P
      Juno6060RPCJuno6060RPC
      @@ -320,13 +320,13 @@ starknode-kit config set juno eth_node=http://localhost:8545`}
    • Stop conflicting services
    -
    -

    📖 Next Steps

    -

    +

    +

    📖 Next Steps

    +

    Ready to dive deeper? Check out our comprehensive guides:

    - Commands Reference + Commands Reference
    diff --git a/docs/src/app/contributing/page.tsx b/docs/src/app/contributing/page.tsx index d003597..afd9a7e 100644 --- a/docs/src/app/contributing/page.tsx +++ b/docs/src/app/contributing/page.tsx @@ -6,7 +6,7 @@ export default function Contributing() {

    Contributing

    -

    +

    We welcome contributions to starknode-kit! This guide will help you get started with contributing to the project.

    @@ -251,9 +251,9 @@ Error log output here
  • Conventional Commits
-
-

🎉 Thank You!

-

+

+

🎉 Thank You!

+

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

diff --git a/docs/src/app/getting-started/page.tsx b/docs/src/app/getting-started/page.tsx index f7e0251..871d648 100644 --- a/docs/src/app/getting-started/page.tsx +++ b/docs/src/app/getting-started/page.tsx @@ -6,7 +6,7 @@ export default function GettingStarted() {

Getting Started

-

+

Welcome to starknode-kit! This guide will help you get up and running with your Ethereum and Starknet nodes in just a few minutes.

@@ -33,9 +33,9 @@ export default function GettingStarted() { -
-

📝 Note

-

+

+

📝 Note

+

For detailed hardware requirements, check out our{" "} Requirements page @@ -127,9 +127,9 @@ export default function GettingStarted() { -

-

⚠️ Important

-

+

+

⚠️ Important

+

The start command only launches Ethereum clients (execution + consensus). It does not start Starknet clients.

@@ -164,42 +164,42 @@ starknode-kit run lighthouse`}

The monitoring dashboard provides real-time insights:

-
+
🔄
-

Node Sync Status

-

Real-time synchronization progress and health

+

Node Sync Status

+

Real-time synchronization progress and health

-
+
📊
-

Current Block Height

-

Latest block number and sync progress

+

Current Block Height

+

Latest block number and sync progress

-
+
🌐
-

Network Statistics

-

Peer connections and network performance

+

Network Statistics

+

Peer connections and network performance

-
+
💻
-

System Resources

-

CPU, RAM, and disk usage metrics

+

System Resources

+

CPU, RAM, and disk usage metrics

@@ -213,13 +213,13 @@ starknode-kit run lighthouse`} -
-

📖 Next Steps

-

+

+

📖 Next Steps

+

Ready to dive deeper? Check out our installation guide:

- Installation Guide + Installation Guide
diff --git a/docs/src/app/globals.css b/docs/src/app/globals.css index 44b567d..02dbce5 100644 --- a/docs/src/app/globals.css +++ b/docs/src/app/globals.css @@ -93,7 +93,7 @@ body { } .prose code { - background: #f3f4f6; + background: #040811; padding: 0.2em 0.4em; border-radius: 0.25rem; font-size: 0.875em; diff --git a/docs/src/app/installation/page.tsx b/docs/src/app/installation/page.tsx index 9dcd313..342df95 100644 --- a/docs/src/app/installation/page.tsx +++ b/docs/src/app/installation/page.tsx @@ -6,7 +6,7 @@ export default function Installation() {

Installation

-

+

There are multiple ways to install starknode-kit. Choose the method that best suits your needs.

@@ -132,9 +132,9 @@ Use "starknode [command] --help" for more information about a command.`} rm -rf ~/.config/starknode-kit`} /> -
-

⚠️ Note

-

+

+

⚠️ Note

+

This will not remove any client data (e.g., blockchain data). The data is stored in the locations specified in your{" "} ~/.starknode-kit/starknode.yml file. @@ -164,13 +164,13 @@ rm -rf ~/.config/starknode-kit`} have sudo access or contact your system administrator.

-
-

📖 Next Steps

-

+

+

📖 Next Steps

+

Ready to dive deeper? Check out our configuration guide:

- Configuration Guide + Configuration Guide
diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx index 2d2725b..d6c8eea 100644 --- a/docs/src/app/layout.tsx +++ b/docs/src/app/layout.tsx @@ -1,4 +1,4 @@ -'use client'; +"use client"; import { Inter, Source_Code_Pro } from "next/font/google"; import "./globals.css"; @@ -13,8 +13,8 @@ const inter = Inter({ const source_code_pro = Source_Code_Pro({ subsets: ["latin"], - variable: "--font-source-code" -}) + variable: "--font-source-code", +}); export default function RootLayout({ children, @@ -24,7 +24,7 @@ export default function RootLayout({ const [isSidebarOpen, setIsSidebarOpen] = useState(false); const toggleSidebar = useCallback(() => { - setIsSidebarOpen(prev => !prev); + setIsSidebarOpen((prev) => !prev); }, []); const closeSidebar = useCallback(() => { @@ -32,16 +32,19 @@ export default function RootLayout({ }, []); return ( - + starknode-kit Documentation - + - +
-
+
{children}
diff --git a/docs/src/app/page.tsx b/docs/src/app/page.tsx index ea7a66d..429834a 100644 --- a/docs/src/app/page.tsx +++ b/docs/src/app/page.tsx @@ -6,7 +6,7 @@ export default function Home() {

Welcome to starknode-kit

-

+

A powerful command-line tool to help developers and node operators easily set up, manage, and maintain Ethereum and Starknet nodes.

@@ -14,12 +14,12 @@ export default function Home() {
-

+

🚀 Getting Started

-

+

Learn how to install and configure starknode-kit for your node setup.

@@ -27,36 +27,36 @@ export default function Home() { -

+

📘 Commands

-

+

Explore all available commands and their usage.

-

+

⚙️ Configuration

-

+

Configure your Ethereum and Starknet clients.

-

+

🔐 Validator Setup

-

+

Set up and manage your Starknet validator node.

@@ -107,36 +107,36 @@ export default function Home() {

Supported Clients

-
-

Execution Layer

-
    +
    +

    Execution Layer

    +
    • • Geth
    • • Reth
    -
    -

    Consensus Layer

    -
      +
      +

      Consensus Layer

      +
      • • Lighthouse
      • • Prysm
      -
      -

      Starknet

      -
        +
        +

        Starknet

        +
        • • Juno
        • • Starknet Validator
      -
      -

      📖 Next Steps

      -

      +

      +

      📖 Next Steps

      +

      Ready to dive deeper? Check out our comprehensive guides:

      - Installation Guide + Installation Guide
      diff --git a/docs/src/app/requirements/page.tsx b/docs/src/app/requirements/page.tsx index fa45c6c..9219f30 100644 --- a/docs/src/app/requirements/page.tsx +++ b/docs/src/app/requirements/page.tsx @@ -6,16 +6,16 @@ export default function Requirements() {

      Requirements

      -

      +

      Hardware and software requirements for running Ethereum and Starknet nodes with starknode-kit.

      Hardware Requirements

      -
      -

      📚 Reference

      -

      +

      +

      📚 Reference

      +

      For a detailed breakdown of node hardware requirements, see the Rocket Pool Hardware Guide.

      @@ -26,38 +26,38 @@ export default function Requirements() {
      - + - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
      ComponentRequirementNotesComponentRequirementNotes
      CPU4+ coresIntel i3/i5 or AMD equivalent. Avoid Celeron.CPU4+ coresIntel i3/i5 or AMD equivalent. Avoid Celeron.
      RAM32 GBMinimum 16GB, 32GB recommended for comfortRAM32 GBMinimum 16GB, 32GB recommended for comfort
      Storage2+ TB NVMe SSDMust have DRAM cache, no QLC NANDStorage2+ TB NVMe SSDMust have DRAM cache, no QLC NAND
      Network100+ MbpsStable connection, unlimited data preferredNetwork100+ MbpsStable connection, unlimited data preferred
      Power24/7 uptimeUPS recommended for validatorsPower24/7 uptimeUPS recommended for validators
      @@ -85,38 +85,38 @@ export default function Requirements() {
      - + - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +
      ClientCurrent SizeGrowth RateClientCurrent SizeGrowth Rate
      Ethereum (Geth)~1.2 TB~150 GB/yearEthereum (Geth)~1.2 TB~150 GB/year
      Ethereum (Reth)~900 GB~120 GB/yearEthereum (Reth)~900 GB~120 GB/year
      Lighthouse~200 GB~50 GB/yearLighthouse~200 GB~50 GB/year
      Prysm~250 GB~60 GB/yearPrysm~250 GB~60 GB/year
      Juno (Starknet)~300 GB~100 GB/yearJuno (Starknet)~300 GB~100 GB/year
      @@ -135,9 +135,9 @@ export default function Requirements() {
    • NVMe interface - SATA SSDs are too slow
    -
    -

    ⚠️ Warning

    -

    +

    +

    ⚠️ Warning

    +

    Using a QLC SSD or SSD without DRAM cache will result in poor performance and potential node failures. See the tested SSD list for recommendations.

    @@ -207,33 +207,33 @@ make --version`} />
    - + - - - + + + - + - - - + + + - - - + + + - - - + + + - - - + + +
    PortProtocolPurposePortProtocolPurpose
    30303TCP/UDPEthereum execution P2P30303TCP/UDPEthereum execution P2P
    9000TCP/UDPLighthouse consensus P2P9000TCP/UDPLighthouse consensus P2P
    13000TCPPrysm consensus P2P13000TCPPrysm consensus P2P
    6060TCPJuno RPC (localhost only)6060TCPJuno RPC (localhost only)
    @@ -294,28 +294,28 @@ make --version`} />
    - + - - - + + + - + - - - + + + - - - + + + - - - + + +
    ProviderInstance TypeEst. Cost/MonthProviderInstance TypeEst. Cost/Month
    AWSm5.2xlarge + 4TB gp3~$500-700AWSm5.2xlarge + 4TB gp3~$500-700
    Google Cloudn2-standard-8 + 4TB SSD~$600-800Google Cloudn2-standard-8 + 4TB SSD~$600-800
    AzureStandard_D8s_v3 + 4TB Premium SSD~$550-750AzureStandard_D8s_v3 + 4TB Premium SSD~$550-750
    @@ -323,9 +323,9 @@ make --version`} />
    -
    -

    💡 Cost Consideration

    -

    +

    +

    💡 Cost Consideration

    +

    Running on dedicated hardware is often more cost-effective long-term than cloud hosting, especially for validators.

    diff --git a/docs/src/app/validator/page.tsx b/docs/src/app/validator/page.tsx index 156aa27..f7387a2 100644 --- a/docs/src/app/validator/page.tsx +++ b/docs/src/app/validator/page.tsx @@ -5,13 +5,13 @@ export default function Validator() {

    Validator Setup

    -

    +

    Set up and manage your Starknet validator node using starknode-kit.

    -
    -

    ⚠️ Important

    -

    +

    +

    ⚠️ Important

    +

    Running a validator requires significant responsibility. Make sure you understand the requirements and risks before proceeding.

    @@ -209,9 +209,9 @@ starknode-kit monitor`} />
  • Penalties - For downtime or malicious behavior
-
-

💡 Tip

-

+

+

💡 Tip

+

Start on the testnet (Sepolia) to familiarize yourself with validator operations before running on mainnet.

@@ -224,13 +224,13 @@ starknode-kit monitor`} />
  • GitHub Repository
  • -
    -

    📖 Next Steps

    -

    +

    +

    📖 Next Steps

    +

    Ready to dive deeper? Check out our comprehensive guides:

    - System Requirements + System Requirements
    diff --git a/docs/src/components/CodeBlock.tsx b/docs/src/components/CodeBlock.tsx index 60c496a..f12527e 100644 --- a/docs/src/components/CodeBlock.tsx +++ b/docs/src/components/CodeBlock.tsx @@ -27,7 +27,7 @@ export default function CodeBlock({ code, language = 'bash' }: CodeBlockProps) {
    -        {code}
    +        

    {code}

    ); diff --git a/docs/src/components/Header.tsx b/docs/src/components/Header.tsx index fd5e8ac..973e120 100644 --- a/docs/src/components/Header.tsx +++ b/docs/src/components/Header.tsx @@ -8,12 +8,12 @@ interface HeaderProps { export default function Header({ onMenuClick }: HeaderProps) { return ( -
    +
    {/* Hamburger button for mobile */}
    @@ -44,7 +44,7 @@ export default function Header({ onMenuClick }: HeaderProps) { href="https://github.com/thebuidl-grid/starknode-kit" target="_blank" rel="noopener noreferrer" - className="text-gray-600 hover:text-gray-900 transition-colors" + className="text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white transition-colors" aria-label="GitHub" > @@ -59,7 +59,7 @@ export default function Header({ onMenuClick }: HeaderProps) { href="https://t.me/+SCPbza9fk8dkYWI0" target="_blank" rel="noopener noreferrer" - className="text-gray-600 hover:text-gray-900 transition-colors" + className="text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white transition-colors" aria-label="Telegram" > diff --git a/docs/src/components/Sidebar.tsx b/docs/src/components/Sidebar.tsx index 8bfe7ae..f6d3f17 100644 --- a/docs/src/components/Sidebar.tsx +++ b/docs/src/components/Sidebar.tsx @@ -63,22 +63,22 @@ export default function Sidebar({ isOpen, onClose }: SidebarProps) { {/* Sidebar */}
    -

    +

    starknode-kit

    -

    Documentation

    +

    Documentation

    {/* Close button for mobile */}