ethereum / cthaeh

A standalone application which serves the Ethereum JSON-RPC log filtering APIs
MIT License
2 stars 6 forks source link

HEAD tracking #4

Open pipermerriam opened 4 years ago

pipermerriam commented 4 years ago

The loader needs to be more aware of the chain state. Currently it won't handle loading at the head of the chain well.

This can be fixed by modifying the Exfiltrator such that when the end_at is None that it detects when it reaches the HEAD of the chain and switches to a more intelligent polling mechanism to wait for the next block.

Intelligent polling is probably best done by measuring/tracking the block time for recent blocks and polling based on something like the 99th percentile for block times.