Release updates for snapshot of Polkadot and Kusama dictionary projects

We released the updates for snapshot of Polkadot and Kusama dictionary projects.

Main Changes

  • Update the script to include the time cost for db restore process.
  • Release updated Polkadot snapshot, includes the fixed for MMR root values.

Output the restore logs

The previous cmd provided in the documents to run the in the background failed to catch the restore log which makes it hard to identify the restore progress. Please try to use nohup to run the script and save all the logs to a local file. For example:

nohup sh /home /home/ec2-user/indexer-services/.data/postgres/ > restore.log 2>&1 &

The log looks like:

POI folder /home/poi/QmRwisx41SRrR8fhNTRpKetNdpP7SaNkRAVrRgcdwoEtCH created
Copy .mmr file to poi folder: /home/poi/QmRwisx41SRrR8fhNTRpKetNdpP7SaNkRAVrRgcdwoEtCH
Copy restore data to db folder
Start restoring project QmRwisx41SRrR8fhNTRpKetNdpP7SaNkRAVrRgcdwoEtCH at 2023-05-05 10:42:17
pg_restore: connecting to database for restore
pg_restore: processing item 3356 ENCODING ENCODING
pg_restore: processing item 3357 STDSTRINGS STDSTRINGS
pg_restore: processing item 3358 SEARCHPATH SEARCHPATH

Once the restore completed, you should expect to see:

pg_restore: finished main parallel loop
Complete restoring project QmRwisx41SRrR8fhNTRpKetNdpP7SaNkRAVrRgcdwoEtCH at 2023-05-07 11:43:11

Do I need to terminate the running restore process

No, if you already run the restore for a project, you don’t need to make anything changes. Just wait for the existing restore complete.

If you are not start restore yet but download with the old snapshot, we would recommend you to redownload the latest one for restoring. The latest snapshot includes a file in the project folder and show v1.0.

Note that indexers restored polkadot projects before v1.0, still need to following this instruction to start indexing the polkadot project: Fix indexing for Polkadot dictionary


so we don’t need to purge POI if we downloaded the latest snapshot version?

and does the script make task in the background, or it will be better to use tmux for it? for ex.:

tmux new-session -d -s restorePolkadot 'nohup sh /home /home/ec2-user/indexer-services/.data/postgres/ > restore.log 2>&1 &'

It’s correct, indexing with the latest snapshot doesn’t need to use with purge POI.
You can nohup cmd to run the task in the background. The cmd is in the above doc.

1 Like

Practice has shown that we have to purge poi even with snapshot v1, or we get “ERROR: for query_qmz Container “xxx” is unhealthy.
Encountered errors while bringing up the project.”