forked from huiskylabs/solana-validator-switch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
137 lines (118 loc) · 6.03 KB
/
config.example.yaml
File metadata and controls
137 lines (118 loc) · 6.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Solana Validator Switch CLI Configuration
#
# Copy this file to config.yaml and update with your validator details.
# This tool manages automatic switching between two validator nodes.
#
# IMPORTANT: Keep this file secure as it contains paths to your validator keys!
# Move and rename this file to ~/.solana-validator-switch/config.yaml
version: "1.0.0"
validators:
# You can define multiple validator pairs if you manage multiple validators
# Each validator pair shares the same vote account and identity
- votePubkey: YOUR_VOTE_ACCOUNT_PUBKEY_HERE
identityPubkey: YOUR_VALIDATOR_IDENTITY_PUBKEY_HERE
# RPC endpoint for monitoring validator status
# Options:
# - https://api.mainnet-beta.solana.com (public)
# - https://api.testnet.solana.com (testnet)
# - Your private RPC endpoint
rpc: https://api.mainnet-beta.solana.com
# Define exactly 2 nodes for active/standby switching
# The order doesn't matter - active node is determined at runtime
nodes:
# First node configuration
- label: validator-node-1 # Human-readable label for this node
host: 10.0.0.1 # IP address or hostname
port: 22 # SSH port (default: 22)
user: solana # SSH username
# sshKeyPath: /Users/myuser/.ssh/id_rsa # Optional: SSH key path (auto-detected if not specified)
# Paths on the remote validator node
# Update these to match your validator setup
paths:
# Path to funded validator identity keypair
fundedIdentity: /home/solana/keypairs/funded-validator-keypair.json
# Path to unfunded validator identity keypair
unfundedIdentity: /home/solana/keypairs/unfunded-validator-keypair.json
# Path to vote account keypair
voteKeypair: /home/solana/keypairs/vote-account-keypair.json
# REQUIRED: Path to Solana CLI executable
solanaCliPath: /home/solana/solana/bin/solana
# OPTIONAL: Path to Agave validator executable (set this if using Agave/Jito)
# agaveValidatorPath: /home/solana/solana/bin/agave-validator
# OPTIONAL: Path to fdctl executable (set this if using Firedancer)
# fdctlPath: /home/solana/firedancer/bin/fdctl
# Note: The following paths are automatically detected from running processes:
# - ledger path
# - tower file location
# Second node configuration
- label: validator-node-2
host: 10.0.0.2
port: 22
user: solana
# sshKeyPath: /Users/myuser/.ssh/id_rsa # Optional: SSH key path (auto-detected if not specified)
paths:
fundedIdentity: /home/solana/keypairs/funded-validator-keypair.json
unfundedIdentity: /home/solana/keypairs/unfunded-validator-keypair.json
voteKeypair: /home/solana/keypairs/vote-account-keypair.json
solanaCliPath: /home/solana/solana/bin/solana
# agaveValidatorPath: /home/solana/solana/bin/agave-validator
# fdctlPath: /home/solana/firedancer/bin/fdctl
# Alert configuration (optional)
# Sends alerts when validators stop voting for a specified time
alert_config:
enabled: true
delinquency_threshold_seconds: 30 # CRITICAL: Alert after 30 seconds without voting
ssh_failure_threshold_seconds: 1800 # LOW PRIORITY: Alert after 30 minutes of SSH failures
rpc_failure_threshold_seconds: 1800 # LOW PRIORITY: Alert after 30 minutes of RPC failures
# Note: Alert cooldown periods to prevent spam:
# - Delinquency alerts: 15-minute cooldown (high severity)
# - SSH/RPC failure alerts: 30-minute cooldown (low severity)
# - Timer resets on successful connection (no accumulation of old failures)
# ============================================================================
# AUTOMATIC FAILOVER CONFIGURATION (USE WITH EXTREME CAUTION!)
# ============================================================================
# ⚠️ WARNING: This feature performs AUTOMATIC validator switching!
# ⚠️ CRITICAL: Read all safety requirements before enabling!
# ============================================================================
# Enable automatic failover when validator stops voting (default: false)
# CRITICAL SAFETY REQUIREMENT:
# When auto-failover is enabled, ALL validators MUST be configured to start
# with UNFUNDED identity to prevent double-signing after unexpected restarts!
#
# For Agave/Jito: Use --identity /path/to/unfunded-validator-keypair.json
# For Firedancer: Set identity_path in config to unfunded keypair
auto_failover_enabled: false
# Telegram configuration (optional)
# To set up Telegram alerts:
# 1. Create a bot via @BotFather on Telegram
# 2. Get your bot token from @BotFather
# 3. Add the bot to a group/channel or start a chat with it
# 4. Get your chat ID (see: https://stackoverflow.com/a/32572159)
telegram:
bot_token: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
chat_id: "-1001234567890" # Negative for groups/channels, positive for private chats
# Example: Multiple validator pairs (uncomment if needed)
# - votePubkey: SECOND_VOTE_ACCOUNT_PUBKEY
# identityPubkey: SECOND_VALIDATOR_IDENTITY_PUBKEY
# rpc: https://api.mainnet-beta.solana.com
# nodes:
# - label: second-validator-node-1
# host: 10.0.1.1
# port: 22
# user: solana
# paths:
# fundedIdentity: /home/solana/.secrets/funded-validator-keypair.json
# unfundedIdentity: /home/solana/.secrets/unfunded-validator-keypair.json
# voteKeypair: /home/solana/.secrets/vote-account-keypair.json
# - label: second-validator-node-2
# host: 10.0.1.2
# port: 22
# user: solana
# paths:
# fundedIdentity: /home/solana/.secrets/funded-validator-keypair.json
# unfundedIdentity: /home/solana/.secrets/unfunded-validator-keypair.json
# voteKeypair: /home/solana/.secrets/vote-account-keypair.json
# SSH key authentication notes:
# - The tool will automatically detect your SSH keys
# - Tries common locations: ~/.ssh/id_rsa, ~/.ssh/id_ed25519, etc.
# - Ensure SSH key authentication is set up for both nodes