Decentralized Futures Proposal: Generic Multichain indexer

As part of W3F’s Decentralised Futures Program, at LimeChain, we propose the creating of a multi-chain indexer. A multichain indexer is vital for Polkadot’s ecosystem, offering benefits like cross-chain data access and streamlined dApp development. By gathering, organising, and indexing data from various chains within Polkadot, it enables quick and efficient information retrieval. Developers gain easy access to indexed data through user-friendly tools and APIs, enabling focus on innovation. Real-time data availability supports informed decisions. Custom queries enhance efficiency by tailoring data requests. Additionally, multichain indexers offer insights for network analysis and informed decision-making. Overall, they are pivotal for seamless cross-chain communication, robust dApps, and network efficiency in Polkadot.

Deliverables:
The multi-chain indexer serves the vital role of granting effortless access to indexed data for a wide spectrum of users, including dApp developers, business analysts, and anyone keen on monitoring transactions spanning across various parachains. Currently, all existing indexing tools either lack functionality for multi-chain transaction tracking or are providing insufficient tools to do so.
The way we want to tackle these issues is by proposing to create the creation of a Multichain Indexer which will index blockchain data from multiple chains into a single database to make cross-chain query possible.

In order to fulfil all requirements the indexer would need to support the following:

  1. Storage change tracking - If a storage slot has been changed users should be able to track and be notified about it. In order to do that the indexer should be able to track each storage slot change per block.
  2. Tracking of multi-chain communication - ease of filtering by multi-chain transactions

Here is a breakdown of the overview of the scope:

Environment Setup and Supported Networks:

  • Creation of local and potential production configurations to support local development.
  • Each network requires its own SubQuery node connected to the same database instance.

Event Tracing:

  • Mapping of XCM (Cross-Chain Message) operations between networks based on the same hash.
  • Example provided with links showing a multichain transfer between Acala and Unique.
  • Recording sender, receiver, id, and XCM transfer hash in the database.

Adding Support for Storage Change Tracing:

  • SubQuery lacks support for storage change traces.
  • Use the state_traceBlock RPC call to record storage slot changes in the database.
  • Addition of a new handler to the SubQuery project.
  • Creation of new tables and views based on the added functionality.

Event Subscriptions:

  • SubQuery can enable user subscriptions using a --subscription flag.
  • No additional implementation is planned for the initial version.
  • Reference provided for more information on subscriptions.

Define GraphQL Structure:

  • Development of the GraphQL schema to support multiple chains.
  • The schema should allow traceability of messages across different networks.

Conclusion:
Overall, the scope involves setting up the environment, enhancing event tracing capabilities, adding support for storage change tracing, enabling event subscriptions, and defining a GraphQL structure for multi-chain traceability. We’re positive about our capabilities and would be happy to be able to contribute the Polkadot ecosystem by taking part in the Decentralised Futures Program.

Company Background:
LimeChain is a software development company founded in 2017. We are positioned to handle end-to-end product development, and we have the capability to manage projects from conceptualisation and design to the complete implementation of a certain product. We specialise in blockchain technology, with emphasise in developing blockchain-related and infrastructure solutions.
In the context of the Polkadot ecosystem, we possess considerable expertise in developing various tools, including Gosemble, a framework for building Substrate compatible Runtimes in Go, Fruzhin, a Host implementation in Java, a framework for runtimes in AssemblyScript, a framework for runtimes in AssemblyScript. On top of that, we also implemented a Parachain Validation Conformance Testing suite.

1 Like