0

Is it possible to use solana-ledger-tool to replay the most recent blocks over the provided snapshot? For example, if the snapshot was created for the slot 100 and the blocks for slots 101 and 102 were loaded by the solana block command, would it be possible to use the tool to replay them?

I it trying the following command, but the tool is not picking up blocks from the ledger directory. Would appreciate a clarification.

solana-ledger-tool verify \
--disable-accounts-disk-index \
--skip-verification \
--no-os-memory-stats-reporting \
--verbose \
--ledger ledger \
--snapshot-archive-path snapshots \
--force-update-to-open \
--use-snapshot-archives-at-startup always

1 Answer 1

1

Is it possible to use solana-ledger-tool to replay the most recent blocks over the provided snapshot?

Yes, your understanding on this aspect is correct.

the blocks for slots 101 and 102 were loaded by the solana block command

Keep in mind that solana block queries information from RPC whereas solana-ledger-tool operates on a local ledger. Depending on the defaults configured for your CLI, you might be querying blocks from one of devnet/testnet/mainnet-beta. You can run solana config get to see.

If you want to see what blocks are present in your local ledger, you should run the following command:

solana-ledger-tool bounds

I it trying the following command, but the tool is not picking up blocks from the ledger directory.

Can you elaborate further what "not picking up blocks" means here? Are you saying solana-ledger-tool fails to replay any blocks past the snapshot slot ?

2
  • Thank you for following up @steviez. The idea is to load ledger from full snapshot and then replay few subsequent blocks on top of this by using the solana-ledger-tool command. In my example above the snapshot as well as the blocks were loaded from the same cluster. Not Mar 15 at 13:06
  • Not sure if it is possible though... I figured that solana-ledger-tool validate expects that ledger already contains slots for blocks that need to be replayed. It restores it's own copy of ledger from the provided snapshots (full + incrementals) and then replays slots from the provided ledger over it. In other words, the provided ledger is used as a source of slots/blocks that need to be replayed over the provided snapshot. A bit backwards and tedious, but it works. Mar 15 at 13:13

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.