We are happy to announce that the indexer for Tezos we have been working on is ready for beta-testing and available here.
But first…
What is an indexer, and what is it useful for?
Mainly, indexers fill a void by providing information that’s not directly available from the node’s RPC interface. But then why don’t nodes provide these RPCs in the first place? That’s simply because when you design and implement your node, you want to provide just what is necessary, focus on what’s most important, in order to reduce the possible sources of errors or bugs or security issues. Also, it’s not really a node’s job to provide all information that users can just deduce or derive from what it does provide.
However, some information just cannot be rapidly deduced from the combination of a reasonable number of RPCs to the node. For instance, if you want the ten latest operations done by a baker, you don’t want to scan the list of transactions until you find ten of them, especially if there’s fewer than ten, since in that case it would make you go up to the genesis block! Instead, you want to have an index of all the transactions done by that baker in a database that’s both easy to access and fast.
Wallets, DApps (decentralized applications, often blockchain-enabled websites), and block explorers are the main users of indexers.
Some technical details about our indexer for Tezos
The code of the indexer for Tezos we are presenting here is a refactoring of Mezos, which is the middleware used by the wallets developed by the Nomadic Labs mobile team. It already has been used extensively and developed in the last 12 months, and its design is fairly stable.
However there have been quite a few changes, going from Mezos to this indexer and here are some of them:
- For bootstrapping, instead of having to run 4+3=7 slightly different versions of Mezos, you need to run just a single version of this indexer: it handles the 4 different protocols and the 3 protocol transition blocks. That applies to Mainnet only. Other networks are not supported at all for the time being (it wouldn’t be difficult, it just hasn’t been given a priority yet).
- Mezos uses TzScan to get the snapshot blocks. However this indexer doesn’t use TzScan at all, it directly implements that part so we could break free from some closed source code.
Location
You can find it here, and if you want to play with it, start by reading the README.
Have fun! :)