aleph-im / aleph-indexer-framework

TypeScript framework for deploying distributed indexers on Aleph VMs for Solana and EVM chains.
MIT License
30 stars 0 forks source link

Enforce type safety between interfaces [Debug Flag] #8

Closed MHHukiewitz closed 1 year ago

MHHukiewitz commented 1 year ago

Problem: Debugging the indexer framework is unexpectedly hard due to the multi-threaded microservices architecture. Often, the data being sent around may not conform to the types given in the framework's interface definitions. This comes with two issues:

  1. The transaction data being received by the fetcher does not always conform to the types as expected in the framework. Changes in transaction structure can result in faulty data entering the framework and oftentimes leading to cryptic errors deep inside the framework. See #6.
  2. The same is true for data being passed around the microservices. The problem was first encountered when defining JSON objects' fields such as luxon.DateTime in Pull Request #1.

To improve the debugging process for the indexer framework, I propose the following:

I believe this will help debug current issues on the indexer generator and the above PR, as well as future issues.

Tasks:

MHHukiewitz commented 1 year ago

Closed in favor of the more specific #19