Indexing Cycle

You configure a starting block level and start Dappetizer. It downloads blocks one by one level from RPC of configured Tezos node. Then for each indexer module it traverses the block, goes through its parts, and executes respective indexers from the indexer module. These indexers can implement whatever logic you need - collect or aggregate data, store them to the database or some other external storage, report them or notify other services, etc.

  • Once Dappetizer reaches head block, then it switches to Tezos monitor to listen for newly baked blocks.

  • The indexing cycle follows The best or nothing approach. It is executed in a transaction. If it fails, then it completely halts, and the transaction is rolled back. The error should be fixed, and Dappetizer should be restarted. This is done to avoid data inconsistencies, mainly due to temporary outages of external services.

  • Dappetizer (if used with a database) itself stores only info about indexed blocks.

  • If there is a blockchain reorganization, then Dappetizer detects it, rolls back the respective block, and invokes rollback on each indexer module until it gets to a consistent block. Then the indexing cycle continues.

Last updated