Solana เครือข่ายหลัก RPC - เริ่มงานเร็ว

แนะนํา

เพื่อใช้ Solana เครือข่ายหลัก RPCคุณจะใช้ SLV เครื่องมือบรรทัดคําสั่ง มัคคุเทศก์ที่รวดเร็วนี้อธิบายวิธีการใช้ SLV เครื่องมือบรรทัดคําสั่งที่จะใช้ Solana เครือข่ายหลัก RPC กับปลั๊กอินไกเซอร์เยลโลสโตน
คุณต้อง Ubuntu 24.4. ล้าง LTS ที่ติดตั้งอยู่บนเครื่องแม่ข่ายของคุณ.

กําลังเตรียมเซิร์ฟเวอร์ย่อย

ในขณะที่มันเป็นไปได้ที่จะเรียกใช้ Solana โปรแกรมลูกข่าย VPS หรือเครื่องเสมือน (VM), ประสบความสําเร็จสูงสุด และปฏิบัติการเสถียรนั้นท้าทาย RPC โหนดและตัวตรวจสอบโดยเฉพาะ ทํางานภายใต้เงื่อนไขการโหลดสูง ทําให้มีความสําคัญมากในการตั้งค่าสภาพแวดล้อมที่เหมาะกับเซิร์ฟเวอร์
Solana แนะนําอย่างเป็นทางการโดยใช้เซิร์ฟเวอร์แบบเสื่อ
RPC ปม ต่าง ๆ กัน มาก ขึ้น อยู่ กับ งาน ที่ มี ภาระ. มาตรฐาน RPC (ส่งทีกซ์ / Geyser gRPC) และดัชนี RPC ( การ ทํา ดัชนี เต็ม ตัว) ต่าง กัน อย่าง มาก โดย เฉพาะ อย่าง ยิ่ง ใน ความ จํา และ ข้อ เรียก ร้อง ใน การ เก็บ รักษา.
**RPC สิ่งที่ต้องการฮาร์ดแวร์ (สายข้อมูลกํากับ) ~
ส่วนประกอบRPC โหนดดัชนี RPC (อ้างอิง)
CPU24 แกน+ @ 2-8GHZ+ / AMD Gen3+ / ฟิล์มน้ําแข็งเลค+/HA ส่วนขยาย / AVX232 แกน+ (ขอแนะนํานาฬิกาสูง)
RAM512GB+1152GB+
ดิสก์NVMI Gen3 x4 หรือดีกว่า / บัญชี / เลดเจอร์ / จับภาพแนะนําการแยกแยกสมรรถนะที่มากขึ้น + การแยก TBW สูง / ขอแนะนําให้ใช้
เครือข่าย1Gbps หรือสูงกว่า1Gbps หรือสูงกว่า (แบนด์วิธมากกว่า)
ขนาด GPUไม่จําเป็นต้องใช้ไม่จําเป็นต้องใช้
หมายเหตุ: การนับค่าความเร็วนาฬิกาและผ่านเข็มนาฬิกา สําคัญกว่าการนับหลัก ดัชนี RPC อาจมีคอขาดบาดตายได้โดยหน่วยความจําและที่เก็บ ดังนั้น มั่นใจความจุเพียงพอและ ไอโอPS สูง
ถ้าต้องการทําดัชนี เราขอแนะนําให้ใช้ 768GB หรือมากกว่า และ 1152GB หรือมากกว่า เพื่อดําเนินการเสถียร
SLV โลหะ เป็น เครื่อง มือ ที่ ให้ ความ รู้ ที่ ดี ที่ สุด ใน งบ ประมาณ ของ คุณ.
เมื่อดําเนินการ slv metal list คําสั่ง, คุณสามารถหา RPC ตัวเลือกต่าง ๆ ที่ถูกปรับแต่งมาให้ Solana RPC โหนด
bash
slv metal list
? 🛡️ Select SLV BareMetal Type (APP)
  📦 APP - For Trade Bot,Testnet Validator, DApp and More!
  🚀 MV - For Solana Mainnet Validator
 🛡️⚡️ RPC - For Solana RPC Node
หากคุณยังไม่ได้ตั้งค่าเซิร์ฟเวอร์แบบว่างของคุณ โปรดตาม คู่มือการตั้งค่าเซิร์ฟเวอร์พื้นฐาน.
นอก จาก นี้ ยัง กล่าว ถึง ทรัพยากร ดัง ต่อ ไป นี้:

ดัล์ฟลิง Solana RPC โหนด

อย่างแรก, เริ่ม Solana RPC การปรับแต่ง โปรดเลือกเครือข่ายตามที่คุณต้องการ Solana เครือข่าย.
bash
slv rpc init
? Select Solana Network (mainnet)
  testnet
  devnet
 mainnet
ต่อไป, ยืนยันว่าคุณมี Solana แม่ข่ายที่เข้ากันได้กับจมูก
bash
? 🛡️ Do you have a Solana Node Compatible Server? (yes)
 yes
  no
ส่วนเสริมนี้ สันนิษฐานว่าคุณกําลังเลือก yes.

ตั้งค่าผู้ใช้และ IP ที่อยู่

ตั้งค่าผู้ใช้ของแม่ข่าย IP ที่อยู่ และเส้นทางหลักของอาร์เอสเอ
bash
? What's the user for the server? (root) › root
? Enter the server IP address › x.x.x.x
? What's the path to your RSA key? (~/.ssh/id_rsa)

ตรวจสอบขอบเขตอัตโนมัติ

ถัดไป ระบบจะส่งสัญญาณแต่ละบล็อคจากโหนดที่ปรับแต่งมาให้ตรวจสอบพื้นที่ที่อยู่ใกล้ที่สุดโดยอัตโนมัติ โดยการวัดค่าจริงของภาพ คุณสามารถเลือกขอบเขตที่เหมาะสมที่สุดได้
bash
🔍 Checking SSH connection...
✔︎ SSH connection succeeded

📍 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)...
 Singapore: 0.291 ms
 London: 154.071 ms
 Dublin: 167.267 ms
 Frankfurt: 149.081 ms
 Amsterdam: 154.501 ms
 New York: 228.624 ms
 Salt Lake City: 278.016 ms
 Tokyo: 376.816 ms

🎯 Nearest region: 🇸🇬 Singapore
   Latency: 0.291 ms
   Block Engine: https://singapore.mainnet.block-engine.jito.wtf
   Shred Receiver: 202.8.11.224:1002
   Relayer: http://singapore.mainnet.relayer.jito.wtf:8100
   NTP Server: ntp.singapore.jito.wtf

สร้างกุญแจกุญแจการแสดงตัว

ถ้าคุณไม่มีที่กดกุญแจ คุณสามารถสร้างกุญแจใหม่ได้
bash
? Do you want to create a new identity key now? (Y/n) › Yes
🔑 Generating new identity key...
 Generated Key: p3tnYqjciWz8DnjApUVDPWTEhdzdX6qvqTaRCrckSLV
 Moved Key to: ~/.slv/keys/p3tnYqjciWz8DnjApUVDPWTEhdzdX6qvqTaRCrckSLV.json

เลือก Solana CLI

เลือก Solana รุ่นของCLI
bash
? Select Solana CLI (jito)
  agave
 jito
  firedancer-agave
  firedancer-jito

เลือก RPC ชนิด

เลือก RPC สเป็ก
bash
? Select an RPC type
 Geyser gRPC
  Index RPC
  SendTx RPC
  Index RPC + gRPC
ในบทเรียนนี้ เราเลือก Geyser gRPC.

ยืนยันการปรับแต่ง

ในที่สุด ยืนยันการปรับเปลี่ยน
bash
✔︎ Success
 Inventory updated to ~/.slv/inventory.mainnet.rpcs.yml
 Successfully created solv user on p3tnYqjciWz8DnjApUVDPWTEhdzdX6qvqTaRCrckSLV
✔︎ mainnet_rpcs inventory file has been saved to ~/.slv/inventory.mainnet.rpcs.yml
Now you can deploy with:

$ slv rpc deploy -n mainnet -p p3tnYqjciWz8DnjApUVDPWTEhdzdX6qvqTaRCrckSLV
หลังจากนั้น solv ผู้ใช้ถูกสร้างจากเซิร์ฟเวอร์เปล่า และ คือ Solana RPC บันทึกการปรับแต่งเป็น ~/.slv/inventory.mainnet.rpcs.yml.

ดัล์ฟลิง Solana RPC โหนด

เมื่อคุณยืนยันการปรับแต่งแล้ว การใช้คําสั่งจะเริ่ม
bash
slv rpc deploy -n mainnet -p p3tnYqjciWz8DnjApUVDPWTEhdzdX6qvqTaRCrckSLV
bash
Your mainnet RPC Nodes Settings:
┌──────────────┬─────────────────────────────────────────────┐
 Identity Key p3tnYqjciWz8DnjApUVDPWTEhdzdX6qvqTaRCrckSLV
├──────────────┼─────────────────────────────────────────────┤
 Name p3tnYqjciWz8DnjApUVDPWTEhdzdX6qvqTaRCrckSLV
├──────────────┼─────────────────────────────────────────────┤
 IP x.x.x.x.
├──────────────┼─────────────────────────────────────────────┤
 Region singapore
├──────────────┼─────────────────────────────────────────────┤
 RPC Type Geyser gRPC
├──────────────┼─────────────────────────────────────────────┤
 Version 3.0.7-jito
└──────────────┴─────────────────────────────────────────────┘
.
.
.
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 RPC ขณะนี้มีการใช้งานโหนด มันต้องใช้เวลาในการประสานกับ Solana เครือข่าย.

การดีบั๊กและติดตาม

หลังจากดําเนินการแล้ว คุณสามารถตรวจสอบสถานะของ Solana RPC โหนดกับคําสั่งต่อไปนี้:
bash
ssh solv@<your-server-ip>
solv m
solv เป็นนามแฝงสําหรับ agave-validator -l /mnt/ledger. ค่าที่ตั้งนี้จะถูกเพิ่มเข้ากับ ~/.profile ระหว่าง RPC เชื่อมต่อเครือข่าย

SLV RPC คําสั่ง

bash
Usage:   slv rpc
Version: 0.9.700

Description:

  🛠️ Manage Solana RPC Nodes 🛠️

Options:

  -h, --help  - Show this help.

Commands:

  init                - 🚀 Initialize a new RPC node configuration
  deploy              - 📦 Deploy RPC Nodes
  list                - 📋 List RPC Nodes
  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 RPC Startup Config
  update:geyser       - ⚡️ Update Geyser Version
  start               - 🟢 Start RPC
  stop                - 🔴 Stop RPC
  restart             - ♻️ Restart RPC
  cleanup             - 🧹 Cleanup RPC - Remove Ledger/Snapshot Unnecessary Files
  get:snapshot        - 💾 Download Snapshot with aria2c
  update:allowed-ips  - 🛡️ Update allowed IPs for mainnet RPC nodes