Skip to content

Latest commit

 

History

History

indexer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Indexer

The indexer listens to each block that gets stored in the Lake S3 bucket, by using the near-lake-framework, and reacts to only function calls sent to the Horizon smart contract.

Here is the flow outline of how this happens:

  1. A new block is read from the S3 bucket
  2. For each shard in the block, iterate over the transactions and filter out the transaction hash and receipt ID if the transaction receiver ID is of interest - source
  3. Collect those receipt IDs and transaction hashes in a HashMap - source
  4. Filter out the current block's receipts based on the map of receipt IDs and transaction hashes, and get their ExecutionOutcomes with the same transaction hashes - source
  5. Process each outcome in order to extract all actions that are of interest and format them in the correct struct - source
  6. Store the collected actions in our database - source
  7. Store the last visited block height - source

NOTE: Keep track of the migration to 0.8.0.