Solana 主网验证者 - 快速入门
简介
要部署 Solana 主网验证者,您需要使用 SLV 命令行工具。
本快速入门指南介绍如何启动和部署主网验证者热备节点。
您的服务器必须全新安装 Ubuntu 24.04 LTS。
准备裸金属服务器
虽然可以在 VPS 或虚拟机(VM)上运行 Solana 节点,但要实现最佳性能和稳定运行是很有挑战性的。Solana 官方推荐使用裸金属服务器。
主网验证者应该配置为在拥堵期间也能保持稳定。
以下是基于 Solana / Agave / Firedancer 官方文档的指南。
Agave 验证者(官方要求和建议)
SOL 要求
- 没有严格的最低 SOL 要求
- 投票账户需要 0.02685864 SOL 才能免租金
- 投票交易每天最高可花费 约 1.1 SOL
硬件要求(参考指南)
| 组件 | 验证者 | RPC 节点(参考) |
|---|---|---|
| CPU | 2.8GHz 以上 / AMD Gen3 以上 / Intel Ice Lake 以上 / SHA 扩展 / AVX2 | 16 核 / 32 线程以上 |
| 内存 | 256GB 以上 | 512GB 以上 |
| 磁盘 | NVMe Gen3 x4 或更好 / 建议分离账户-账本-快照 | 建议更大容量 |
| GPU | 不需要 | 不需要 |
注意: 时钟频率和有效吞吐量被认为比核心数更重要。
Firedancer(Frankendancer)
Firedancer(Frankendancer)目前依赖于 Agave,
因此至少需要 Agave 推荐配置或更高。
最低配置
- 24 核 CPU @ >2.8GHz
- 256GB 内存
- 2TB NVMe(高 TBW)
推荐配置
- 32 核 CPU @ >3GHz(支持 AVX512)
- 512GB 内存(ECC)
- 账户/账本分离
- 1Gbps 或更高的网络带宽
对于性价比均衡的配置,使用 24 核 CPU 和 384GB 内存的 Agave 是一个实际的参考指南。
运行
slv v init 命令时,系统会询问您的裸金属服务器是否已设置好:bash
➜ slv v init
? Select Solana Network (testnet) › mainnet
? 🛡️ Do you have a Solana Node Compatible Server? (no)
❯ yes
no➜ slv v init
? Select Solana Network (testnet) › mainnet
? 🛡️ Do you have a Solana Node Compatible Server? (no)
❯ yes
no本教程假设您选择
yes。如果您尚未准备好裸金属服务器,请参阅裸金属服务器设置指南。
此外,您可能会发现以下资源有用:
部署 Solana 主网 Firedancer Jito 验证者
新的 SLV 部署始终使用
unstaked-keypair.json 作为身份密钥。
这是防止双重投票和其他问题的最佳实践。因此,部署后请使用
slv v set:identity 设置授权的身份密钥。在大多数主网验证者运营中,您将使用
slv v switch 来更改身份密钥。
有关零停机迁移,请参阅本指南。选择 Solana 网络
选择您要部署的 Solana 网络。
bash
slv v init
? Select Solana Network (mainnet)
testnet
❯ mainnetslv v init
? Select Solana Network (mainnet)
testnet
❯ mainnet输入服务器默认用户名
大多数情况下,默认用户名为
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设置佣金率
设置验证者的佣金率。
※ 1000 等于 10%。
bash
? Enter Commission BPS (Max 1000 = 10%) (1000)? Enter Commission BPS (Max 1000 = 10%) (1000)生成或设置 Solana 验证者身份密钥
您可以生成新的身份密钥或设置现有的身份密钥。
此示例展示如何使用名为 "epics-sub" 的现有身份密钥。
bash
? Do you want to create a new identity key now? (Y/n) › No
? Please Enter Your Identity Public Key › KTMkUG8WCw9FdH44jLMBpc1teGafnYL6SgP4fHHbsNM
? Enter Inventory Name (KTMkUG8WCw9FdH44jLMBpc1teGafnYL6SgP4fHHbsNM) › epics-sub
⚠️ Please place your identity key in
~/.slv/keys/KTMkUG8WCw9FdH44jLMBpc1teGafnYL6SgP4fHHbsNM.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 › KTMkUG8WCw9FdH44jLMBpc1teGafnYL6SgP4fHHbsNM
? Enter Inventory Name (KTMkUG8WCw9FdH44jLMBpc1teGafnYL6SgP4fHHbsNM) › epics-sub
⚠️ Please place your identity key in
~/.slv/keys/KTMkUG8WCw9FdH44jLMBpc1teGafnYL6SgP4fHHbsNM.json
.
.
✔︎ Success
✔ Inventory updated to ~/.slv/inventory.yml
✔ Successfully created solv user on x.x.x.x请将您的身份密钥放置在
~/.slv/keys/<your-pubkey>.json。自动区域检测
接下来,系统将从您配置的节点 ping 每个区块引擎,以自动检测最近的区域。通过测量实际 ping 值,您可以选择最优区域。
bash
✔ Inventory updated to ~/.slv/inventory.mainnet.validators.yml
📍 Measuring latencies from x.x.x.x to mainnet regions...
Pinging Amsterdam (amsterdam.mainnet.block-engine.jito.wtf)...
Pinging Dublin (dublin.mainnet.block-engine.jito.wtf)...
Pinging Frankfurt (frankfurt.mainnet.block-engine.jito.wtf)...
Pinging London (london.mainnet.block-engine.jito.wtf)...
Pinging New York (ny.mainnet.block-engine.jito.wtf)...
Pinging Salt Lake City (slc.mainnet.block-engine.jito.wtf)...
Pinging Singapore (singapore.mainnet.block-engine.jito.wtf)...
Pinging Tokyo (tokyo.mainnet.block-engine.jito.wtf)...
✅ London: 8.801 ms
✅ Dublin: 12.946 ms
✅ Frankfurt: 5.888 ms
✅ Amsterdam: 0.169 ms
✅ New York: 74.321 ms
✅ Salt Lake City: 115.577 ms
✅ Singapore: 154.200 ms
✅ Tokyo: 229.989 ms
🎯 Nearest region: 🇳🇱 Amsterdam
Latency: 0.169 ms
Block Engine: https://amsterdam.mainnet.block-engine.jito.wtf
Shred Receiver: 74.118.140.240:1002
Relayer: http://amsterdam.mainnet.relayer.jito.wtf:8100
NTP Server: ntp.amsterdam.jito.wtf✔ Inventory updated to ~/.slv/inventory.mainnet.validators.yml
📍 Measuring latencies from x.x.x.x to mainnet regions...
Pinging Amsterdam (amsterdam.mainnet.block-engine.jito.wtf)...
Pinging Dublin (dublin.mainnet.block-engine.jito.wtf)...
Pinging Frankfurt (frankfurt.mainnet.block-engine.jito.wtf)...
Pinging London (london.mainnet.block-engine.jito.wtf)...
Pinging New York (ny.mainnet.block-engine.jito.wtf)...
Pinging Salt Lake City (slc.mainnet.block-engine.jito.wtf)...
Pinging Singapore (singapore.mainnet.block-engine.jito.wtf)...
Pinging Tokyo (tokyo.mainnet.block-engine.jito.wtf)...
✅ London: 8.801 ms
✅ Dublin: 12.946 ms
✅ Frankfurt: 5.888 ms
✅ Amsterdam: 0.169 ms
✅ New York: 74.321 ms
✅ Salt Lake City: 115.577 ms
✅ Singapore: 154.200 ms
✅ Tokyo: 229.989 ms
🎯 Nearest region: 🇳🇱 Amsterdam
Latency: 0.169 ms
Block Engine: https://amsterdam.mainnet.block-engine.jito.wtf
Shred Receiver: 74.118.140.240:1002
Relayer: http://amsterdam.mainnet.relayer.jito.wtf:8100
NTP Server: ntp.amsterdam.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.mainnet.validators.yml。bash
✔︎ Success
✔ Inventory updated to ~/.slv/inventory.mainnet.validators.yml
✔ Successfully created solv user on epics-sub
✔︎ Validator Mainnet Config Saved To ~/.slv/inventory.mainnet.validators.yml
Now you can deploy with:
$ slv v deploy -n mainnet -p epics-sub✔︎ Success
✔ Inventory updated to ~/.slv/inventory.mainnet.validators.yml
✔ Successfully created solv user on epics-sub
✔︎ Validator Mainnet Config Saved To ~/.slv/inventory.mainnet.validators.yml
Now you can deploy with:
$ slv v deploy -n mainnet -p epics-sub部署验证者
确认配置后,部署将开始。
bash
slv v deploy -n mainnet -p epics-subslv v deploy -n mainnet -p epics-subbash
Your Mainnet Validators Settings:
┌────────────────┬──────────────────────────────────────────────┐
│ Identity Key │ KTMkUG8WCw9FdH44jLMBpc1teGafnYL6SgP4fHHbsNM │
├────────────────┼──────────────────────────────────────────────┤
│ Vote Key │ EpicsoqLdDP8qRn3wQRKTSKAXbjK9dUgFfNPRQS77MQD │
├────────────────┼──────────────────────────────────────────────┤
│ Authority Key │ authAccount │
├────────────────┼──────────────────────────────────────────────┤
│ IP │ x.x.x.x │
├────────────────┼──────────────────────────────────────────────┤
│ Validator Type │ firedancer-jito │
├────────────────┼──────────────────────────────────────────────┤
│ Version │ 0.712.30006 │
└────────────────┴──────────────────────────────────────────────┘
? Do you want to continue? (Y/n) › Yes
.
.
.
Successfully Deployed RPC on mainnet
⚡️⚡️⚡️ Enhanced Solana RPC Connection API Key ⚡️⚡️⚡️
We're excited to offer a free API key exclusively for the Validators DAO community 🎉
It's our way of supporting the community and empowering you with fast, reliable connections.
To get your Free API key, simply join us through the link below:
Validators DAO: `https://discord.gg/X4BgkBHavp`
Unlock fast connections and elevate your experience with your very own API key 🚀
You can monitor your Node with the following steps:
Log in to your server with SSH:
ssh [email protected]
Then, run the following command to monitor your node:
$ solv mYour Mainnet Validators Settings:
┌────────────────┬──────────────────────────────────────────────┐
│ Identity Key │ KTMkUG8WCw9FdH44jLMBpc1teGafnYL6SgP4fHHbsNM │
├────────────────┼──────────────────────────────────────────────┤
│ Vote Key │ EpicsoqLdDP8qRn3wQRKTSKAXbjK9dUgFfNPRQS77MQD │
├────────────────┼──────────────────────────────────────────────┤
│ Authority Key │ authAccount │
├────────────────┼──────────────────────────────────────────────┤
│ IP │ x.x.x.x │
├────────────────┼──────────────────────────────────────────────┤
│ Validator Type │ firedancer-jito │
├────────────────┼──────────────────────────────────────────────┤
│ Version │ 0.712.30006 │
└────────────────┴──────────────────────────────────────────────┘
? Do you want to continue? (Y/n) › Yes
.
.
.
Successfully Deployed RPC on mainnet
⚡️⚡️⚡️ Enhanced Solana RPC Connection API Key ⚡️⚡️⚡️
We're excited to offer a free API key exclusively for the Validators DAO community 🎉
It's our way of supporting the community and empowering you with fast, reliable connections.
To get your Free API key, simply join us through the link below:
Validators DAO: `https://discord.gg/X4BgkBHavp`
Unlock fast connections and elevate your experience with your very own API key 🚀
You can monitor your Node with the following steps:
Log in to your server with SSH:
ssh [email protected]
Then, run the following command to monitor your node:
$ solv m完成!您的 Solana 验证者现已部署。与 Solana 网络同步需要一些时间。
调试和监控
部署后,您可以在 Solana RPC 节点内进行调试和监控。
您可以使用以下命令检查 Solana RPC 节点的状态:
bash
$ solv m$ solv msolv 是 agave-validator -l /mnt/ledger 的别名。
此设置在 RPC 节点部署过程中添加到 ~/.profile。更改身份密钥
部署后,您需要将未质押密钥更改为授权的身份密钥。
bash
slv v set:identity -n mainnet --pubkey epics-subslv v set:identity -n mainnet --pubkey epics-sub此命令将把身份密钥更改为授权的身份密钥。
※ 有关零停机迁移,请参阅此指南。
SLV 验证者命令
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