Skip to main content
Standard Ethereum JSON-RPC API

eth_newBlockFilter

Creates a filter to receive notifications when new blocks are produced. Poll the filter with eth_getFilterChanges to retrieve new block hashes since the last poll.

Filter polling on the public endpoint

Filter IDs are server-side state, scoped to the node that created them. On a load-balanced public endpoint like rpc.linea.build, a follow-up eth_getFilterChanges request may land on a different backend that has no record of the filter and silently return an empty result. For reliable block tracking in production, poll eth_blockNumber directly or use a private RPC endpoint with sticky sessions.

Parameters​

None.

Returns​

A filter ID (hexadecimal string).

Example​

Request​

curl https://rpc.linea.build \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_newBlockFilter",
"params": [],
"id": 1
}'

Response​

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x81445bcfd35c9b777a..."
}

Was this page helpful?