eth_syncing - Linea RPC Method
Check the sync status of your Linea node. Returns sync progress or false when fully synced — essential for node health monitoring and dApp reliability.
Returns the sync status of your Linea node — either false when fully synced, or an object describing the sync progress.
Why Linea? Build on Consensys-backed zkEVM L2 with $1B+ TVL and 807% growth in 2025 with 15-30x lower fees than Ethereum mainnet, 6,200 TPS throughput, SWIFT integration with 12+ institutions, and $725M Consensys backing.
When to Use This Method
eth_syncing is essential for enterprise developers, DeFi builders, and teams seeking Consensys ecosystem integration:
- Node Health Checks — Verify your node is fully synced before processing transactions
- Sync Progress Monitoring — Track how far behind your node is during initial sync or after downtime
- Load Balancer Routing — Route requests only to fully synced nodes in multi-node setups
- dApp Reliability — Display sync warnings to users when data may be stale
Request Parameters
This method accepts no parameters.
Response Body
Block number where sync started
Current block being processed
Estimated highest block
Code Examples
curl -X POST https://api-linea-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}'Common Use Cases
1. Node Health Monitor
Continuously check sync status and alert on issues:
async function monitorNodeHealth(provider, interval = 30000) {
setInterval(async () => {
const syncing = await provider.send('eth_syncing', []);
if (syncing === false) {
const blockNumber = await provider.getBlockNumber();
const block = await provider.getBlock(blockNumber);
const age = Date.now() / 1000 - block.timestamp;
if (age > 60) {
console.warn(`Node synced but block is ${age.toFixed(0)}s old`);
} else {
console.log(`Healthy — block ${blockNumber}`);
}
} else {
const current = parseInt(syncing.currentBlock, 16);
const highest = parseInt(syncing.highestBlock, 16);
console.warn(`Syncing: ${highest - current} blocks behind`);
}
}, interval);
}2. Wait for Sync Before Processing
Block application startup until the node is ready:
async function waitForSync(provider, pollInterval = 5000) {
while (true) {
const syncing = await provider.send('eth_syncing', []);
if (syncing === false) {
console.log('Node synced — ready to process transactions');
return;
}
const current = parseInt(syncing.currentBlock, 16);
const highest = parseInt(syncing.highestBlock, 16);
console.log(`Waiting for sync: ${highest - current} blocks remaining...`);
await new Promise(r => setTimeout(r, pollInterval));
}
}Error Handling
| Error Code | Description | Solution |
|---|---|---|
| -32603 | Internal error | Node may be starting up — retry after delay |
| -32005 | Rate limit exceeded | Reduce polling frequency |
Related Methods
eth_blockNumber— Get current block heightnet_peerCount— Check peer connectionsnet_listening— Verify node is accepting connectionsweb3_clientVersion— Get node client info