Chain indexer for the Filecoin network
- Clone the repo:
git clone https://github.com/buidl-labs/filecoin-chain-indexer
andcd
into 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
1
then 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
TO
throughFROM
(backward)
- Invocation:
./main --cmd=messages
- Indexes all transactions
- from epoch
TO
throughFROM
(backward) ifFOREVER!=1
- from epoch
FROM
to ACS_PARSEDTILL (forward) ifFOREVER=1
. In this case the process runs forever since theACS_PARSEDTILL
value keeps increasing.
- from epoch
- During the transactions indexing process, all the changes in owner/worker/control addresses are parsed and written to ADDR_CHANGES