72 lines
1.9 KiB
Plaintext
72 lines
1.9 KiB
Plaintext
Step 002E: Start agave-validator z linii polecen (test przed systemd)
|
|
|
|
Cel:
|
|
- Odpalic `agave-validator` recznie (w tmux), potwierdzic ze RPC dziala.
|
|
- Dopiero potem przepiac na systemd (Step 002B).
|
|
|
|
Preconditions:
|
|
- Masz genesis + snapshoty:
|
|
- doc/step-002c-genesis-download-mainnet.txt
|
|
- doc/step-002d-snapshot-download-mainnet.txt
|
|
- WireGuard dziala (RPC ma byc prywatne po wg0).
|
|
|
|
0) Upewnij sie, ze systemd nie trzyma procesu na portach
|
|
```bash
|
|
sudo systemctl stop agave-validator || true
|
|
sudo systemctl disable agave-validator || true
|
|
```
|
|
|
|
1) Odpal w tmux (zeby proces nie zginal po rozlaczeniu SSH)
|
|
```bash
|
|
tmux new -s agave-rpc
|
|
```
|
|
|
|
2) Start (dzialajaca komenda z wdrozenia)
|
|
```bash
|
|
sudo bash -lc '
|
|
set -euo pipefail
|
|
ulimit -n 1048576
|
|
exec sudo -u solana -H /opt/solana/bin/agave-validator \
|
|
--identity /var/lib/solana/identity.json \
|
|
--no-voting \
|
|
--private-rpc \
|
|
--ledger /var/lib/solana/ledger \
|
|
--accounts /var/lib/solana/accounts \
|
|
--log - \
|
|
--bind-address 0.0.0.0 \
|
|
--rpc-bind-address 10.66.66.1 \
|
|
--rpc-port 8899 \
|
|
--dynamic-port-range 8000-8020 \
|
|
--entrypoint entrypoint.mainnet-beta.solana.com:8001 \
|
|
--entrypoint entrypoint2.mainnet-beta.solana.com:8001 \
|
|
--entrypoint entrypoint3.mainnet-beta.solana.com:8001 \
|
|
--expected-genesis-hash 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d \
|
|
--full-rpc-api \
|
|
--limit-ledger-size 50000000
|
|
'
|
|
```
|
|
|
|
3) Weryfikacja (w drugim oknie / innym terminalu)
|
|
```bash
|
|
ss -lnt | egrep ':8899\\b|:8900\\b' || true
|
|
```
|
|
|
|
```bash
|
|
curl -sS -H 'content-type: application/json' \
|
|
--data '{"jsonrpc":"2.0","id":1,"method":"getVersion"}' \
|
|
http://10.66.66.1:8899 | jq .
|
|
```
|
|
|
|
4) Detach z tmux
|
|
- `Ctrl+b d`
|
|
|
|
5) Stop (gdy chcesz zatrzymac recznie)
|
|
- `tmux attach -t agave-rpc`
|
|
- `Ctrl+c` (zatrzyma validator)
|
|
- `exit`
|
|
|
|
Next:
|
|
- Jak komenda dziala stabilnie, wrzuc unit i odpal przez systemd:
|
|
doc/step-002b-agave-validator-systemd.txt
|
|
|