Optimism
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Optimism
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
eth_syncing reports the current sync status of an OP Mainnet node — the OP Stack rollup that settles to Ethereum L1 and uses ETH for gas. It returns false when the node is fully caught up to the chain head, or an object with startingBlock, currentBlock, and highestBlock while it is still importing blocks. Because OP Mainnet produces blocks roughly every 2 seconds, a node falling behind shows up quickly in the gap between currentBlock and highestBlock. Point the call at https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa) to check whether the endpoint is ready to serve consistent reads.
currentBlock against highestBlock.false return so you never query stale state during bootstrap.currentBlock over time — on a ~2-second chain, a value that barely advances signals a problem.Diese Methode erwartet keine Parameter. Übergib ein leeres Array [].
| Typ | Beschreibung |
|---|---|
| boolean | object | false when the node is fully synced. When syncing, returns an object with at minimum: startingBlock (hex), currentBlock (hex), highestBlock (hex). Additional fields vary by client (e.g. Geth includes snap-sync progress counters; Erigon includes syncStage/syncProgress). |
Try it live in the Optimism playground.
| Code | Meldung | Ursache |
|---|---|---|
-32603 | Internal error | Node cannot determine sync state (e.g. no peers connected). |
false during certain sync phases even when the node is not fully usable, so do not treat false as an absolute guarantee — cross-check against a known recent block number when readiness is critical.