I want to test open the mainnet RPC node in local before go to the in the server that have cost, which using Docker , I provide docker-compose.yaml
I use below.
the question is how can i gonna import the snapshot file that I download from the solana-snapshot-finder
?
because now when I try to open the node , seem like its sync from the genesis , which taking very long time
more context I using solana-snapshot-finder
, its gonna find the fastest node that can download the snapshot tar file at that time, but its seem slow . so I cancel the process download and using aria2 to download file manually. for faster download.
after that I extract the snapshot file that I download. then I got accounts
and snapshots
folder. like this directory tree below
test-snap
├── accounts
└── snapshots
└── 262895193
and this is the solana folder that i have for now
solana
├── ledger
│ ├── accounts
│ │ ├── run
│ │ └── snapshot
│ ├── accounts_hash_cache
│ ├── accounts_index
│ ├── banking_trace
│ ├── rocksdb
│ ├── snapshot
│ └── snapshots
│ └── 262895193
└── solana-run
its made me think that I shall replace the accounts
and the snapshots
from the test-snap
folder to the solana/ledger
, so I delete the folder in the destination and move the snapshot to its
the process shall be fine. but when I start the node again, seem like its delete my accounts
and start syncing from 0 again.
version: '3.8'
services:
solana-rpc-node:
image: solanalabs/solana:v1.18.11
container_name: solana-rpc-node
command: >
solana-validator
--identity /root/validator-keypair.json
--log /root/.config/solana/solana-rpc.log
--our-validator /root/validator-keypair.json
--our-localhost
--only-known-rpc
--known-validator 7Np41oeYqPefeNQEHSv1UDhYrehxin3NStELsSKCT4K2 \
--known-validator GdnSyH3YtwcxFvQrVVJMm1JhTS4QVX7MFsX56uJLUfiZ \
--known-validator DE1bawNcRJB9rVm3buyMVfr8mBEoyyu73NBovf2oXJsJ \
--known-validator CakcnaRDHka2gXyfbEd2d3xsvkJkqsLw2akB3zsN1D2S \
--full-rpc-api
--no-voting
--rpc-port 8899
--rpc-bind-address 0.0.0.0
--private-rpc
--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
--entrypoint entrypoint4.mainnet-beta.solana.com:8001
--entrypoint entrypoint5.mainnet-beta.solana.com:8001
--expected-genesis-hash 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d
--wal-recovery-mode skip_any_corrupted_record
--limit-ledger-size 50000000
ports:
- "8899:8899"
ulimits:
nofile: 1000000
volumes:
- ./validator-keypair.json:/root/validator-keypair.json
- ./solana:/usr/bin/config
- ./test-snap:/root/.solana/accounts
networks:
- solana-net
networks:
solana-net:
driver: bridge