Closed steampoweredtaco closed 2 years ago
Hi! That error means that responses from the node RPC (in particular, /chains/main/blocks/{level}
) don't contain necessary data (e.g. metadata
fields). You are not the first one who asked this question, so I will write a detailed explanation and pin this issue :)
Roughly speaking, there are two types of storage in the node:
So, when you do RPC request /chains/main/blocks/{level}
the node looks for that block in the block storage and then looks for the context for that block in the context storage. If there is no context for that block, the node returns only raw block data, which is not enought for the indexer.
When the node is working and receiving new blocks, it saves the blocks and also computes and saves context for those blocks. For example, if you check the context for the head block (/chains/main/blocks/head/metadata
) it will always be available.
However, it may be missed for old blocks due to two possible reasons:
Importing fresh node snapshots is the most often reason, actually. This happens because snapshots usually don't contain context data, but only blocks data, so when you import a snapshot you import just the block storage, but the context storage is empty for all blocks from the genesis to the last block in the snapshot.
Let's say you have an indexer that stopped syncing at the block 1000 and then you import a fresh node snapshot which is on the block 1010. When you start the indexer, it tries to fetch the block 1001, but your node doesn't have context for it (due to snapshot), and actually for all blocks older than 1010. So the indexer just can't receive necessary data, and this is what you have faced.
The solution is pretty simple:
You can check at which block the indexer is by calling API /v1/head
, but normally, TzKT exports snapshots daily, so it should be ok to just use node snapshots that are 2-3 days old. This way you will have context for recent blocks, needed to make TzKT catch up with the node.
Hi! First of all thanks for this project; it's great!
I'm trying to use the docker builds with compose. I have tried 1.6.4, 1.7.0, and the latest all with the same issue. I've wiped the data volume each time.
tkzt_sync keeps responding with this general error:
I'm not sure what it is choking on. Perhaps it is because I'm using the newest tezos-node with the updated storage format?
I don't think it matters since I'm using docker but I'm running this on:
Let me know if you need any more information, thank you.