Subsquid - Public data indexing Infrastructure for Polkadot and Kusama (Q3 2022)
Summary
Proponent: Subsquid Lab Official - FAyqRVLZmXVUU9pNeG8w8SxS5xRgN8FRGeWLL6u9S32TMHc
Short description: Ongoing costs for the running of high performance, scalable, and reliable data indexing infrastructure for most of the Polkadot and Kusama ecosystem (and growing).
Raw data: Archive Infrastructure Metrics - July, August, September
Requested KSM: 1,407.29 KSM
Previous proposals:
https://kusama.polkassembly.io/treasury/171
https://polkadot.polkassembly.io/treasury/134
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
All archives can be accessed and queried via an web intuitive GraphiQL 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 third Quarter of 2022 we've provided a free public data indexing service for ~35 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 Kusama's projects (parachains and mainnets aiming for future parachains slots) we currently support:
At the end of Q2 Subsquid released a new generation of Archives, together with a major version of the SDK, both code named "Fire Squid".
The improvements brought by this release include:
Subsquid has also engaged in continuously improving the product, iteratively working on adding features, such as EVM Transactions indexing, and subscriptions to queries in the Graphql endpoints of indexing projects created with the Subsquid SDK (commonly called squids).
Previously, we used to keep data almost indefinitely, now we only keep the last month, so because of changes in internal policies on data retention and in our infrastructure, only partial information is available for the period. The month of September can be used as a sample, though.
Between 2022-09-03 (the oldest available data) and 2022-09-30 Subsquid’s Archive infrastructure has collectively:
Data from the month of October confirms the linear trend, allowing us to make assumptions for the months of July and August, given the steady growth of queries over time shown.
Despite being only an estimation and result of linear regression, a chart encompassing the totality of Q3 can be produced, estimating the total queries served over the three months period, which roughly amounts to 430 millions:
The proponent and beneficiary of this proposal is Subsquid Lab Official (wallet address, contact email).
Over the course of Q3, Subsquid had access to Cloud credits, so there has been a sizable reduction of sustained costs, and this proposal only considers the subtotal, after Cloud credits and discounts have been applied.
This proposal includes the combined costs for running Archives for Polkadot, Kusama and their Parachains, which amounts to a total of 1,407.29 KSM - raw data is here.
The submission will alternate between treasuries, this has been advised by the council, to avoid generating overhead, involving two separate votings, for smaller amounts.
Service | Cost | Discount | Credits | Subtotal | USD Cost | KSM Cost |
Compute Engine | CHF 21,116.02 | -CHF 371.02 | -CHF 3,479.39 | CHF 17,265.61 | $18,474.20 | 710.55 KSM |
Cloud SQL | CHF 18,338.70 | CHF 0.00 | -CHF 2,669.28 | CHF 15,669.42 | $16,766.28 | 644.86 KSM |
Cloud Logging | CHF 1,108.19 | CHF 0.00 | -CHF 174.42 | CHF 933.77 | $999.13 | 38.43 KSM |
Kubernetes Engine | CHF 285.66 | CHF 0.00 | -CHF 39.12 | CHF 246.54 | $263.80 | 10.15 KSM |
Cloud Storage | CHF 81.10 | CHF 0.00 | -CHF 10.95 | CHF 70.15 | $75.06 | 2.89 KSM |
Cloud DNS | CHF 6.62 | CHF 0.00 | -CHF 0.88 | CHF 5.75 | $6.15 | 0.24 KSM |
Networking | CHF 4.57 | CHF 0.00 | -CHF 0.73 | CHF 3.84 | $4.11 | 0.16 KSM |
Cloud Key Management Service (KMS) | CHF 0.51 | CHF 0.00 | -CHF 0.08 | CHF 0.43 | $0.46 | 0.02 KSM |
Artifact Registry | CHF 0.44 | CHF 0.00 | -CHF 0.07 | CHF 0.37 | $0.40 | 0.02 KSM |
Stackdriver Monitoring | CHF 0.00 | CHF 0.00 | CHF 0.00 | CHF 0.00 | $0.00 | 0.00 KSM |
Total | CHF 34,195.88 | $36,589.59 | 1,407.29 KSM | |||
Polkadot | CHF 17,533.38 | $18,760.71 | 721.57 KSM | |||
Kusama | CHF 16,662.50 | $17,828.88 | 685.73 KSM |
The table above is using the average of rate exchanges from the week of January 10, 2023, when the proposal is being submitted.