Solana 主網驗證者 - 快速入門

簡介

要部署 Solana 主網驗證者,您需要使用 SLV 命令列工具。 本快速入門指南介紹如何啟動和部署主網驗證者熱備節點。
您的伺服器必須全新安裝 Ubuntu 24.04 LTS。

準備裸金屬伺服器

雖然可以在 VPS 或虛擬機器(VM)上執行 Solana 節點,但要實現最佳效能和穩定執行是很有挑戰性的。Solana 官方推薦使用裸金屬伺服器。
主網驗證者應該配置為在擁堵期間也能保持穩定。 以下是基於 Solana / Agave / Firedancer 官方文件的指南。

Agave 驗證者(官方要求和建議)

SOL 要求
  • 沒有嚴格的最低 SOL 要求
  • 投票賬戶需要 0.02685864 SOL 才能免租金
  • 投票交易每天最高可花費 約 1.1 SOL
硬體要求(參考指南)
元件驗證者RPC 節點(參考)
CPU2.8GHz 以上 / AMD Gen3 以上 / Intel Ice Lake 以上 / SHA 擴充套件 / AVX216 核 / 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
本教程假設您選擇 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
 mainnet

輸入伺服器預設使用者名稱

大多數情況下,預設使用者名稱為 ubunturoot
bash
? What's the user for the server? (ubuntu) › ubuntu

輸入伺服器 IP 地址

輸入伺服器的 IP 地址。
bash
? 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
然後 SLV 將檢查與伺服器的連線。如果連線成功,將提示下一步。

選擇 Solana 驗證者型別

選擇 Solana 驗證者的型別。
bash
? Select Validator Type (firedancer-jito)
  agave
  jito
  jito-bam
  firedancer-agave
 firedancer-jito

設定佣金率

設定驗證者的佣金率。 ※ 1000 等於 10%。
bash
? 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
請將您的身份金鑰放置在 ~/.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

生成或設定 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>
驗證者節點資訊將儲存到 ~/.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

部署驗證者

確認配置後,部署將開始。
bash
slv v deploy -n mainnet -p epics-sub
bash
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 m
完成!您的 Solana 驗證者現已部署。與 Solana 網路同步需要一些時間。

除錯和監控

部署後,您可以在 Solana RPC 節點內進行除錯和監控。 您可以使用以下命令檢查 Solana RPC 節點的狀態:
bash
$ solv m
solvagave-validator -l /mnt/ledger 的別名。 此設定在 RPC 節點部署過程中新增到 ~/.profile

更改身份金鑰

部署後,您需要將未質押金鑰更改為授權的身份金鑰。
bash
slv 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 Migration