Check whether a Solana RPC can serve a historical block range
A backfill worker needs blocks from an old slot range. Three small RPC reads can establish where the endpoint’s history begins, which slots to fetch, and whether the worker can read a block.
Find the earliest available slot
{"jsonrpc":"2.0","id":1,"method":"getFirstAvailableBlock","params":[]}
Send the JSON body by HTTP POST to the endpoint that will handle the import. Suppose the result is 220000 and the job starts at 215000. Record 215000 through 219999 as a range requiring another source. Move the test to 220000 or later. Capture the endpoint and time with this observation because retention changes.
Enumerate slots containing blocks
{"jsonrpc":"2.0","id":2,"method":"getBlocks","params":[220000,220010,{"commitment":"finalized"}]}
Replace the example numbers with a small window inside your target range. Both bounds are inclusive. Fetch the slot numbers listed in result. A jump between listed slots is possible because a scheduled slot can pass without producing a block. A hole by itself does not diagnose pruning.
Test the payload your importer needs
{"jsonrpc":"2.0","id":3,"method":"getBlock","params":[220000,{"commitment":"finalized","transactionDetails":"none","rewards":false}]}
Replace 220000 with one returned slot. A block object with blockhash and parentSlot demonstrates header access there. If you need transaction bodies, repeat the request with transactionDetails set to full and the maximum transaction version your decoder supports. Treat a JSON-RPC error or null as unresolved and retain its slot for investigation before marking the range complete.