Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsMantleJSON-RPC APINetwork Methods

eth_syncing - Mantle RPC Method

Check the sync status of your Mantle node. Returns sync progress or false when fully synced - essential for node health monitoring and dApp reliability.

Mantle RPC endpoint: endpoint URLs, plans and pricing.

Returns the sync status of your Mantle node - either false when fully synced, or an object describing the sync progress.

Why Mantle? Build on the world's largest ZK rollup by TVL with $2.5B+ secured and deep Bybit integration with near-instant ZK finality via OP Succinct, $6.2B treasury backing, mETH liquid staking, and 25% Bybit trading fee discounts.

When to Use This Method

eth_syncing is essential for DeFi developers, liquid staking builders, and teams seeking institutional exchange 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
JSON-RPC request
{
  "jsonrpc": "2.0",
  "method": "eth_syncing",
  "params": [],
  "id": 1
}

Code Examples

Common Use Cases

1. Node Health Monitor

Continuously check sync status and alert on issues:

JavaScript
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:

JavaScript
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));
  }
}

Best Practices

  • Poll eth_syncing at application startup and block all transaction operations until false is returned
  • Check both the sync status AND the latest block timestamp age -- a node can report synced but still have stale data
  • In multi-node setups, route read requests to synced nodes and avoid sending transactions to nodes still catching up
  • For long-running services, implement a health check that raises alerts if the sync gap exceeds a threshold
  • Some client implementations return a sync object with additional fields like knownStates and pulledStates during state sync

Error Handling

Error CodeDescriptionSolution
-32603Internal errorNode may be starting up -- retry after delay
-32005Rate limit exceededReduce polling frequency

Related Methods

  • eth_blockNumber - Get current block height
  • net_peerCount - Check peer connections
  • net_listening - Verify node is accepting connections
  • web3_clientVersion - Get node client info

eth_chainId

Get the chain ID for Mantle. Essential for transaction signing and network verification.

net_version

Get the current network ID on Mantle. Useful for endpoint identification and multi-network routing.

On this page

When to Use This MethodCode ExamplesCommon Use Cases1. Node Health Monitor2. Wait for Sync Before ProcessingBest PracticesError HandlingRelated Methods