Avalanche
Avalanche
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_syncing reports whether an Avalanche C-Chain node is still catching up to the chain tip or has finished syncing. When the node is fully synced it returns false; while it is importing blocks it returns an object with startingBlock, currentBlock, and highestBlock so you can gauge how far behind it is. On the C-Chain — the EVM chain where AVAX pays for gas, secured by Snowman/Avalanche consensus — a node must be fully synced before its responses to balance, log, and call queries can be trusted. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a) to confirm a node is current before you depend on its data.
currentBlock and highestBlock and surface it on a node-monitoring dashboard.false response so your service only begins serving requests once the node is fully synced.currentBlock over time — on the C-Chain, with its one-to-two-second block cadence, a currentBlock 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 Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32603 | Internal error | Node cannot determine sync state (e.g. no peers connected). |
false during certain sync phases even when they are not truly at the tip (for example Beam Sync on Nethermind). Do not treat false alone as a hard guarantee of full sync; cross-check eth_blockNumber against a known-good source.