Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
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.هذا الأسلوب لا يأخذ أي معاملات. مرر مصفوفة فارغة [].
| النوع | الوصف |
|---|---|
| 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.
| الكود | الرسالة | السبب |
|---|---|---|
-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.