mirror of
https://github.com/pezkuwichain/testnet.git
synced 2026-04-22 02:08:01 +00:00
Initial commit: Beta testnet configuration
- Chainspec file (5.2MB) with genesis hash 0xa017...54b1 - Validator startup scripts for Computer 2 (validators 5-8) - Complete setup instructions in README - Configuration for 8-validator beta testnet
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
|||||||
|
# Pezkuwi Beta Testnet Config - Git Ignore
|
||||||
|
|
||||||
|
# Chain data (large and dynamic)
|
||||||
|
chain-data/
|
||||||
|
/tmp/
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# PID files
|
||||||
|
*.pid
|
||||||
|
|
||||||
|
# Seed phrases and private keys (NEVER commit these!)
|
||||||
|
*seed*.txt
|
||||||
|
*phrase*.txt
|
||||||
|
*private*.txt
|
||||||
|
keys/validator-*-seed.txt
|
||||||
|
|
||||||
|
# Binaries (too large for git)
|
||||||
|
*.bin
|
||||||
|
pezkuwi
|
||||||
|
pezkuwi-binary
|
||||||
|
|
||||||
|
# Backup files
|
||||||
|
*.bak
|
||||||
|
*.backup
|
||||||
|
*~
|
||||||
|
|
||||||
|
# OS files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Editor files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
# PezkuwiChain Beta Testnet Configuration
|
||||||
|
|
||||||
|
This repository contains the configuration files needed to run validators 5-8 on Computer 2 for the PezkuwiChain Beta Testnet.
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
|
||||||
|
- `chainspec/beta-testnet.json` - Raw chainspec file (5.2MB) - CRITICAL FILE
|
||||||
|
- `scripts/` - Validator startup scripts for Computer 2 (validators 5-8)
|
||||||
|
- `keys/` - Session keys for validators 5-8 (to be added)
|
||||||
|
|
||||||
|
## Computer 1 (Bootnode + Validators 1-4)
|
||||||
|
- IP: 172.31.134.70
|
||||||
|
- Validators: 1, 2, 3, 4
|
||||||
|
- Bootnode: /ip4/172.31.134.70/tcp/30333/p2p/12D3KooWLdhYkAXWWR7fFSWhMmBFgHVTf78ZWaWf2BpJxzJbTqCU
|
||||||
|
- Genesis Hash: 0xa017f4bbea9c44b29244277ce562405a774f6555d04901c846222e3ac7e554b1
|
||||||
|
|
||||||
|
## Computer 2 (Validators 5-8)
|
||||||
|
- IP: 172.17.184.230
|
||||||
|
- Validators: 5, 6, 7, 8
|
||||||
|
- Ports: P2P 30337-30340, RPC 9948-9951
|
||||||
|
|
||||||
|
## Setup Instructions for Computer 2
|
||||||
|
|
||||||
|
### 1. Clone this repository
|
||||||
|
```bash
|
||||||
|
cd /home/mesut
|
||||||
|
git clone <YOUR_PRIVATE_REPO_URL> pezkuwi-beta-config
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Copy chainspec to SDK directory
|
||||||
|
```bash
|
||||||
|
cp pezkuwi-beta-config/chainspec/beta-testnet.json /home/mesut/Pezkuwi-SDK/computer1-beta-chainspec.json
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Verify chainspec file
|
||||||
|
```bash
|
||||||
|
ls -lh /home/mesut/Pezkuwi-SDK/computer1-beta-chainspec.json
|
||||||
|
# Should show: 5.2M
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Clean old chain data (important!)
|
||||||
|
```bash
|
||||||
|
rm -rf /tmp/beta-validator-{5,6,7,8}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. Make scripts executable
|
||||||
|
```bash
|
||||||
|
chmod +x pezkuwi-beta-config/scripts/*.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. Copy scripts to SDK
|
||||||
|
```bash
|
||||||
|
cp -r pezkuwi-beta-config/scripts/* /home/mesut/Pezkuwi-SDK/scripts/computer2/
|
||||||
|
```
|
||||||
|
|
||||||
|
### 7. Insert validator keys (if not done already)
|
||||||
|
```bash
|
||||||
|
cd /home/mesut/Pezkuwi-SDK/scripts
|
||||||
|
./insert-all-beta-keys.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 8. Start all validators
|
||||||
|
```bash
|
||||||
|
cd /home/mesut/Pezkuwi-SDK/scripts/computer2
|
||||||
|
./start-all-validators-computer2.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 9. Verify validators are running
|
||||||
|
```bash
|
||||||
|
# Check processes
|
||||||
|
ps aux | grep pezkuwi
|
||||||
|
|
||||||
|
# Check logs
|
||||||
|
tail -f /tmp/beta-validator-5.log
|
||||||
|
tail -f /tmp/beta-validator-6.log
|
||||||
|
tail -f /tmp/beta-validator-7.log
|
||||||
|
tail -f /tmp/beta-validator-8.log
|
||||||
|
```
|
||||||
|
|
||||||
|
### 10. Stop validators (if needed)
|
||||||
|
```bash
|
||||||
|
cd /home/mesut/Pezkuwi-SDK/scripts/computer2
|
||||||
|
./stop-validators-computer2.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Expected Behavior
|
||||||
|
|
||||||
|
Once all 8 validators are running:
|
||||||
|
- Each validator should show 7 peers (connected to all other validators)
|
||||||
|
- Genesis hash should match: 0xa017f4bbea9c44b29244277ce562405a774f6555d04901c846222e3ac7e554b1
|
||||||
|
- Block production should begin (requires minimum 6 validators for BFT consensus)
|
||||||
|
- Logs should show: "Prepared block for proposing"
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Genesis hash mismatch
|
||||||
|
- Ensure chainspec file is exactly 5.2MB
|
||||||
|
- Re-copy from this repository
|
||||||
|
- Clean chain data: `rm -rf /tmp/beta-validator-{5,6,7,8}`
|
||||||
|
|
||||||
|
### 0 peers
|
||||||
|
- Verify Computer 1 validators are running
|
||||||
|
- Check bootnode is accessible: `telnet 172.31.134.70 30333`
|
||||||
|
- Verify IP addresses are correct in scripts
|
||||||
|
|
||||||
|
### Keys not found
|
||||||
|
- Re-run key insertion: `./insert-all-beta-keys.sh`
|
||||||
|
- Check RPC ports are correct (9948-9951)
|
||||||
|
|
||||||
|
## Important Files
|
||||||
|
|
||||||
|
- DO NOT modify the chainspec file - it must match Computer 1 exactly
|
||||||
|
- Session keys are stored in validator base paths: /tmp/beta-validator-{5,6,7,8}
|
||||||
|
- Seed phrases are stored separately (NOT in this repository)
|
||||||
|
|
||||||
|
## Network Architecture
|
||||||
|
|
||||||
|
```
|
||||||
|
Computer 1 (172.31.134.70)
|
||||||
|
├── Validator 1 (Bootnode) - P2P:30333, RPC:9944
|
||||||
|
├── Validator 2 - P2P:30334, RPC:9945
|
||||||
|
├── Validator 3 - P2P:30335, RPC:9946
|
||||||
|
└── Validator 4 - P2P:30336, RPC:9947
|
||||||
|
|
||||||
|
Computer 2 (172.17.184.230)
|
||||||
|
├── Validator 5 - P2P:30337, RPC:9948
|
||||||
|
├── Validator 6 - P2P:30338, RPC:9949
|
||||||
|
├── Validator 7 - P2P:30339, RPC:9950
|
||||||
|
└── Validator 8 - P2P:30340, RPC:9951
|
||||||
|
```
|
||||||
|
|
||||||
|
## Version Information
|
||||||
|
|
||||||
|
- Pezkuwi Binary: 1.18.5-9efe07f98b8
|
||||||
|
- Chain: pezkuwichain-beta-testnet
|
||||||
|
- Consensus: BABE/GRANDPA with 8 validators
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
|||||||
|
Beta Testnet Setup - Computer 2 (Validators 5-8)
|
||||||
|
================================================
|
||||||
|
|
||||||
|
BOOTNODE ADDRESS:
|
||||||
|
/ip4/172.31.134.70/tcp/30333/p2p/12D3KooWLdhYkAXWWR7fFSWhMmBFgHVTf78ZWaWf2BpJxzJbTqCU
|
||||||
|
|
||||||
|
QUICK START:
|
||||||
|
1. Copy this entire computer2 folder to Computer 2
|
||||||
|
2. Run: python3 generate-key-insertion-computer2.py /path/to/beta_testnet_validators_WITH_SEEDS_BACKUP.json
|
||||||
|
3. Run: ./start-all-validators-computer2.sh
|
||||||
|
4. Run: ./insert-keys-computer2.sh
|
||||||
|
5. Restart validators for keys to take effect
|
||||||
|
|
||||||
|
VALIDATORS:
|
||||||
|
- Validator 5: Port 30337 (P2P), 9948 (RPC)
|
||||||
|
- Validator 6: Port 30338 (P2P), 9949 (RPC)
|
||||||
|
- Validator 7: Port 30339 (P2P), 9950 (RPC)
|
||||||
|
- Validator 8: Port 30340 (P2P), 9951 (RPC)
|
||||||
|
|
||||||
|
CHECK LOGS:
|
||||||
|
tail -f /tmp/beta-validator-5.log
|
||||||
Executable
+193
@@ -0,0 +1,193 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Generate insert-all-beta-keys.sh from JSON validator file
|
||||||
|
This prevents manual copy-paste errors
|
||||||
|
"""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def main():
|
||||||
|
# Check if JSON file path provided
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("❌ Error: Please provide the path to validator JSON file")
|
||||||
|
print("")
|
||||||
|
print("Usage:")
|
||||||
|
print(" python3 generate-key-insertion-script.py /path/to/beta_testnet_validators_WITH_SEEDS_BACKUP.json")
|
||||||
|
print("")
|
||||||
|
print("Example:")
|
||||||
|
print(" python3 generate-key-insertion-script.py /media/mamostehp/D/res/beta_testnet_validators_WITH_SEEDS_BACKUP.json")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
json_file = Path(sys.argv[1])
|
||||||
|
|
||||||
|
if not json_file.exists():
|
||||||
|
print(f"❌ Error: File not found: {json_file}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
print(f"📖 Reading validators from: {json_file}")
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open(json_file, 'r') as f:
|
||||||
|
data = json.load(f)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Error reading JSON: {e}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Get validators from "beta" key
|
||||||
|
validators = data.get('beta', [])
|
||||||
|
|
||||||
|
if not validators:
|
||||||
|
print("❌ Error: No validators found in 'beta' key")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
print(f"✅ Found {len(validators)} validators")
|
||||||
|
|
||||||
|
# We need validators 5-8 (indices 4-7) validators for Computer 2
|
||||||
|
validators_to_use = validators[4:8]
|
||||||
|
|
||||||
|
# Generate the script
|
||||||
|
output_file = Path("/home/mamostehp/Pezkuwi-SDK/scripts/insert-all-beta-keys.sh")
|
||||||
|
|
||||||
|
print(f"🔧 Generating script: {output_file}")
|
||||||
|
|
||||||
|
script_content = """#!/usr/bin/env bash
|
||||||
|
# Insert all validator keys for Beta Testnet (Validators 5-8 (Computer 2))
|
||||||
|
# AUTO-GENERATED from validator JSON file
|
||||||
|
# DO NOT EDIT MANUALLY - Regenerate using generate-key-insertion-script.py
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
GREEN='\\033[0;32m'
|
||||||
|
BLUE='\\033[0;34m'
|
||||||
|
YELLOW='\\033[1;33m'
|
||||||
|
RED='\\033[0;31m'
|
||||||
|
NC='\\033[0m'
|
||||||
|
|
||||||
|
echo -e "${BLUE}═══════════════════════════════════════════════════════${NC}"
|
||||||
|
echo -e "${BLUE} Beta Testnet - Bulk Key Insertion${NC}"
|
||||||
|
echo -e "${BLUE} Auto-generated from JSON validator file${NC}"
|
||||||
|
echo -e "${BLUE}═══════════════════════════════════════════════════════${NC}"
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}⚠️ SECURITY CHECK${NC}"
|
||||||
|
echo "This script will insert validator keys for 4 local validators."
|
||||||
|
echo "Make sure all validators are running before proceeding."
|
||||||
|
echo ""
|
||||||
|
read -p "Press Ctrl+C to cancel, or Enter to continue..."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Function to insert key
|
||||||
|
insert_key() {
|
||||||
|
local validator_num=$1
|
||||||
|
local rpc_port=$2
|
||||||
|
local key_type=$3
|
||||||
|
local seed=$4
|
||||||
|
local public_key=$5
|
||||||
|
|
||||||
|
local rpc_url="http://127.0.0.1:${rpc_port}"
|
||||||
|
|
||||||
|
echo -e "${GREEN}Validator ${validator_num}: Inserting ${key_type} key...${NC}"
|
||||||
|
|
||||||
|
result=$(curl -s -H "Content-Type: application/json" \\
|
||||||
|
-d "{\\"id\\":1,\\"jsonrpc\\":\\"2.0\\",\\"method\\":\\"author_insertKey\\",\\"params\\":[\\"${key_type}\\",\\"${seed}\\",\\"${public_key}\\"]}" \\
|
||||||
|
"$rpc_url")
|
||||||
|
|
||||||
|
if echo "$result" | grep -q '"result":null'; then
|
||||||
|
echo -e "${GREEN} ✅ Success${NC}"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo -e "${RED} ❌ Failed${NC}"
|
||||||
|
echo " Response: $result"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo -e "${BLUE}🔑 Starting key insertion for 4 validators...${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Add validator keys
|
||||||
|
for idx, validator in enumerate(validators_to_use, 5):
|
||||||
|
rpc_port = 9943 + idx # 9944, 9945, 9946, 9947
|
||||||
|
|
||||||
|
script_content += f"""
|
||||||
|
# =============================================================================
|
||||||
|
# VALIDATOR {idx} - {validator.get('name', f'Validator-{idx}')} (Port {rpc_port})
|
||||||
|
# =============================================================================
|
||||||
|
echo -e "${{BLUE}}🔑 Validator {idx} - {validator.get('name', f'Validator-{idx}')}${{NC}}"
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# BABE key
|
||||||
|
script_content += f"""insert_key {idx} {rpc_port} "babe" "{validator['babe_seed']}" "{validator['babe']}"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# GRANDPA key
|
||||||
|
script_content += f"""insert_key {idx} {rpc_port} "gran" "{validator['grandpa_seed']}" "{validator['grandpa']}"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Para Validator key
|
||||||
|
script_content += f"""insert_key {idx} {rpc_port} "para" "{validator['para_validator_seed']}" "{validator['para_validator']}"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Para Assignment key
|
||||||
|
script_content += f"""insert_key {idx} {rpc_port} "asgn" "{validator['para_assignment_seed']}" "{validator['para_assignment']}"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Authority Discovery key
|
||||||
|
script_content += f"""insert_key {idx} {rpc_port} "audi" "{validator['authority_discovery_seed']}" "{validator['authority_discovery']}"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# BEEFY key
|
||||||
|
script_content += f"""insert_key {idx} {rpc_port} "beef" "{validator['beefy_seed']}" "{validator['beefy']}"
|
||||||
|
"""
|
||||||
|
|
||||||
|
script_content += f"""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Add footer
|
||||||
|
script_content += """
|
||||||
|
echo -e "${GREEN}═══════════════════════════════════════════════════════${NC}"
|
||||||
|
echo -e "${GREEN}✅ Key insertion complete!${NC}"
|
||||||
|
echo -e "${GREEN}═══════════════════════════════════════════════════════${NC}"
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}📝 Next steps:${NC}"
|
||||||
|
echo "1. Restart all validators to apply keys"
|
||||||
|
echo "2. Wait for network to start producing blocks"
|
||||||
|
echo "3. Check logs for 'Prepared block for proposing'"
|
||||||
|
echo ""
|
||||||
|
echo "Validator logs:"
|
||||||
|
echo " Validator 1: tail -f /tmp/beta-validator-1.log"
|
||||||
|
echo " Validator 2: tail -f /tmp/beta-validator-2.log"
|
||||||
|
echo " Validator 3: tail -f /tmp/beta-validator-3.log"
|
||||||
|
echo " Validator 4: tail -f /tmp/beta-validator-4.log"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Write the script
|
||||||
|
try:
|
||||||
|
with open(output_file, 'w') as f:
|
||||||
|
f.write(script_content)
|
||||||
|
|
||||||
|
# Make executable
|
||||||
|
output_file.chmod(0o755)
|
||||||
|
|
||||||
|
print(f"✅ Script generated successfully!")
|
||||||
|
print(f"")
|
||||||
|
print(f"📁 Output: {output_file}")
|
||||||
|
print(f"")
|
||||||
|
print(f"🚀 Next steps:")
|
||||||
|
print(f" 1. Start validators: ./scripts/start-all-beta-validators.sh")
|
||||||
|
print(f" 2. Insert keys: ./scripts/insert-all-beta-keys.sh")
|
||||||
|
print(f"")
|
||||||
|
print(f"✅ Done! No manual copy-paste needed!")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Error writing script: {e}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Executable
+29
@@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Start all validators for Computer 2 (Validators 5-8)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo -e "${BLUE}═══════════════════════════════════════════════════════${NC}"
|
||||||
|
echo -e "${BLUE} Beta Testnet - Computer 2 (Validators 5-8)${NC}"
|
||||||
|
echo -e "${BLUE}═══════════════════════════════════════════════════════${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
for i in 5 6 7 8; do
|
||||||
|
echo -e "${GREEN}Starting Validator $i...${NC}"
|
||||||
|
"$SCRIPT_DIR/start-beta-validator-$i.sh"
|
||||||
|
echo ""
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "${GREEN}✅ All 4 validators started!${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "Logs:"
|
||||||
|
for i in 5 6 7 8; do
|
||||||
|
echo " Validator $i: tail -f /tmp/beta-validator-$i.log"
|
||||||
|
done
|
||||||
Executable
+89
@@ -0,0 +1,89 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Beta Testnet Validator 5 Startup Script
|
||||||
|
# This is the bootnode for the beta testnet
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
PEZKUWI_DIR="$(dirname "$SCRIPT_DIR")"
|
||||||
|
BINARY="$PEZKUWI_DIR/target/release/pezkuwi"
|
||||||
|
BASE_PATH="/tmp/beta-validator-5"
|
||||||
|
LOG_FILE="/tmp/beta-validator-5.log"
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
echo -e "${BLUE}🚀 Starting Beta Testnet Validator 5 (Bootnode)${NC}"
|
||||||
|
echo -e "${YELLOW}⚠️ Make sure you have inserted the validator keys before starting${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check if binary exists
|
||||||
|
if [ ! -f "$BINARY" ]; then
|
||||||
|
echo "Error: Pezkuwi binary not found at $BINARY"
|
||||||
|
echo "Please run: cargo build --release"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create base path
|
||||||
|
mkdir -p "$BASE_PATH"
|
||||||
|
|
||||||
|
# Start validator
|
||||||
|
echo -e "${GREEN}📡 Starting validator node...${NC}"
|
||||||
|
echo "Base path: $BASE_PATH"
|
||||||
|
echo "Log file: $LOG_FILE"
|
||||||
|
echo "P2P port: 30333"
|
||||||
|
echo "RPC port: 9944"
|
||||||
|
echo "WS port: 9944"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
nohup "$BINARY" \
|
||||||
|
--chain pezkuwichain-beta-testnet \
|
||||||
|
--base-path "$BASE_PATH" \
|
||||||
|
--validator \
|
||||||
|
--name "Validator-beta-5" \
|
||||||
|
--port 30337 \
|
||||||
|
--rpc-port 9948 \
|
||||||
|
--rpc-cors all \
|
||||||
|
--rpc-external \
|
||||||
|
--rpc-methods=Unsafe \
|
||||||
|
--unsafe-rpc-external \
|
||||||
|
--unsafe-force-node-key-generation \
|
||||||
|
--prometheus-external \
|
||||||
|
--telemetry-url "wss://telemetry.pezkuwichain.io/submit/ 0" \
|
||||||
|
> "$LOG_FILE" 2>&1 &
|
||||||
|
|
||||||
|
NODE_PID=$!
|
||||||
|
echo "$NODE_PID" > /tmp/beta-validator-5.pid
|
||||||
|
|
||||||
|
echo -e "${GREEN}✅ Validator started with PID: $NODE_PID${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "Waiting for node to initialize..."
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
# Check if node is running
|
||||||
|
if ps -p $NODE_PID > /dev/null 2>&1; then
|
||||||
|
echo -e "${GREEN}✅ Node is running!${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "📊 Recent logs:"
|
||||||
|
tail -20 "$LOG_FILE"
|
||||||
|
echo ""
|
||||||
|
echo -e "${BLUE}🔗 Connections:${NC}"
|
||||||
|
echo " RPC: http://127.0.0.1:9944"
|
||||||
|
echo " WebSocket: ws://127.0.0.1:9944"
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}📝 To insert keys, use:${NC}"
|
||||||
|
echo " ./scripts/insert-keys-validator-1.sh"
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}📝 To stop the validator:${NC}"
|
||||||
|
echo " kill $NODE_PID"
|
||||||
|
echo " # or"
|
||||||
|
echo " kill \$(cat /tmp/beta-validator-5.pid)"
|
||||||
|
else
|
||||||
|
echo -e "${RED}❌ Node failed to start${NC}"
|
||||||
|
echo "Check logs at: $LOG_FILE"
|
||||||
|
tail -50 "$LOG_FILE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Executable
+65
@@ -0,0 +1,65 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Beta Testnet Validator 6 Startup Script
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
PEZKUWI_DIR="$(dirname "$SCRIPT_DIR")"
|
||||||
|
BINARY="$PEZKUWI_DIR/target/release/pezkuwi"
|
||||||
|
BASE_PATH="/tmp/beta-validator-6"
|
||||||
|
LOG_FILE="/tmp/beta-validator-6.log"
|
||||||
|
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo -e "${BLUE}🚀 Starting Beta Testnet Validator 6${NC}"
|
||||||
|
|
||||||
|
if [ ! -f "$BINARY" ]; then
|
||||||
|
echo "Error: Pezkuwi binary not found at $BINARY"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$BASE_PATH"
|
||||||
|
|
||||||
|
echo -e "${GREEN}📡 Starting validator node...${NC}"
|
||||||
|
echo "Base path: $BASE_PATH"
|
||||||
|
echo "Log file: $LOG_FILE"
|
||||||
|
echo "P2P port: 30334"
|
||||||
|
echo "RPC port: 9945"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
nohup "$BINARY" \
|
||||||
|
--chain pezkuwichain-beta-testnet \
|
||||||
|
--base-path "$BASE_PATH" \
|
||||||
|
--validator \
|
||||||
|
--name "Validator-beta-6" \
|
||||||
|
--port 30338 \
|
||||||
|
--rpc-port 9949 \
|
||||||
|
--rpc-cors all \
|
||||||
|
--rpc-external \
|
||||||
|
--rpc-methods=Unsafe \
|
||||||
|
--unsafe-rpc-external \
|
||||||
|
--unsafe-force-node-key-generation \
|
||||||
|
--prometheus-external \
|
||||||
|
--prometheus-port 9620 \
|
||||||
|
--bootnodes "/ip4/172.31.134.70/tcp/30333/p2p/12D3KooWLdhYkAXWWR7fFSWhMmBFgHVTf78ZWaWf2BpJxzJbTqCU" \
|
||||||
|
> "$LOG_FILE" 2>&1 &
|
||||||
|
|
||||||
|
NODE_PID=$!
|
||||||
|
echo "$NODE_PID" > /tmp/beta-validator-6.pid
|
||||||
|
|
||||||
|
echo -e "${GREEN}✅ Validator started with PID: $NODE_PID${NC}"
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
if ps -p $NODE_PID > /dev/null 2>&1; then
|
||||||
|
echo -e "${GREEN}✅ Node is running!${NC}"
|
||||||
|
tail -20 "$LOG_FILE"
|
||||||
|
echo ""
|
||||||
|
echo "RPC: http://127.0.0.1:9945"
|
||||||
|
else
|
||||||
|
echo "❌ Node failed to start"
|
||||||
|
tail -50 "$LOG_FILE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Executable
+64
@@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Beta Testnet Validator 7 Startup Script
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
PEZKUWI_DIR="$(dirname "$SCRIPT_DIR")"
|
||||||
|
BINARY="$PEZKUWI_DIR/target/release/pezkuwi"
|
||||||
|
BASE_PATH="/tmp/beta-validator-7"
|
||||||
|
LOG_FILE="/tmp/beta-validator-7.log"
|
||||||
|
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo -e "${BLUE}🚀 Starting Beta Testnet Validator 7${NC}"
|
||||||
|
|
||||||
|
if [ ! -f "$BINARY" ]; then
|
||||||
|
echo "Error: Pezkuwi binary not found at $BINARY"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$BASE_PATH"
|
||||||
|
|
||||||
|
echo -e "${GREEN}📡 Starting validator node...${NC}"
|
||||||
|
echo "Base path: $BASE_PATH"
|
||||||
|
echo "Log file: $LOG_FILE"
|
||||||
|
echo "P2P port: 30335"
|
||||||
|
echo "RPC port: 9946"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
nohup "$BINARY" \
|
||||||
|
--chain pezkuwichain-beta-testnet \
|
||||||
|
--base-path "$BASE_PATH" \
|
||||||
|
--validator \
|
||||||
|
--name "Validator-beta-7" \
|
||||||
|
--port 30339 \
|
||||||
|
--rpc-port 9950 \
|
||||||
|
--rpc-cors all \
|
||||||
|
--rpc-external \
|
||||||
|
--rpc-methods=Unsafe \
|
||||||
|
--unsafe-rpc-external \
|
||||||
|
--unsafe-force-node-key-generation \
|
||||||
|
--prometheus-external \
|
||||||
|
--prometheus-port 9621 \
|
||||||
|
--bootnodes "/ip4/172.31.134.70/tcp/30333/p2p/12D3KooWLdhYkAXWWR7fFSWhMmBFgHVTf78ZWaWf2BpJxzJbTqCU" \
|
||||||
|
> "$LOG_FILE" 2>&1 &
|
||||||
|
|
||||||
|
NODE_PID=$!
|
||||||
|
echo "$NODE_PID" > /tmp/beta-validator-7.pid
|
||||||
|
|
||||||
|
echo -e "${GREEN}✅ Validator started with PID: $NODE_PID${NC}"
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
if ps -p $NODE_PID > /dev/null 2>&1; then
|
||||||
|
echo -e "${GREEN}✅ Node is running!${NC}"
|
||||||
|
tail -20 "$LOG_FILE"
|
||||||
|
echo ""
|
||||||
|
echo "RPC: http://127.0.0.1:9946"
|
||||||
|
else
|
||||||
|
echo "❌ Node failed to start"
|
||||||
|
tail -50 "$LOG_FILE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Executable
+64
@@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Beta Testnet Validator 8 Startup Script
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
PEZKUWI_DIR="$(dirname "$SCRIPT_DIR")"
|
||||||
|
BINARY="$PEZKUWI_DIR/target/release/pezkuwi"
|
||||||
|
BASE_PATH="/tmp/beta-validator-8"
|
||||||
|
LOG_FILE="/tmp/beta-validator-8.log"
|
||||||
|
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo -e "${BLUE}🚀 Starting Beta Testnet Validator 8${NC}"
|
||||||
|
|
||||||
|
if [ ! -f "$BINARY" ]; then
|
||||||
|
echo "Error: Pezkuwi binary not found at $BINARY"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$BASE_PATH"
|
||||||
|
|
||||||
|
echo -e "${GREEN}📡 Starting validator node...${NC}"
|
||||||
|
echo "Base path: $BASE_PATH"
|
||||||
|
echo "Log file: $LOG_FILE"
|
||||||
|
echo "P2P port: 30336"
|
||||||
|
echo "RPC port: 9947"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
nohup "$BINARY" \
|
||||||
|
--chain pezkuwichain-beta-testnet \
|
||||||
|
--base-path "$BASE_PATH" \
|
||||||
|
--validator \
|
||||||
|
--name "Validator-beta-8" \
|
||||||
|
--port 30340 \
|
||||||
|
--rpc-port 9951 \
|
||||||
|
--rpc-cors all \
|
||||||
|
--rpc-external \
|
||||||
|
--rpc-methods=Unsafe \
|
||||||
|
--unsafe-rpc-external \
|
||||||
|
--unsafe-force-node-key-generation \
|
||||||
|
--prometheus-external \
|
||||||
|
--prometheus-port 9622 \
|
||||||
|
--bootnodes "/ip4/172.31.134.70/tcp/30333/p2p/12D3KooWLdhYkAXWWR7fFSWhMmBFgHVTf78ZWaWf2BpJxzJbTqCU" \
|
||||||
|
> "$LOG_FILE" 2>&1 &
|
||||||
|
|
||||||
|
NODE_PID=$!
|
||||||
|
echo "$NODE_PID" > /tmp/beta-validator-8.pid
|
||||||
|
|
||||||
|
echo -e "${GREEN}✅ Validator started with PID: $NODE_PID${NC}"
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
if ps -p $NODE_PID > /dev/null 2>&1; then
|
||||||
|
echo -e "${GREEN}✅ Node is running!${NC}"
|
||||||
|
tail -20 "$LOG_FILE"
|
||||||
|
echo ""
|
||||||
|
echo "RPC: http://127.0.0.1:9947"
|
||||||
|
else
|
||||||
|
echo "❌ Node failed to start"
|
||||||
|
tail -50 "$LOG_FILE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Stop all validators on Computer 2
|
||||||
|
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo -e "${YELLOW}🛑 Stopping Computer 2 Validators...${NC}"
|
||||||
|
|
||||||
|
for i in 5 6 7 8; do
|
||||||
|
if [ -f "/tmp/beta-validator-$i.pid" ]; then
|
||||||
|
PID=$(cat /tmp/beta-validator-$i.pid)
|
||||||
|
echo -e "${GREEN}Stopping Validator $i (PID: $PID)...${NC}"
|
||||||
|
kill $PID 2>/dev/null || true
|
||||||
|
rm /tmp/beta-validator-$i.pid
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "${GREEN}✅ All validators stopped${NC}"
|
||||||
Reference in New Issue
Block a user