Skip to content

1. 常用命令

1.1 检查节点是否同步完成

bash
solana catchup ~/solana-config/validator-keypair.json
solana catchup ~/solana-config/validator-keypair.json

1.2 验证节点状态

  • 查看端口
bash
lsof -i:8899
lsof -i:8899
  • 查看mainnet集群信息
bash
#生产
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.mainnet-beta.solana.com

#开发
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.devnet.solana.com

#测试
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.testnet.solana.com
#生产
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.mainnet-beta.solana.com

#开发
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.devnet.solana.com

#测试
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.testnet.solana.com