Solana Mainnet RPC - Schnellstart

Einleitung

Um ein Solana-Mainnet RPC zu implementieren, verwenden Sie das SLV Kommandozeilentool. Diese Schnellstartanleitung erklärt, wie man mit dem SLV-Befehlszeilentool ein Solana-Mainnet RPC mit Geyser Yellowstone-Plugin bereitstellen kann.
Sie müssen Ubuntu haben 24.04 LTS sauber auf Ihrem Server installiert.

Vorbereitung eines Bare Metal Servers

Während es möglich ist, einen Solana-Client auf VPS oder virtuelle Maschine (VM) zu betreiben, ist das Erreichen einer optimalen Leistung und stabilen Betrieb schwierig. Insbesondere RPC-Knoten und Validatoren arbeiten unter hochgeladenen Bedingungen, wodurch es entscheidend ist, eine entsprechende Serverumgebung einzurichten.
Solana empfiehlt offiziell, Bare Metal-Server zu verwenden.
RPC-Knoten variieren je nach Workload stark. Standard RPC (Send Tx / Geyser gRPC) und Indexed RPC (Vollindexierung) unterscheiden sich deutlich, insbesondere bei Speicher- und Speicheranforderungen.
RPC Hardwaremeldung (Richtlinie)*
KomponenteRPC-NodeIndexed RPC (Referenz)
CPU24 cores+ @ 2,8GHz+ / AMD Gen3+ / Intel Ice Lake+ / SHA Erweiterungen / AVX232 Cores+ (hohe Uhr empfohlen)
RAM512 GB+1152 GB+
FestplattenspeicherNVMe Gen3 x4 oder besser / Accounts / Ledger / Snapshots Trennung empfohlenGrößere Kapazität + hohe TBW / Trennung empfohlen
Netzwerk1 Gbps oder höher1 Gbps oder höher (mehr Bandbreite ist bevorzugt)
GPUNicht erforderlichNicht erforderlich
Anmerkung: Taktfrequenz und effektiver Durchsatz gelten als wichtiger als Kernanzahl. Indexed RPC kann durch Speicher und Speicher Engpässe, so dass ausreichende Kapazität und hohe IOPS gewährleisten.
Wenn eine Indexierung erforderlich ist, empfehlen wir 768 GB oder mehr, und 1152 GB oder mehr für einen stabilen Betrieb.
SLV Metal bietet Bare Metal-Server, die die höchste Leistung in Ihrem Budget liefern.
Bei der Ausführung der slv metal list Befehl, Sie können die RPC Option speziell auf Solana-RPC-Knoten zugeschnitten.
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
Wenn Sie Ihren Bare Metal Server noch nicht eingerichtet haben, folgen Sie bitte der Bare Metal Server Setup Guide.
Darüber hinaus beziehen sich die folgenden Ressourcen:

Solana-RPC-Node bereitstellen

Zuerst initialisieren Sie die Solana-RPC Konfiguration. Bitte wählen Sie Netzwerk als Ihr gewünschtes Solana-Netzwerk aus.
bash
slv rpc init
? Select Solana Network (mainnet)
  testnet
  devnet
 mainnet
Als nächstes bestätigen Sie, ob Sie einen Solana Node kompatiblen Server haben.
bash
? 🛡️ Do you have a Solana Node Compatible Server? (yes)
 yes
  no
Dieses Tutorial übernimmt die Auswahl yes.

Server-Nutzer und IP-Adresse festlegen

Setzen Sie den Server-Nutzer, IP-Adresse und RSA-Schlüsselpfad.
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)

Automatische Regionserkennung

Als nächstes wird das System jede Block-Engine von Ihrem konfigurierten Knoten abschalten, um die nächste Region automatisch zu erkennen. Durch die Messung der tatsächlichen Pingwerte können Sie die optimale Region auswählen.
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

Identity Keypair generieren

Wenn Sie keine Identitäts-Schlüssel haben, können Sie eine neue generieren.
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

Wählen Sie Solana CLI

Wählen Sie die Solana CLI Version aus.
bash
? Select Solana CLI (jito)
  agave
 jito
  firedancer-agave
  firedancer-jito

Wählen Sie RPC-Typ

Wählen Sie den RPC-Typ.
bash
? Select an RPC type
 Geyser gRPC
  Index RPC
  SendTx RPC
  Index RPC + gRPC
In diesem Tutorial wählen wir Geyser gRPC.

Konfigurieren bestätigen

Schließlich bestätigen Sie die Konfiguration.
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
Danach die solv Nutzer wird auf dem nackten Metallserver erstellt und die Solana-RPC Konfiguration gespeichert wird, um ~/.slv/inventory.mainnet.rpcs.yml.

Solana-RPC-Node bereitstellen

Sobald Sie die Konfiguration bestätigen, beginnt die Bereitstellung.
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
Es ist erledigt! Ihr Solana-RPC-Knoten wird jetzt eingesetzt. Es dauert einige Zeit, um mit dem Solana-Netzwerk zu synchronisieren.

Debugging & Monitoring

Nach der Bereitstellung können Sie den Status des Solana-RPC-Knotens mit dem folgenden Befehl überprüfen:
bash
ssh solv@<your-server-ip>
solv m
solv ist ein Alias für agave-validator -l /mnt/ledger. Diese Einstellung wird hinzugefügt ~/.profile während des RPC-Knoteneinsatzes.

SLV RPC Befehle

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