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.