apibara / dna

Apibara is the fastest platform to build production-grade indexers that connect onchain data to web2 services.
https://www.apibara.com/
Apache License 2.0
181 stars 32 forks source link

Fix crash when overriding starking block #379

Closed fracek closed 2 months ago

fracek commented 2 months ago

Summary

Some users reported an InconsistentDatabase error when running apibara-starknet together with devnet and mainnet forking.

This issue was caused by the ingestion service expecting blocks to be ingested sequentially, starting from block 0.

This fix changes the ingestion service to consider the specified starting block (if any) as finalized.

Testing strategy

Notice how before this PR the ingestion process fails, but with this patch it works.