The eth_newBlockFilter method creates a filter in the node to notify when a new block arrives. This is a simpler and more efficient alternative to polling eth_blockNumber repeatedly, as it allows you to receive notifications only when new blocks are detected.
Use Cases
Block synchronization for applications and explorers
Triggering block-based actions in automated systems
Confirmation tracking for transactions in wallets
Chain reorganization detection for data integrity
Real-time blockchain monitoring for analytics
Gas price trend monitoring for fee optimization
Mining/validation tracking in network analysis
Detecting network stalls when blocks stop arriving
Alerting systems for blockchain infrastructure
Maintaining cache consistency with blockchain state
Method Details
This method takes no parameters and returns a filter ID that can be used with eth_getFilterChanges to poll for new blocks.
Parameters:
Parameters is empty
Returns:
Filter ID (hex string) used for polling with eth_getFilterChanges