Astra Block overview
Astra Block is a blockchain data service that offers real-time indexed blockchain data for building Web3 and decentralized applications (dapps).
With Astra Block, you can stream a sanitized blockchain dataset into an Astra database in real-time. The second a new block is mined, your Astra database will immediately be updated with the new, clean blockchain data.
One of the challenges facing Web3 app developers is finding a way to effectively query the blockchain. The blockchain is notoriously difficult to query directly, and trying to read anything other than basic data usually results in unacceptable levels of performance.
To solve this, many Web3 applications have started to rely on blockchain indexing services to create an intelligent mix of on and off-chain data. These indexing services read data from the blockchain, process the data into an organized format, and store the clean data in a database. Applications can then read the indexed data from the database, allowing for more complex queries (like aggregations) at a significantly faster speed than querying the blockchain directly.
However, building and maintaining a blockchain indexing service can often be more challenging than developing the end application itself. Astra Block addresses this challenge by providing an always up-to-date, human-readable copy of the blockchain that comes pre-configured with a development-ready data model that leverages the speed, scale, and resiliency of Apache Cassandra®.
The Astra Block architecture starts with a blockchain indexer (internally-managed by DataStax) that reads the raw data from the blockchain, decodes and enriches the data into a human-readable format, and then writes the enriched data to an internal primary blockchain database hosted in Astra. The indexer automatically subscribes to new blocks so that whenever a block is added to the chain, data is immediately updated in the primary database.
Astra users can create Block-enabled databases in their own Astra organizations and sync blockchain data to them from the primary database. A Block-enabled database can be configured to sync the entirety of a blockchain dataset, or or just a selection of tables in the data model. Also, since the primary database contains a complete index of the entire blockchain, users can choose to backfill historical data, sync just new data, or both.
After a Block-enabled database has been created and configured to sync blockchain data, the data can then be consumed by end-user applications using any of the connection methods supported by Astra.