Skip to content

lib/dag/ directory is completely missing but indexer.ts imports from it at startup causing a crash #376

Description

@grantfox-oss

Summary

lib/stellar/indexer.ts imports reconstructDagFromMetaXdr from ../dag/engine and ExecutionDag from ../dag/types. Neither lib/dag/engine.ts nor lib/dag/types.ts exist anywhere in the repository. The lib/dag/ directory itself is absent. This is a broken import that will cause a module-not-found error at server startup for any environment that uses the indexer — which is every deployed instance of Open-Audit that processes real Stellar events. The dashboard appears to work in development because npm run dev uses the Next.js route handlers rather than the standalone indexer server.

Background

The DAG (Directed Acyclic Graph) feature was intended to reconstruct the call tree of a Stellar transaction from its meta XDR envelope — showing which contracts called which other contracts within a single transaction. This would be a significant analytical feature for understanding complex DeFi interactions. However, the module was referenced in the indexer before it was implemented, and the implementation was never committed.

Required work

This issue requires one of two resolutions. The first is to implement the lib/dag/ module in full — defining ExecutionDag types representing the transaction call tree, implementing reconstructDagFromMetaXdr to parse Stellar transaction meta XDR and extract the contract invocation tree, and adding tests proving the reconstruction is correct for known transaction patterns. The second resolution is to remove the DAG import from indexer.ts and add a commented block documenting that DAG reconstruction is planned future work, along with a link to the relevant GitHub issue. If the second path is chosen, the lib/dag/ directory should be created with a stub README.md explaining the planned architecture so future contributors have context. Whichever path is chosen, the indexer must start successfully without a module-not-found error. Add a startup test that verifies the indexer module can be imported without throwing.

Acceptance criteria

import { ... } from "../dag/engine" resolves without error. The indexer starts successfully. If the module is implemented, it has tests covering known transaction patterns. If the import is removed, a stub directory documents the planned feature.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions