Skip to content

0.) FAQ

Andrew Plaza edited this page Jan 20, 2022 · 8 revisions

Does Substrate Archive only index finalized blocks? What about chains that do not support finalization?

Substrate Archive is finality-agnostic. It directly indexes blocks from the backend database of a Substrate chain; any and all blocks added to the database backend will be indexed by Substrate Archive. For chains that use Substrate's GRANDPA finalization gadget, only finalized blocks are recorded in the backend database and, as such, only finalized blocks will be indexed by Substrate archive.

How do I debug substrate-archive?

First, you can check the logs for anything that might have gotten wrong. Substrate Archive stores logs in the Data Local Directory:

Platform Value Example
Linux $XDG_DATA_HOME or $HOME/.local/share/substrate_archive/ /home/alice/.local/share/substrate_archive/
macOS $HOME/Library/Application Support/substrate_archive/ /Users/Alice/Library/Application Support/substrate_archive/
Windows {FOLDERID_LocalAppData}\substrate_archive\ C:\Users\Alice\AppData\Local\substrate_archive\

Alternatively, if you are running polkadot-archive or node-template-archive you can see debug logs with -vvv (DEBUG mode) or -vvvv (TRACE mode)

What is the difference between Substrate Archive and Offchain Worker Indexing?

Offchain worker indexing, enabled with the --enable-offchain-indexing flag, does not index the chain like substrate-archive. Instead, it is a flag for offchain workers. Enabling this flag allows substrate runtimes to commit to the same Key-Value database that offchain-worker data is stored.