getMaxShredInsertSlot
Get the max slot seen from after shred insert.
Common use cases
| RPC node lag detection | Compare with getSlot("processed") to detect when RPC node falls behind cluster consensus, typically warning when difference exceeds 10 slots. Critical for identifying stale RPC data before transaction submission. |
| Node sync status monitoring | Track validator's shred ingestion progress during initial sync or after network disruptions. Monitor alongside getHealth to determine when node has caught up to cluster tip. |
Parameters
No parameters required.
Request
- cURL
- JavaScript
- Python
curl https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getMaxShredInsertSlot"
}'
// Using fetch
const response = await fetch('https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "getMaxShredInsertSlot"
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = 'https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY'
headers = {'Content-Type': 'application/json'}
data = {
"jsonrpc": "2.0",
"id": 1,
"method": "getMaxShredInsertSlot"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Replace mainnet with devnet in the URL to query devnet instead.
Response
{
"jsonrpc": "2.0",
"result": 1234,
"id": 1
}
Response Fields
Return value: u64
Slot number
FAQ and Troubleshooting
What's the difference between getMaxShredInsertSlot and getSlot?
getMaxShredInsertSlot returns the highest slot with complete shred data in blockstore, while getSlot returns the slot at a specific commitment level (processed/confirmed/finalized). Use both together: if getSlot("processed") is 10+ slots ahead of getMaxShredInsertSlot, the node is lagging.
When should I use this method?
Primarily for RPC node health monitoring in production systems. Compare against getSlot("processed") before critical operations like transaction submission to ensure your RPC provider has current cluster state. Not needed for typical application development.
Related Methods
getSlot
Returns current slot at specified commitment level. Use with processed commitment alongside getMaxShredInsertSlot to calculate lag: healthy nodes show minimal difference between these values.
getMaxRetransmitSlot
Returns maximum slot from Turbine retransmit stage, occurring earlier in pipeline. Both methods track shred propagation; retransmit precedes insertion into blockstore.
getHealth
Returns node health status based on slot lag thresholds. Combine with getMaxShredInsertSlot for comprehensive diagnostics: health status reflects automated lag calculations.
getBlockHeight
Returns block height (excluding skipped slots) at commitment level. Use alongside shred insert slot to distinguish network-level skips from node-specific lag.