ethereum / cthaeh

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

Faster database bootstrapping #9

Open pipermerriam opened 4 years ago

pipermerriam commented 4 years ago

What was wrong?

Right now it is looking like it will take more than a week to load all of the chain data from a locally running geth node into a Posgres database (also running on the same machine). This is too slow.

How can it be fixed?

8 poses an option for improving the overall speed.

We should be able to do two other things to improve the UX.

  1. Load the HEAD of the chain (disconnected from it's history) and follow the chain head while concurrently doing backfill of the ancient data.
  2. Lazily load intermediate block ranges as they are queried. If a query comes in for a defined range of blocks that we have not yet loaded, those blocks could be queued at a high priority to be loaded on-demand.
pipermerriam commented 4 years ago

Part 1 is done in #10