I can view pending events like so:

pending_events_filter = my_contract.events.TestEvent.createFilter(fromBlock='pending', toBlock='pending') pending_events_filter.get_new_entries()

But the events are occasionally delayed up to a minute after my geth node gets the transaction in its mempool, and sometimes don't even show up until the transaction has been mined.

I am running geth locally, and connected to it via websocket.

How can I get these pending events immediately?

My suspicion is that my geth node is not bothering running them in the EVM until it needs to for mining purposes, but I don't know.

Thanks for any help!

1 Answer 1


The mempool is a dark place. I think what it comes down to in your case is just that not every node has all of the mempool. There's two ways you could go about it:

  1. Manually try to increase your mempool. I'm sure there is configuration in geth that determines things like max mempool count, max connected peers etc. Increasing those will help. You can also run multiple geth nodes.

  2. Use a service like Blocknative: https://www.blocknative.com/notify

  • Interesting, so is blocknative a service that solves the issue for you? I'm also seeing some weird stuff with the mempool, and trying to get a quick and reliable way of looking through pending transactions May 22, 2023 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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