All notable changes for substrate-archive will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- RabbitMQ is used by-default for task-queue storage. This is an extra dependency that must be started as a service outside of Archive.
- BREAKING: use RabbitMq instead of Postgres for the background tasks queue. Migrations will take place automatically.
- table
_background_tasks
will be dropped. - table
_sa_config
will be added.
- table
- Storage is inserted concurrently based on idle SQL connections.
- Migrated to 2021 edition, enforcing MSRV of
1.56.1
. #390
- BREAKING
Dispatch
generic onArchive
andArchiveBuilder
. - remove native execution. All runtimes will be executed in WASM, either interpreted or compiled.
- Use
async-std
instead ofsmol
for async tasks. (#301) - Additional tests for missing storage & pagination query. (#254)
- Storage Chain Support (#292)
v0.9.5
,v0.9.6
,v0.9.7
wasm tracing runtimes
- BREAKING: PostgreSQL
_background_tasks
table stores data asjsonb
rather thanbytea
. Upgrading should happen automatically when running v0.6.0, but you will not be able to revert to any previous version of archive. (#254) - When restoring storage, blocks are paginated using the
max_block_load
parameter. This cuts memory usage down when many blocks are missing from storage. (#254) - Update dependencies to match client
0.9.7
.
- BREAKING
db_actor_pool_size
is no longer configurable on the builder. Actor pool no longer exists. (#254) - BREAKING
max_tasks
from builder. Max tasks will always be the number of CPUS on the system. (#301) - BREAKING
task_workers
from builder. Task workers will always be number of CPUS on the system. (#301)
- archive no longer hangs on Ctrl-C. (#301)
- Test for tracing enabled wasm-blobs
v0.9.0
,v0.9.1
,v0.9.2
,v0.9.3
(#284) (cd6a446) - Unit testing CI workflow (#288) (482af68)
- Clarify release checklist (#279) (9abef6e) && (#288) (482af68)
- Update dependencies to match runtime
0.9.3
. - Refactor tracing to work with the latest tracing changes in substrate (#273) (b322ded)
- Re-Compile WASM Runtime v0.8.30 with rust compiler version nightly-02-27-2021 to fix 'Storage Root Mismatch' when syncing.
- Fixed wasm runtimes so their names are uniform.
- Release checklist
- Pinned to
substrate
/polkadot
release v0.8.30 - Keeping the
substrate-archive
andsubstrate-archive-backend
crates's versions aligned.
ArchiveBuilder
struct for constructing the indexer.- returns a trait,
Archive
that manages the underlying actor runtime
- returns a trait,
- Archive now reads the
CHAIN_DATA_DB
environment variable if the path to the backend chain database is not passed directly. max_block_load
to configure the maximum number of blocks loaded at once- Two new options to the configuration relative to state tracing:
targets
for specifying runtime targets to trace in WASMfolder
where WASM blobs with tracing enabled are kept.- More on state-tracing here
- Runtime versions between blocks are cached, speeding up block indexing.
- Notification stream from Postgres indexes storage changes in the background.
- no longer need to instantiate a client and manually pass it to the Archive
- rename
run_with
todrive
- Archive now accepts a postgres URL instead of a postgres URL split into its parts.
- Archive will take Postgres URL from environment variable
DATABASE_URL
as a fallback. - Use SQLX for migrations
- SQLX will create a new table in the database,
sqlx_migrations
or similiar. - the older table,
__refinery_migrations
can be safely dropped
- SQLX will create a new table in the database,
- Print out the Postgres URL at startup
- config is now separated into sections for readability. Migration is manual but looking at the new
archive.conf
inpolkadot-archive
ornode-template-archive
folders should help. - Postgres SQL queries are now type checked
- Refactor file layout to
substrate-archive
andsubstrate-archive-backend
. - Decouple Database actors
- upgrade to SQLx 0.5.0
- Overhaul of block indexing. Now uses a Iterator to only collect batches of blocks from the database, taking advantage of the better reading performance of sequential data access. Gathering blocks by RPC is no longer done.
- speed up query for difference between the storage and blocks table -
- switch to a leaner actor framework, xtra
- switch to a persistant background-task-queue for executing blocks, coil.
- batch inserts no longer starve postgres pool of connections
- Switch substrate-archive
LocalCallExecutor
with Substrate'sLocalCallExecutor
- the last frame dependency,
frame-system
. Archive now relies only on generic traits defined in substrate-core. - RPC URL. An RPC URL is no longer required to function.
- integrate database migrations into substrate-archive library
- Speed up Storage Indexing by re-executing blocks
- refactored error types
- dependencies for service and backend
- storage inserts
- node-template-archive
- Create a CLI for indexing kusama
- New PostgreSQL Schema
- Actors to model dataflow
- Use a rocksdb-backed substrate client instead of RPC for indexing