Subsquid - Public data indexing Infrastructure for Polkadot and Kusama (Q2 2023)
Proponent: Subsquid Lab Official - 13bfKSQXoBn3AMLtZaW6BKv797fqZzsD3PYF6xpJDir3tdoE
Beneficiary: Subsquid Lab Official - 13bfKSQXoBn3AMLtZaW6BKv797fqZzsD3PYF6xpJDir3tdoE
Contact Details: Subsquid Labs GmbH, 6302 Zug, Switzerland - mf@subsquid.io
Short description: Ongoing development and maintenance costs for public Subsquid Archives and the Giant Squid API
Archive raw data: Archive Infrastructure Metrics - April, May, June
Giant Squid raw data: Giant Squid Infrastructure Metrics - April, May, June
Requested DOT: 43995.35 DOT + 14258.31 DOT = 58253.66 DOT = $ 233,014.67
Previous proposals: https://polkadot.polkassembly.io/referenda/15
Motivation
A) Archives
Archives are an important piece of Polkadot and Kusama data infrastructure provided by Subsquid. They provide access to on-chain data in GraphQL format for all major parachains on Kusama and Polkadot, with more chains getting support as the ecosystem grows. They are being used as a data source for Squids and for efficient data exploration and ad-hoc queries. An up-to-date list of Archives is kept in a public Archive Registry.
The Archives, as performant data sources of historical on-chain data, are critical to the operation of backend APIs run by major projects in the Polkadot ecosystem (the list is not exhaustive):
- Polkassembly
- Talisman
- RMRK
- SubWallet (+ GiantSquid API)
- KodaDot
- Phala dApp
- Subsocial + Polkaverse
- Stellaswap
- Beamswap
- Polkascan (+ GiantSquid API)
- Calamar (+ GiantSquid API)
- Moonsama/Exosama
- Reef
- Manta Wallet
- ZooDAO
- Zenlink
All archives can be accessed and queried via an web intuitive GraphQL interface and are often used as developer friendly replacement of a block explorer.
For example, here’s a query for the last ten transfers on Kusama blockchain run against the Kusama Archive endpoint.
Over the seconf Quarter of 2023 we've provided a free public data indexing service for ~95 Substrate blockchains (some archives have been dismissed, new ones have been added), so that everyone interested in the projects can publicly access indexed data on Substrate Events, Extrinsics, Storage Items and EVM logs. Here are projects (parachains and mainnets aiming for future parachains slots) we currently support:
- acala
- agung
- aleph-zero
- aleph-zero-testnet
- altair
- amplitude
- astar
- astar-evm
- bajun
- basilisk
- bifrost
- bifrost-polkadot
- bitcountry-pioneer
- calamari
- centrifuge
- cere
- clover
- collectives
- composable-finance
- crab
- crust
- darwinia
- debionetwork
- dorafactory
- efinity
- elysium
- elysium-testnet
- equilibrium
- exosama
- foucoco
- frequency
- frequency-testnet
- gear-testnet
- gemini-2a-testnet
- gmordie
- hashed
- heiko
- hydradx
- imbue
- integritee-network
- interlay
- invarch-tinkernet
- joystream
- kabocha
- karura
- khala
- kilt
- kintsugi
- kusama
- kylin
- litentry
- litmus
- mangata-x
- manta
- moonbase
- moonbase-evm
- moonbeam
- moonbeam-evm
- moonriver
- moonriver-evm
- origin-trail
- pangolin
- parallel
- peaq
- pendulum
- phala
- picasso
- pichiu
- polkadex
- polkadot
- polymesh
- reef
- reef-testnet
- robonomics
- rococo
- shibuya
- shiden
- snow
- soonsocial
- sora
- sora-testnet
- statemine
- statemint
- subsocial
- t0rn
- tanganika
- ternoa
- tidechain
- turing
- vara
- westend-collectives
- xsocial
- xx-network
- zeitgeist
B) Giant Squid Giant Squid is a set of open-source GraphQL APIs built with Squid SDK and maintained by Subsquid Labs. The APIs cover the most commonly used data for Pokadot, Kusama and a growing list of major parachains and is used by explorers (such as Calamar and Polkascan) and wallets (e.g. SubWallet).
The Giant Squid currently consists of two families of endpoints outlined below. The API endpoints for each network and the current status are available at the Status page.
Explorer API. The endpoint URLs follow the convention https://squid.subsquid.io/gs-explorer-${network}/graphql. Support queries on:
- Blocks
- Events
- Extrinsics
- Calls
Statistics API. The endpoint URLs follow the convention https://squid.subsquid.io/gs-stats-${network}/graphql. Support queries on:
- Validator/Collator data
- Account balances
- Staking statistics
- Nomination pools statistics
- Transfers statistics
- Extrinsic statistics
Achievements
- Subsquid Network in private testnet
- Powering ≈ 550 live projects in Q1 2023 ( ≈ 650 as of August 2023) including substrate and evm
- Archive requests increased by 6.5x (from ~160 million to ~1.05 billion)
- Arrow Squid release: The main feature introduced by the ArrowSquid update is the new ability of the processor to ingest unfinalized blocks directly from a network node, instead of waiting for the archive to ingest and serve it first. The processor can now handle forks and rewrite the contents of its database if it happens to have indexed orphaned blocks. This allows Subsquid-based APIs to become near real-time and respond to the on-chain activity with subsecond latency.Another major feature introduced by ArrowSquid is the support for transaction execution receipts, traces and state diffs.
Statistics and data
Over the course of Q2 2023:
Over the course of Q2 2023: Served a total of 1,048,730,936 (~1 billion) queries to the substrate based archives. The highest daily total responses have been 13.6m in a single 24 hour period for substrate. The daily queries confirm a growing trend.
Giant Squid is a service we introduced in Q1 2023, and has been launched in mid-January, here are two charts showing its quick adoption by the community, as an index of its success:
Costing
This proposal includes the combined costs for running Giant Squid and Archives for Polkadot, Kusama and their Parachains,which amounts to a total of 58253.66 DOT. Raw data for Archives can be seen here. Raw data for Giant Squid can be seen here.
The proposal is submitted towards the Polkadot treasury. Here is a summary of the running costs for Archives, in a tabular format:
Giant Squid running costs:
You can read the full report here.
Comments (8)
Requested
Proposal Passed
Summary
0%
Aye
0%
Nay
Aye (110)0.0 DOT
Support0.0 DOT
Nay (44)0.0 DOT
Hello Subsquid,
Thanks for your proposal.
We are enthusiastic to support the growth of sustainable projects that benefit the Polkadot ecosystem while at the same time, working to understand projects' longer term plans. With that in mind, we have a few questions:
— If this proposal was not to succeed, what would be your next steps?
— What is Subsquid’s business model?
— How does Subsquid plan to fund itself on a long term basis?
Best, Ivy
@Ivy
— If this proposal was not to succeed, what would be your next steps?
We have committed to a roadmap that will make on-chain data free for all developers in the ecosystem. Currently, that means a transition from FireSquid Archives to ArrowSquid, which is happening as we speak and is expected to be completed in Q4 of this year. Once this transition is complete, costs will be reduced significantly. Afterwards, we intend to transition all Substrate chain data to our decentralized data lake (‘Subsquid Network’), in which case the data will be paid for on-chain in a way that is very advantageous to developers.
The costs described in this proposal have already been spent. This is a retroactive proposal. Since we have already invested so many resources into the development of ArrowSquid SDK (including support for traces and real-time indexing), we will continue the migration until completion.
However, we would have to take the following measures:
— What is Subsquid’s business model?
Subsquid Labs GmbH has a standard business model for open-source software. We provide an open-source Squid SDK with a paid hosted service called Aquarium. Note that there’s always an option for users of the SDK to self-host. Once the Subsquid Network is live, Subsquid Labs GmbH will be the operator of the network until further decentralization.
— How does Subsquid plan to fund itself on a long term basis?
Funding in the long-term will primarily be from: Aquarium revenues Subsquid Network treasury (when the network goes live). We already have the necessary funding to fulfill our network roadmap. Our support for all Substrate chains as a part of this network does, however, depend on our ability to continue to get retroactive support from the Polkadot treasury.
Big fan of Subsquid, many of the teams, projects and experiments built in Polkadot rely in subsquid — this feels like a perfect application of the Polkadot Treasury.
Voted Aye
-Birdo