Solana 测试网验证者 - 快速入门
安装与验证者启动
bash
curl -fsSL https://storage.slv.dev/slv/install | sh
slv validator init
slv validator deploycurl -fsSL https://storage.slv.dev/slv/install | sh
slv validator init
slv validator deploy部署 Solana 测试网 Firedancer 验证者
🚀 前提条件
请准备一台全新安装了 Ubuntu 24.04 LTS 的服务器。
🔑 关于密钥处理
对于新的 SLV Firedancer 部署,出于安全考虑,unstaked-keypair.json 始终作为初始身份密钥使用。
这是防止双重投票等严重问题的最佳实践。
✅ 部署后的身份设置
部署后,请务必使用以下命令设置授权身份密钥:
bash
slv v set:identity -n testnet --pubkey <name>slv v set:identity -n testnet --pubkey <name>为测试网准备裸金属服务器
虽然可以在 VPS 或虚拟机(VM)上运行 Solana 节点,但在实践中实现最佳性能和稳定性具有挑战性。Solana 官方推荐使用裸金属服务器,其性能远高于虚拟化环境。
由于测试网环境的负载低于主网,我们已确认使用配备 16 核 Ryzen CPU 和 128GB DDR5 内存的服务器可以稳定运行。使用此服务器配置有助于降低运营成本,因此推荐使用。
运行
slv v init 命令时,系统会询问您的裸金属服务器是否已准备就绪:bash
➜ slv v init
? Select Solana Network (testnet) › testnet
? 🛡️ Do you have a Solana Node Compatible Server? (no)
❯ yes
no➜ slv v init
? Select Solana Network (testnet) › testnet
? 🛡️ Do you have a Solana Node Compatible Server? (no)
❯ yes
no本教程假设您选择
yes。如果您尚未准备裸金属服务器,请参阅裸金属服务器设置指南完成设置。
输入服务器默认用户名
大多数情况下,默认用户名为
ubuntu 或 root。bash
? What's the user for the server? (ubuntu) › ubuntu? What's the user for the server? (ubuntu) › ubuntu输入服务器 IP 地址
输入服务器的 IP 地址。
bash
? What's the IP address of the server? ›? What's the IP address of the server? ›设置 SSH RSA 密钥
※ 请设置 RSA 密钥的路径。默认路径为
~/.ssh/id_rsa。
目前仅支持默认路径,请保持原样设置。bash
? What's the path to your RSA key? (~/.ssh/id_rsa) › ~/.ssh/id_rsa
🔍 Checking SSH connection...
✔︎ SSH connection succeeded? What's the path to your RSA key? (~/.ssh/id_rsa) › ~/.ssh/id_rsa
🔍 Checking SSH connection...
✔︎ SSH connection succeeded然后 SLV 将检查与服务器的连接。如果连接成功,将提示下一步。
选择 Solana 验证者类型
选择 Solana 验证者的类型。
bash
? Select Validator Type (firedancer-jito)
agave
jito
jito-bam
firedancer-agave
❯ firedancer-jito? Select Validator Type (firedancer-jito)
agave
jito
jito-bam
firedancer-agave
❯ firedancer-jito生成或设置 Solana 验证者身份密钥
您可以生成新的身份密钥或设置现有的身份密钥。
此示例展示如何使用名称 "epics-test" 设置现有身份密钥。
bash
? Do you want to create a new identity key now? (Y/n) › No
? Please Enter Your Identity Public Key › TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp
? Enter Inventory Name (TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp) › epics-test
⚠️ Please place your identity key in
~/.slv/keys/TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp.json
.
.
✔︎ Success
✔ Inventory updated to ~/.slv/inventory.yml
✔ Successfully created solv user on x.x.x.x? Do you want to create a new identity key now? (Y/n) › No
? Please Enter Your Identity Public Key › TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp
? Enter Inventory Name (TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp) › epics-test
⚠️ Please place your identity key in
~/.slv/keys/TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp.json
.
.
✔︎ Success
✔ Inventory updated to ~/.slv/inventory.yml
✔ Successfully created solv user on x.x.x.x请将您的身份密钥放置在
~/.slv/keys/<your-pubkey>.json。然后,SLV 将使用密码创建 solv 用户。自动区域检测
接下来,系统将从您配置的节点向每个区块引擎发送 ping,以自动检测最近的区域。通过测量实际 ping 值,您可以选择最佳区域。
bash
📍 Measuring latencies from x.x.x.x to testnet regions...
Pinging Dallas (dallas.testnet.block-engine.jito.wtf)...
Pinging New York (ny.testnet.block-engine.jito.wtf)...
✅ New York: 74.341 ms
✅ Dallas: 114.722 ms
🎯 Nearest region: 🇺🇸 New York
Latency: 74.341 ms
Block Engine: https://ny.testnet.block-engine.jito.wtf
Shred Receiver: 64.130.35.224:1002
Relayer: http://ny.testnet.relayer.jito.wtf:8100
NTP Server: ntp.dallas.jito.wtf📍 Measuring latencies from x.x.x.x to testnet regions...
Pinging Dallas (dallas.testnet.block-engine.jito.wtf)...
Pinging New York (ny.testnet.block-engine.jito.wtf)...
✅ New York: 74.341 ms
✅ Dallas: 114.722 ms
🎯 Nearest region: 🇺🇸 New York
Latency: 74.341 ms
Block Engine: https://ny.testnet.block-engine.jito.wtf
Shred Receiver: 64.130.35.224:1002
Relayer: http://ny.testnet.relayer.jito.wtf:8100
NTP Server: ntp.dallas.jito.wtf生成或设置 Solana 验证者投票账户密钥
您可以生成新的投票账户密钥或设置现有的投票账户密钥。
此示例展示如何设置现有的投票账户密钥。
bash
? Do you want to create a new vote account key now? (Y/n) › No
? Please Enter Your Vote Account Public Key > <your-vote-account>? Do you want to create a new vote account key now? (Y/n) › No
? Please Enter Your Vote Account Public Key > <your-vote-account>配置现已保存到
~/.slv/inventory.testnet.validators.yml。部署验证者
确认配置后,部署将开始。
bash
slv v deploy -n testnetslv v deploy -n testnet首先会显示配置确认信息。
选择 Yes 继续。
bash
Your Testnet Validators Settings:
┌────────────────┬──────────────────────────────────────────────┐
│ Identity Key │ TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp │
├────────────────┼──────────────────────────────────────────────┤
│ Vote Key │ 6XdQ6szHJjm1t3XbgahSS6WVEhsrs5fniZbLgfkN1QWn │
├────────────────┼──────────────────────────────────────────────┤
│ Authority Key │ authAccount │
├────────────────┼──────────────────────────────────────────────┤
│ IP │ x.x.x.x. │
├────────────────┼──────────────────────────────────────────────┤
│ Validator Type │ jito │
├────────────────┼──────────────────────────────────────────────┤
│ Version │ 3.0.7-jito │
└────────────────┴──────────────────────────────────────────────┘
? Do you want to continue? (Y/n) › YesYour Testnet Validators Settings:
┌────────────────┬──────────────────────────────────────────────┐
│ Identity Key │ TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp │
├────────────────┼──────────────────────────────────────────────┤
│ Vote Key │ 6XdQ6szHJjm1t3XbgahSS6WVEhsrs5fniZbLgfkN1QWn │
├────────────────┼──────────────────────────────────────────────┤
│ Authority Key │ authAccount │
├────────────────┼──────────────────────────────────────────────┤
│ IP │ x.x.x.x. │
├────────────────┼──────────────────────────────────────────────┤
│ Validator Type │ jito │
├────────────────┼──────────────────────────────────────────────┤
│ Version │ 3.0.7-jito │
└────────────────┴──────────────────────────────────────────────┘
? Do you want to continue? (Y/n) › Yes完成!您的 Solana 验证者现已部署。与 Solana 网络同步需要一些时间。
调试与监控
部署后,您可以在 Solana RPC 节点内进行调试和监控。
您可以使用以下命令检查 Solana RPC 节点的状态:
bash
$ solv m$ solv msolv 是 agave-validator -l /mnt/ledger 的别名。
此设置在 RPC 节点部署期间添加到 ~/.profile 中。更改身份密钥
部署后,您需要将未质押密钥更改为授权身份密钥。
bash
slv v set:identity -n testnet --pubkey epics-testslv v set:identity -n testnet --pubkey epics-test此命令将从您本地计算机上的以下位置设置身份密钥:
~/.slv/keys/<name>.json重启 Firedancer
如果验证者出现任何问题,您可以使用以下命令重启 Firedancer。
--rm 选项将停止验证者,删除账本和快照目录,使用快照查找器下载快照,然后启动验证者。bash
slv v restart -n testnet --pubkey <name> --rmslv v restart -n testnet --pubkey <name> --rmSLV 验证者命令
bash
slv validator --help
Usage: slv validator
Version: 0.9.700
Description:
🛠️ Manage Solana Validator Nodes 🛠️
Options:
-h, --help - Show this help.
Commands:
init - 🚀 Initialize a new validator configuration
deploy - 📦 Deploy Validators
list - 📋 List validators
set:identity - 🪪 Set Validator Identity
set:unstaked - 📴 Set Validator Identity to Unstaked Key
setup:firedancer - 🔥 Setup/Update Firedancer Validator
update:firedancer - 🔄 Update Firedancer Version
build:solana-cli - 🛠️ Build Solana CLI from Source
install:solana - ➡️ Install Solana CLI Binary
update:script - ⚙️ Update Validator Startup Config
update:jinja - 🧩 Update Jinja Template
start - 🟢 Start Validator
stop - 🔴 Stop Validator
restart - ♻️ Restart Validator
cleanup - 🧹 Cleanup Validator - Remove Ledger/Snapshot Unnecessary Files
get:snapshot - 💾 Download Snapshot with aria2c
gen:vote-account - 🗳️ Generate Vote Account
switch - 🔁 Switch Validator Identity - No DownTime Migrationslv validator --help
Usage: slv validator
Version: 0.9.700
Description:
🛠️ Manage Solana Validator Nodes 🛠️
Options:
-h, --help - Show this help.
Commands:
init - 🚀 Initialize a new validator configuration
deploy - 📦 Deploy Validators
list - 📋 List validators
set:identity - 🪪 Set Validator Identity
set:unstaked - 📴 Set Validator Identity to Unstaked Key
setup:firedancer - 🔥 Setup/Update Firedancer Validator
update:firedancer - 🔄 Update Firedancer Version
build:solana-cli - 🛠️ Build Solana CLI from Source
install:solana - ➡️ Install Solana CLI Binary
update:script - ⚙️ Update Validator Startup Config
update:jinja - 🧩 Update Jinja Template
start - 🟢 Start Validator
stop - 🔴 Stop Validator
restart - ♻️ Restart Validator
cleanup - 🧹 Cleanup Validator - Remove Ledger/Snapshot Unnecessary Files
get:snapshot - 💾 Download Snapshot with aria2c
gen:vote-account - 🗳️ Generate Vote Account
switch - 🔁 Switch Validator Identity - No DownTime Migration