Indexer ReadApi::get_chain_identifier
should rely on IndexerReader::get_chain_identifier
#6156
Labels
infrastructure
Issues related to the Infrastructure Team
Description
Currently, the Indexer
ReadApi::get_chain_identifier
relies on theIndexerReader::get_checkpoint
to derive the required chain identifier. For that it fetches checkpoint 0 from the database and converts the checkpoint digest into the chain identifier:Considering pruning, if the checkpoint is not available this RPC function, this will fail. To solve this, it should make use of the newly introduced
IndexerReader::get_chain_identifier
function in #6123.This function relies on the
chain_identifier
table which should be always populated even if we enable pruning. This field is initialized when the Indexer starts the first time and syncs checkpoint 0. On data pruning, this field should continue to exist.The newly introduced
IndexerReader::get_chain_identifier
not only brings more stability to the RPC, it also exposes the functionality to all other APIs if needed, which the originalReadApi::get_chain_identifier
did not.Task
Use
IndexerReader::get_chain_identifier
in theReadApi::get_chain_identifier
implementation for more RPC stability.The text was updated successfully, but these errors were encountered: