Solana Mainnet Validator - Bắt đầu nhanh
Giới thiệu
Để triển khai Solana mainnet validator, bạn sẽ sử dụng công cụ dòng lệnh SLV.
Hướng dẫn bắt đầu nhanh này giải thích cách khởi chạy và triển khai mainnet validator hot spare.
Bạn phải cài đặt sạch Ubuntu 24.04 LTS trên máy chủ.
Chuẩn bị máy chủ Baremetal
Mặc dù có thể chạy Solana node trên VPS hoặc máy ảo (VM), việc đạt hiệu suất tối ưu và vận hành ổn định là thách thức. Solana chính thức khuyến nghị sử dụng máy chủ baremetal.
Mainnet validator nên được cung cấp để giữ ổn định trong tình trạng tắc nghẽn.
Dưới đây là hướng dẫn dựa trên tài liệu chính thức của Solana / Agave / Firedancer.
Agave Validator (yêu cầu và khuyến nghị chính thức)
Yêu cầu SOL
- Không có yêu cầu SOL tối thiểu nghiêm ngặt
- Vote Account cần 0.02685864 SOL để được miễn rent
- Giao dịch voting có thể tốn lên đến ~1.1 SOL / ngày
Yêu cầu phần cứng (hướng dẫn)
| Thành phần | Validator | RPC Node (tham khảo) |
|---|---|---|
| CPU | 2.8GHz+ / AMD Gen3+ / Intel Ice Lake+ / SHA extensions / AVX2 | 16 core / 32 thread+ |
| RAM | 256GB+ | 512GB+ |
| Ổ đĩa | NVMe Gen3 x4 trở lên / Khuyến nghị tách Accounts-Ledger-Snapshots | Dung lượng lớn hơn khuyến nghị |
| GPU | Không cần thiết | Không cần thiết |
Lưu ý: Xung nhịp và thông lượng hiệu quả được coi là quan trọng hơn số lượng core.
Firedancer (Frankendancer)
Firedancer (Frankendancer) hiện phụ thuộc vào Agave,
nên tối thiểu phải đáp ứng cấu hình khuyến nghị của Agave hoặc cao hơn.
Tối thiểu
- CPU 24 core @ >2.8GHz
- 256GB RAM
- 2TB NVMe (TBW cao)
Khuyến nghị
- CPU 32 core @ >3GHz (hỗ trợ AVX512)
- 512GB RAM (ECC)
- Tách Accounts / Ledger
- Băng thông mạng 1Gbps trở lên
Để cân bằng chi phí-hiệu suất, Agave với CPU 24 core và 384GB RAM là hướng dẫn thực tế.
Khi bạn chạy lệnh
slv v init, bạn sẽ được hỏi liệu máy chủ baremetal đã sẵn sàng chưa: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
noHướng dẫn này giả sử bạn chọn
yes.Nếu bạn chưa chuẩn bị máy chủ baremetal, vui lòng tham khảo Hướng dẫn thiết lập Baremetal Server.
Ngoài ra, các tài nguyên sau có thể hữu ích:
Triển khai Solana Mainnet Firedancer Jito Validator
Các triển khai SLV mới luôn sử dụng
unstaked-keypair.json làm identity key.
Đây là best practice để ngăn double voting và các vấn đề khác.Do đó, sau khi triển khai, vui lòng sử dụng
slv v set:identity để thiết lập identity key được ủy quyền.Trong hầu hết các hoạt động mainnet validator, bạn sẽ sử dụng
slv v switch để thay đổi identity key.
Để di chuyển không downtime, vui lòng tham khảo hướng dẫn này.Chọn mạng Solana
Chọn mạng Solana bạn muốn triển khai.
bash
slv v init
? Select Solana Network (mainnet)
testnet
❯ mainnetslv v init
? Select Solana Network (mainnet)
testnet
❯ mainnetNhập username mặc định của máy chủ
Thông thường, username mặc định là
ubuntu hoặc root.bash
? What's the user for the server? (ubuntu) › ubuntu? What's the user for the server? (ubuntu) › ubuntuNhập địa chỉ IP máy chủ
Nhập địa chỉ IP của máy chủ.
bash
? What's the IP address of the server? ›? What's the IP address of the server? ›Thiết lập RSA Key cho SSH
※ Vui lòng thiết lập đường dẫn đến RSA key. Đường dẫn mặc định là
~/.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 succeededSau đó SLV sẽ kiểm tra kết nối đến máy chủ. Nếu kết nối thành công, bước tiếp theo sẽ được hiển thị.
Chọn loại Solana Validator
Chọn loại Solana validator.
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-jitoThiết lập tỷ lệ Commission
Thiết lập tỷ lệ commission cho validator của bạn.
※ 1000 tương đương 10%.
bash
? Enter Commission BPS (Max 1000 = 10%) (1000)? Enter Commission BPS (Max 1000 = 10%) (1000)Tạo hoặc thiết lập Solana Validator Identity Key
Bạn có thể tạo identity key mới hoặc thiết lập identity key hiện có.
Ví dụ này cho thấy cách thiết lập identity key hiện có với tên "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.xVui lòng đặt identity key tại
~/.slv/keys/<your-pubkey>.json.Phát hiện khu vực tự động
Tiếp theo, hệ thống sẽ ping từng block engine từ node đã cấu hình để tự động phát hiện khu vực gần nhất. Bằng cách đo giá trị ping thực tế, bạn có thể chọn khu vực tối ưu.
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.wtfTạo hoặc thiết lập Solana Validator Vote Account Key
Bạn có thể tạo vote account key mới hoặc thiết lập vote account key hiện có.
Ví dụ này cho thấy cách thiết lập vote account key hiện có.
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>Thông tin node validator sẽ được lưu vào
~/.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-subTriển khai Validator
Sau khi xác nhận cấu hình, quá trình triển khai sẽ bắt đầu.
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 mainnetYour 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 mainnetHoàn tất! Solana Validator của bạn đã được triển khai. Sẽ mất một thời gian để đồng bộ với mạng Solana.
Gỡ lỗi & Giám sát
Sau khi triển khai, bạn có thể gỡ lỗi và giám sát trong Solana RPC node.
Bạn có thể kiểm tra trạng thái Solana RPC node bằng các lệnh sau:
bash
$ solv m$ solv msolv là alias cho agave-validator -l /mnt/ledger.
Thiết lập này được thêm vào ~/.profile trong quá trình triển khai RPC node.Thay đổi Identity Key
Sau khi triển khai, bạn cần thay đổi unstaked key sang identity key được ủy quyền.
bash
slv v set:identity -n mainnet --pubkey epics-subslv v set:identity -n mainnet --pubkey epics-subLệnh này sẽ thay đổi identity key sang identity key được ủy quyền.
※ Để di chuyển không downtime, vui lòng tham khảo hướng dẫn này.
Các lệnh SLV Validator
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