Ethereum
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Ethereum
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
eth_syncing tells you whether an Ethereum execution node has caught up to the head of the chain. On the ETH mainnet (chain ID 1), the canonical chain advances one block per 12-second slot, and a node that has just been spun up or restarted has to download and verify history before it can answer queries with current state. Call the method against https://ethereum.therpc.io/YOUR_API_KEY and you get one of two shapes back: a plain false once the node is fully synced and tracking the head, or a progress object while it is still catching up. That object carries startingBlock, currentBlock, and highestBlock so you can see how far behind the node still is.
currentBlock against highestBlock.false before assuming latest reflects the true mainnet head.currentBlock keeps climbing or sits frozen.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 Ethereum playground.
| Code | Meldung | Ursache |
|---|---|---|
-32603 | Internal error | Node cannot determine sync state (e.g. no peers connected). |
false is not always a guarantee of a fully synced node. Some clients report false during certain phases (Beam Sync on Nethermind is the classic example), so pair the check with a eth_blockNumber sanity test against the known mainnet head.syncStage/syncProgress, so read extra keys defensively and never assume a field exists.