eth_subscribe("syncing")
JSON-RPC method allows developers to subscribe to notifications about the synchronization status of a Hyperliquid EVM node. The subscription provides real-time updates when the node starts or stops syncing with the network, making it essential for monitoring node health and ensuring data consistency.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
- subscription type (string, required): Keyword identifying the type of event to subscribe to,
syncing
in this case
Response
The method returns a subscription ID that can be used to identify and manage the subscription.Response structure
Initial subscription response:subscription
— the subscription ID
startingBlock
— the block number where sync startedcurrentBlock
— the current block number being processedhighestBlock
— the estimated highest block number to sync to
- Returns
false
Usage example
Basic implementation
Note that subscriptions require a WebSocket connection. Install WebSocket cat for testing:
wscat
JavaScript implementation
Python implementation with alerting
Combined monitoring with health checks
Use cases
Theeth_subscribe("syncing")
method is essential for applications that need to:
- Node health monitoring: Track whether nodes are keeping up with the network
- Data consistency checks: Ensure queries are made against fully synced nodes
- Load balancing: Route requests away from syncing nodes
- Alerting systems: Notify operators when nodes fall behind
- Deployment validation: Verify new nodes are syncing correctly
- Performance monitoring: Track sync speed and estimate completion times
- Failover management: Automatically switch to backup nodes during sync issues
- Infrastructure scaling: Identify when additional nodes are needed
- Maintenance planning: Schedule updates when nodes are fully synced
- Service reliability: Ensure high availability by monitoring sync status