Solana Mainnet RPC - Inicio rápido

Introducción

Para desplegar un RPC de Solana mainnet, utilizará la herramienta de línea de comandos SLV. Esta guía de inicio rápido explica cómo utilizar la herramienta de línea de comandos SLV para desplegar un RPC de Solana mainnet con plugin Geyser Yellowstone.
Su servidor debe tener una instalación limpia de Ubuntu 24.04 LTS.

Preparación de un servidor bare metal

Aunque es posible ejecutar un cliente de Solana en un VPS o en una máquina virtual (VM), lograr un rendimiento óptimo y un funcionamiento estable es difícil. En particular, los nodos RPC y los validadores operan en condiciones de alta carga, por lo que es fundamental preparar un entorno de servidor adecuado.
Solana recomienda oficialmente usar servidores bare metal.
Los nodos RPC varían mucho según la carga de trabajo.
El RPC estándar (SendTx / Geyser gRPC) y el RPC indexado (indexación completa) difieren significativamente, sobre todo en los requisitos de memoria y almacenamiento.
Requisitos de hardware para RPC (orientativos)
ComponenteNodo RPCRPC indexado (referencia)
CPU24 núcleos+ @ 2.8GHz+ / AMD Gen3+ / Intel Ice Lake+ / extensiones SHA / AVX232 núcleos+ (se recomienda una frecuencia de reloj alta)
RAM512GB+1152GB+
DiscoNVMe Gen3 x4 o superior / se recomienda separar cuentas / ledger / instantáneasMayor capacidad + TBW alto / se recomienda separar
Red1Gbps o superior1Gbps o superior (más ancho de banda es preferible)
GPUNo se requiereNo se requiere
Nota:
La velocidad de reloj y el rendimiento efectivo se consideran más importantes que el número de núcleos.
El RPC indexado puede sufrir cuellos de botella de memoria y almacenamiento, así que asegúrese de contar con capacidad suficiente y altos IOPS.
Si se requiere indexación, recomendamos 768GB o más, y 1152 GB o más para una operación estable.
SLV Metal proporciona servidores bare metal diseñados para ofrecer el máximo rendimiento dentro de su presupuesto.
Al ejecutar el comando slv metal list, encontrará la opción RPC, adaptada específicamente a los nodos RPC de Solana.
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
Si aún no ha configurado su servidor bare metal, siga la Guía de configuración del servidor bare metal.
Además, consulte los siguientes recursos:

Desplegar el nodo RPC de Solana

Primero, inicialice la configuración de Solana RPC. Por favor seleccione la red como su red Solana deseada.
bash
slv rpc init
? Select Solana Network (mainnet)
  testnet
  devnet
❯ mainnet
A continuación, confirme si tiene un servidor compatible con Nodo Solana.
bash
? 🛡️ Do you have a Solana Node Compatible Server? (yes)
❯ yes
  no
Este tutorial supone que usted selecciona yes.

Establecer usuario del servidor y dirección IP

Establezca el usuario del servidor, la dirección IP y la ruta de la clave RSA.
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)

Detección automática de la región

A continuación, el sistema hace ping a cada block engine desde su nodo configurado para detectar automáticamente la región más cercana. Al medir los valores reales de ping, puede seleccionar la región óptima.
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

Generar el par de claves de identidad

Si no tiene un par de claves de identidad, puede generar uno nuevo.
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

Seleccionar Solana CLI

Seleccione la versión Solana CLI.
bash
? Select Solana CLI (jito)
  agave
❯ jito
  firedancer-agave
  firedancer-jito

Seleccione el tipo RPC

Seleccione el tipo RPC.
bash
? Select an RPC type
❯ Geyser gRPC
  Index RPC
  SendTx RPC
  Index RPC + gRPC
En este tutorial, seleccionamos Geyser gRPC.

Confirmación de configuración

Por último, confirme la configuración.
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
Después de eso, se crea el usuario solv en el servidor bare metal y la configuración de Solana RPC se guarda en ~/.slv/inventory.mainnet.rpcs.yml.

Desplegar el nodo RPC de Solana

Una vez que confirme la configuración, el despliegue comenzará.
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

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
¡Está hecho! Su nodo de Solana RPC ahora está desplegado. Tardará algún tiempo en sincronizar con la red Solana.

Depuración y monitoreo

Después del despliegue, puede comprobar el estado del nodo de Solana RPC con el siguiente comando:
bash
ssh solv@<your-server-ip>
solv m
solv es un alias de agave-validator -l /mnt/ledger. Este ajuste se añade a ~/.profile durante el despliegue de los nodos RPC.

Comandos 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