Chain indexer for the Filecoin network
- Clone the repo:
git clone https://github.com/buidl-labs/filecoin-chain-indexerandcdinto it. - Build:
make build - Setup & run postgres server instructions
- Create db:
createdb filecoinminermarketplace - Migrate db:
./main --cmd=migrate - Set environment variables (sample)
- 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
- 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
1then just the miners specified in ACTIVE_MINERS will be indexed; else all miners in the network will be indexed
- Invocation:
./main --cmd=blocks - Indexes all the block_headers from epoch
TOthroughFROM(backward)
- Invocation:
./main --cmd=messages - Indexes all transactions
- from epoch
TOthroughFROM(backward) ifFOREVER!=1 - from epoch
FROMto ACS_PARSEDTILL (forward) ifFOREVER=1. In this case the process runs forever since theACS_PARSEDTILLvalue keeps increasing.
- from epoch
- During the transactions indexing process, all the changes in owner/worker/control addresses are parsed and written to ADDR_CHANGES