Validador Solana Testnet - Início rápido
Instalação e inicialização do validador
bash
curl -fsSL https://storage.slv.dev/slv/install | sh
slv validator init
slv validator deploycurl -fsSL https://storage.slv.dev/slv/install | sh
slv validator init
slv validator deployImplantar o validador Firedancer da Solana Testnet
🚀 Pré-requisitos
Prepare um servidor com uma instalação limpa do Ubuntu 24.04 LTS.
🔑 Sobre o tratamento de chaves
Em novas implantações do SLV com Firedancer, unstaked-keypair.json é sempre usado inicialmente como chave de identidade, por segurança.
Esta é uma boa prática para evitar problemas críticos, como a dupla votação.
✅ Configuração da identidade após a implantação
Após a implantação, certifique-se de definir a chave de identidade autorizada com o seguinte comando:
bash
slv v set:identity -n testnet --pubkey <name>slv v set:identity -n testnet --pubkey <name>Preparando um servidor Baremetal para a testnet
Embora seja possível executar nós Solana em VPS ou máquinas virtuais (VM), alcançar desempenho e estabilidade ideais é um desafio na prática. A Solana recomenda oficialmente o uso de servidores baremetal, que oferecem desempenho muito superior ao de ambientes virtualizados.
Como os ambientes de testnet têm carga menor do que a mainnet, confirmamos uma operação estável usando servidores com CPU Ryzen de 16 núcleos e 128GB de RAM DDR5. Usar essa configuração de servidor ajuda a reduzir os custos operacionais, por isso ela é recomendada.
Ao executar o comando
slv v init, será perguntado se o seu servidor baremetal já está configurado:bash
➜ slv v init
? Select Solana Network (testnet) › testnet
? 🛡️ Do you have a Solana Node Compatible Server? (no)
❯ yes
no➜ slv v init
? Select Solana Network (testnet) › testnet
? 🛡️ Do you have a Solana Node Compatible Server? (no)
❯ yes
noEste tutorial pressupõe que você selecione
yes.Se ainda não preparou o seu servidor baremetal, consulte o Guia de Configuração do Servidor Baremetal para concluir a configuração.
Informe o nome de usuário padrão do servidor
Na maioria das vezes, o nome de usuário padrão é
ubuntu ou root.bash
? What's the user for the server? (ubuntu) › ubuntu? What's the user for the server? (ubuntu) › ubuntuInforme o endereço IP do servidor
Insira o endereço IP do servidor.
bash
? What's the IP address of the server? ›? What's the IP address of the server? ›Definir a chave RSA para SSH
※ Defina o caminho para a sua chave RSA. O caminho padrão é
~/.ssh/id_rsa.
Atualmente, somente o caminho padrão é suportado, então defina-o como está.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 succeededEm seguida, o SLV verificará a conexão com o servidor. Se a conexão for bem-sucedida, o próximo passo será exibido.
Selecione o tipo de validador Solana
Selecione o tipo de validador Solana.
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-jitoGerar ou configurar a chave de identidade do validador Solana
Você pode gerar uma nova chave de identidade ou definir uma chave de identidade existente.
Este exemplo mostra como definir uma chave de identidade existente com o nome "epics-test".
bash
? Do you want to create a new identity key now? (Y/n) › No
? Please Enter Your Identity Public Key › TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp
? Enter Inventory Name (TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp) › epics-test
⚠️ Please place your identity key in
~/.slv/keys/TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp.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 › TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp
? Enter Inventory Name (TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp) › epics-test
⚠️ Please place your identity key in
~/.slv/keys/TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp.json
.
.
✔︎ Success
✔ Inventory updated to ~/.slv/inventory.yml
✔ Successfully created solv user on x.x.x.xColoque sua chave de identidade em
~/.slv/keys/<your-pubkey>.json. Em seguida, o SLV criará o usuário solv usando uma senha.Detecção automática de região
Em seguida, o sistema fará ping em cada block engine a partir do seu nó configurado para detectar automaticamente a região mais próxima. Medindo os valores reais de ping, você pode selecionar a região ideal.
bash
📍 Measuring latencies from x.x.x.x to testnet regions...
Pinging Dallas (dallas.testnet.block-engine.jito.wtf)...
Pinging New York (ny.testnet.block-engine.jito.wtf)...
✅ New York: 74.341 ms
✅ Dallas: 114.722 ms
🎯 Nearest region: 🇺🇸 New York
Latency: 74.341 ms
Block Engine: https://ny.testnet.block-engine.jito.wtf
Shred Receiver: 64.130.35.224:1002
Relayer: http://ny.testnet.relayer.jito.wtf:8100
NTP Server: ntp.dallas.jito.wtf📍 Measuring latencies from x.x.x.x to testnet regions...
Pinging Dallas (dallas.testnet.block-engine.jito.wtf)...
Pinging New York (ny.testnet.block-engine.jito.wtf)...
✅ New York: 74.341 ms
✅ Dallas: 114.722 ms
🎯 Nearest region: 🇺🇸 New York
Latency: 74.341 ms
Block Engine: https://ny.testnet.block-engine.jito.wtf
Shred Receiver: 64.130.35.224:1002
Relayer: http://ny.testnet.relayer.jito.wtf:8100
NTP Server: ntp.dallas.jito.wtfGerar ou configurar a chave da conta de voto do validador Solana
Você pode gerar uma nova chave de conta de voto ou definir uma chave de conta de voto existente.
Este exemplo mostra como definir uma chave de conta de voto existente.
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>A configuração foi salva em
~/.slv/inventory.testnet.validators.yml.Implantar o validador
Assim que você confirmar a configuração, a implantação começará.
bash
slv v deploy -n testnetslv v deploy -n testnetPrimeiro, será exibida a confirmação da configuração.
Selecione Yes para continuar.
bash
Your Testnet Validators Settings:
┌────────────────┬──────────────────────────────────────────────┐
│ Identity Key │ TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp │
├────────────────┼──────────────────────────────────────────────┤
│ Vote Key │ 6XdQ6szHJjm1t3XbgahSS6WVEhsrs5fniZbLgfkN1QWn │
├────────────────┼──────────────────────────────────────────────┤
│ Authority Key │ authAccount │
├────────────────┼──────────────────────────────────────────────┤
│ IP │ x.x.x.x. │
├────────────────┼──────────────────────────────────────────────┤
│ Validator Type │ jito │
├────────────────┼──────────────────────────────────────────────┤
│ Version │ 3.0.7-jito │
└────────────────┴──────────────────────────────────────────────┘
? Do you want to continue? (Y/n) › YesYour Testnet Validators Settings:
┌────────────────┬──────────────────────────────────────────────┐
│ Identity Key │ TKMNqvfwb7PKkc9KFEJJ8EaNK9s5XjNWgFS6oyqSLkp │
├────────────────┼──────────────────────────────────────────────┤
│ Vote Key │ 6XdQ6szHJjm1t3XbgahSS6WVEhsrs5fniZbLgfkN1QWn │
├────────────────┼──────────────────────────────────────────────┤
│ Authority Key │ authAccount │
├────────────────┼──────────────────────────────────────────────┤
│ IP │ x.x.x.x. │
├────────────────┼──────────────────────────────────────────────┤
│ Validator Type │ jito │
├────────────────┼──────────────────────────────────────────────┤
│ Version │ 3.0.7-jito │
└────────────────┴──────────────────────────────────────────────┘
? Do you want to continue? (Y/n) › YesPronto! Seu validador Solana agora está implantado. Levará algum tempo para sincronizar com a rede Solana.
Depuração e monitoramento
Após a implantação, você pode depurar e monitorar dentro do nó RPC Solana.
Você pode verificar o status do nó RPC Solana usando os seguintes comandos:
bash
$ solv m$ solv msolv é um alias para agave-validator -l /mnt/ledger.
Esta configuração é adicionada a ~/.profile durante a implantação do nó RPC.Alterar a chave de identidade
Após a implantação, você precisa trocar a chave unstaked pela chave de identidade autorizada.
bash
slv v set:identity -n testnet --pubkey epics-testslv v set:identity -n testnet --pubkey epics-testEste comando definirá a chave de identidade a partir do seu computador local, localizada em:
~/.slv/keys/<name>.jsonReiniciar o Firedancer
Se houver algum problema com o validador, você pode reiniciar o Firedancer com o seguinte comando.
A opção
--rm vai parar o validador, remover os diretórios de ledger e de snapshot, baixar um snapshot usando o snapshot finder e, em seguida, iniciar o validador.bash
slv v restart -n testnet --pubkey <name> --rmslv v restart -n testnet --pubkey <name> --rmComandos de validador do 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 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