Polygon
Polygon
Polygon
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_syncing reports whether a Polygon PoS node is still catching up to the chain head. It returns false when the node is fully synced and serving current data, or an object with startingBlock, currentBlock, and highestBlock while it is still importing blocks. Because Polygon produces a block roughly every 2 seconds, a node that has fallen behind can lag by a large number of blocks quickly, so this check matters before you trust any balance or MATIC transaction it returns. Query it against the Polygon mainnet endpoint at https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89) to confirm the node backing your requests is current.
currentBlock and highestBlock to drive a node-monitoring dashboard.currentBlock over time — on a healthy Polygon node it should advance by roughly one block every 2 seconds.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| 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 Polygon playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32603 | Internal error | Node cannot determine sync state (e.g. no peers connected). |
false during specific sync phases even when not fully caught up — do not treat false as an absolute guarantee; cross-check currentBlock against the expected head if correctness is critical.