11 Commits

Author SHA1 Message Date
pezkuwichain 15a0bc4ad3 fix: Add --unsafe-force-node-key-generation flag for first-time validator startup 2025-11-06 18:21:46 +03:00
pezkuwichain 859d79d1b6 fix: Correct binary name from pezkuwi-node to pezkuwi in systemd service
The SDK builds a binary named 'pezkuwi' not 'pezkuwi-node'. This was causing
validator services to fail with exit code 203/EXEC.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 10:40:35 +03:00
pezkuwichain f08f0017d1 refactor: Reorganize validator architecture for distributed deployment
BREAKING CHANGE: Complete restructuring to support multi-network distributed validator deployment

Architecture Changes:
- Changed from shared single-machine to distributed multi-machine deployment
- 8 separate machines for 8 validators (beta testnet)
- Each validator builds own SDK and frontend locally
- Sequential bootnode connection (V2→V1, V3→V2, etc.)

New Structure:
- Multi-network support: beta_testnet, staging, mainnet
- Beta testnet: 8 validators with complete keys
- Staging: 20 validator slots (validator1 ready)
- Mainnet: 100 validator slots (validator1 ready)

Setup Script v3.0.0:
- Automatic dependency detection and installation
- Builds as actual user (fixes permission issues)
- Interactive bootnode configuration for validators > 1
- Systemd service generation per validator per network
- Nginx frontend deployment per validator

Usage:
sudo ./setup.sh <network> <validator_number>
Example: sudo ./setup.sh beta_testnet 8

Removed:
- scripts/ directory (helper scripts for shared deployment)
- validators/ directory (moved to beta_testnet/validators/)

Added:
- beta_testnet/ (8 validators with keys)
- staging/ (20 validator structure)
- mainnet/ (100 validator structure)
- Multi-network chain-specs directories
2025-11-06 08:24:12 +03:00
pezkuwichain 046efcc17d fix: Run SDK and frontend builds as actual user
**Problem**: cargo and npm commands were running as root when script
was executed with sudo, causing permission and PATH issues.

**Solution**:
- Detect actual user with $SUDO_USER in setup_sdk()
- Detect actual user with $SUDO_USER in setup_frontend()
- Run cargo build as actual user with proper PATH
- Run npm install/build as actual user

**Changes**:
- setup_sdk: Added ACTUAL_USER detection and su command for cargo
- setup_frontend: Added ACTUAL_USER detection and su for npm commands
- Both functions now source cargo env and run in user context

This ensures all builds happen with correct permissions and PATH
for the user who invoked sudo.

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 06:35:00 +03:00
pezkuwichain 1496f9d980 fix: Install Rust for actual user when running with sudo
**Problem**: When setup script runs with sudo, Rust was installed in
root's home directory (/root/.cargo), making it inaccessible to the
actual user running the script.

**Solution**:
- Detect actual user using $SUDO_USER environment variable
- Use 'su - $ACTUAL_USER -c' to run Rust installation commands
- Install Rust in the actual user's home directory (~/.cargo)
- Run all rustup commands (default, update, target add) as actual user

**Testing**: Designed for 'mesut' user running 'sudo ./setup.sh 8'

This ensures Rust is accessible to the user and can be used for
SDK compilation without permission issues.

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 05:45:19 +03:00
pezkuwichain c277866ff3 feat: Use shallow clone for faster and more reliable downloads
- Add --depth 1 flag to git clone commands
- Reduces download size significantly
- Fixes network timeout issues with large repositories
- Improves user experience for slow connections
2025-11-05 17:13:29 +03:00
pezkuwichain 5d2c66ad25 fix: Add real GitHub repository URLs for pezkuwi-sdk and DKSweb
- Update SDK URL to https://github.com/pezkuwichain/pezkuwi-sdk
- Update DKSweb URL to https://github.com/pezkuwichain/DKSweb
- Change folder references from Pezkuwi-SDK to pezkuwi-sdk for consistency
- Enable automatic clone from public repositories
2025-11-05 16:50:50 +03:00
pezkuwichain a103434779 fix: Add verbose output and progress messages for Rust installation
- Show 'please wait' message during Rust installation
- Add --verbose flag to rustup installer
- Add progress messages for each installation step
- Check if .cargo/env exists before sourcing
- Improves user experience by showing what's happening
2025-11-05 16:28:36 +03:00
pezkuwichain 426bfa6ab5 fix: Prevent script exit on dependency check
- Add '|| true' to check_dependencies call to prevent exit on non-zero return
- Remove unused return statement from check_dependencies
- Now script continues to install missing dependencies automatically
- Fixes issue with 'set -e' causing premature exit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 16:21:56 +03:00
pezkuwichain c091704581 fix: Make dependency variables global for automatic installation
- Move missing_deps, RUST_MISSING, and NODE_MISSING to global scope
- Fixes bug where install_dependencies couldn't access missing_deps array
- Now setup script will automatically install missing dependencies
- Improves user experience for first-time validators

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 16:19:09 +03:00
pezkuwichain 00acf52e7e feat: Upgrade to validator v2.0.0 with beta testnet real keys
Major upgrade from v1.0.0 to v2.0.0 with complete restructure:

Features:
- One-command validator setup (setup.sh)
- Automated dependency checking (Git, Rust, Node.js, build tools, Nginx)
- Shared Pezkuwi-SDK build (single build for all validators)
- Single DKSweb frontend with auto-update from GitHub
- 8 beta testnet validators (corrected from 10)
- Real validator keys from currently running beta testnet
- Helper scripts (start.sh, stop.sh, status.sh, logs.sh)
- Systemd service management
- Nginx-based frontend deployment
- Comprehensive README with usage instructions

Structure:
- validators/validator1-8/ - Individual validator configurations
- Each validator has real keys (BABE, GRANDPA, PARA, ASGN, AUDI, BEEF)
- Port allocation: RPC 9944-9951, P2P 30333-30340
- Validator 1 acts as bootnode

Breaking Changes:
- Removed docker support
- Removed old installation scripts (linux/windows)
- Removed LICENSE file
- Complete restructure of directory layout

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 12:06:20 +03:00