From 8ed82c5c3997225d6eaecb38c4a7866085811224 Mon Sep 17 00:00:00 2001 From: Bo Wu <bo@aptoslabs.com> Date: Mon, 6 Jan 2025 11:10:47 -0800 Subject: [PATCH] update the doc on internal indexer config --- storage/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/storage/README.md b/storage/README.md index e22c36bb7dcf0..42474070611d3 100644 --- a/storage/README.md +++ b/storage/README.md @@ -150,6 +150,32 @@ storage: enable_indexer: false ``` +## Internal Indexer + +Internal indexer is used to provide data for the following node APIs after DB sharding. + +Account based event APIs +* /accounts/{address}/events/{event_handle}/{field_name} +* /accounts/{address}/events/{creation_number} + +Account based transaction API +* /accounts/{address}/transactions + +Account based resource APIs +* /accounts/{address}/modules +* /accounts/{address}/resources + +The internal indexer is configured as below. +The batch size is used to chunk the transactions to smaller batches before writting to internal indexer DB. +``` +indexer_db_config: + enable_transaction: true // this is required for account based transaction API + enable_event: true // this is required for account based event APIs + enable_statekeys: true // this is required for account based resource APIs + batch_size: 10000 +``` + + ## Backup and Restore CLI tools The DB backup is a concise format to preserve the raw data of the blockchain. It