I am currently running a Solana validator, but I've noticed that the ledger folder is increasing in size while the accounts folder remains at 28kb. Am I synchronizing incorrectly? I followed the instructions at https://chainstack.com/how-to-run-a-solana-node/ during the installation. My primary goal is to download the accounts data. How can I achieve that?
The node downloads the blockchain data as a compressed file called a snapshot, after this file is downloaded and processed the node starts validating. This can take between 5 minutes to over an hour if you're on mainnet with a less powerful server.
You should check the logs to see for errors. I know it logs a lot of data, but filter by "ERROR" (all-caps) or "restart" to identify problems.
If you just want the account data, you can download the snapshot yourself with these options:
if you want a non-mainnet snapshot use this and use the
-rarg to specify a custom RPC
alternatively, RPC nodes offer the snapshot at this path
/snapshot.tar.bz2, so find a RPC url and append that path to it to download. Get a list of RPC nodes with this method or by running
solana gossipin the command line and use the
If you decompress the snapshot you will get this directory structure which contains the accounts:
$ tree .
│ ├── 221707449.713259
│ ├── ...
│ ├── ...
│ └── 222140108.985850
│ ├── 222140108
│ │ └── 222140108
│ └── status_cache
Not sure what you want to do with the account data, but here is one way to read it.