2

Suppose I make a JSON-RPC call to create a new filter as follows (from the documention page):

// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics":["0x12341234"]}],"id":73}'

// Result
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x1" // This is the filter ID- 0x1
}

Now I have registered a filter at the geth client and now I can make further calls to the filter.

Can I go to the geth console and list all the registered filters (in case I forget them or just for other reasons)? Do they ever expire/timeout except of course after a restart which clears all the filters.

1

Can I go to the geth console and list all the registered filters (in case I forget them or just for other reasons)?

AFAIK there is no way to list the installed filters, at least with the exposed APIs.

Do they ever expire/timeout except of course after a restart which clears all the filters.

From JSON RPC documentation: "Filters timeout when they aren't requested with eth_getFilterChanges for a period of time." In Geth implementation, the time period is 5 minutes from the last poll of eth_getFilterChanges after which the filter expires.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.