1

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

1 Answer 1

2

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.

I'm not positive what you would intend to test, but you are almost assured to encounter further issues trying to do what you're doing. Getting a mainnet beta node "up" requires a considerable amount of system resources (CPU, RAM, disk space). There is no way to avoid these requirements, and if you try to spin up a node against mnb on "normal" hardware (like a standard < $1000 laptop), the process will likely either fail or take longer than you're willing to wait.

after that I extract the snapshot file that I download

Assuming that you are now running on capable hardware, you do not need to / should not be manually extracting the compressed snapshot archive file. solana-validator will do this automatically.

but when I start the node again, seem like its delete my accounts

I'm not sure exactly what you're version you're running, but with the current recommended version for mnb, this is expected behavior from solana-validator. Again, no need to manually manipulate the .tar.zst file. Rather, you need to specify a directory for --ledger, and ensure the snapshot that you manually downloaded is within that folder.

If you do have the compressed snapshot archive within your ledger directory, then your node is likely trying to unpack it and you are hitting the earlier point I mentioned of it taking a VERY long time on "regular" hardware. You can further confirm by looking at logs or by running solana-validator --ledger /path/to/your/ledger monitor

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.