Skip to content

buidl-labs/filecoin-chain-indexer

Repository files navigation

filecoin-chain-indexer

Chain indexer for the Filecoin network

Getting Started

  • Clone the repo: git clone https://github.com/buidl-labs/filecoin-chain-indexer and cd into it.
  • Build: make build
  • Setup & run postgres server instructions
  • Create db: createdb filecoinminermarketplace
  • Migrate db: ./main --cmd=migrate
  • Set environment variables (sample)

List of Tasks

1. ActorCodesTask

  • Invocation: ./main --cmd=actorcodes
  • Indexes all actors (till a particular epoch) in the network and their corresponding actor code, stores them in the json file ACTOR_CODES_JSON
  • The epoch till which actor codes have been indexed is stored in the file ACS_PARSEDTILL

2. MinersTask

  • Invocation: ./main --cmd=miners
  • Indexes miner info (and funds) at EPOCH or (latest tipset - 900)
  • Overwrites the values in the db forever
  • If ACTIVE_MINERS_ONLY is 1 then just the miners specified in ACTIVE_MINERS will be indexed; else all miners in the network will be indexed

3. BlocksTask

  • Invocation: ./main --cmd=blocks
  • Indexes all the block_headers from epoch TO through FROM (backward)

4. MessagesTask

  • Invocation: ./main --cmd=messages
  • Indexes all transactions
    • from epoch TO through FROM (backward) if FOREVER!=1
    • from epoch FROM to ACS_PARSEDTILL (forward) if FOREVER=1. In this case the process runs forever since the ACS_PARSEDTILL value keeps increasing.
  • During the transactions indexing process, all the changes in owner/worker/control addresses are parsed and written to ADDR_CHANGES

5. MarketsTask

  • Invocation: ./main --cmd=markets
  • Fetches all ongoing market deals at EPOCH or (latest tipset - 900) and inserts them to the db

Releases

No releases published

Packages

No packages published

Languages