filecoin-chain-indexer
所属分类:数值算法/人工智能
开发工具:GO
文件大小:1227KB
下载次数:0
上传日期:2021-07-30 20:18:00
上 传 者:
sh-1993
说明: filecoin链索引器,filecoin网络的链索引器
(Chain indexer for the Filecoin network
,)
文件列表:
.env.sample (514, 2021-07-31)
Dockerfile (718, 2021-07-31)
Makefile (25, 2021-07-31)
acspt (6, 2021-07-31)
actorCodes.json (20512247, 2021-07-31)
chain (0, 2021-07-31)
chain\indexer.go (7399, 2021-07-31)
chain\minertxns.go (6378, 2021-07-31)
chain\tipset.go (235, 2021-07-31)
chain\walker.go (9020, 2021-07-31)
chain\watcher.go (14, 2021-07-31)
config (0, 2021-07-31)
config\config.go (222, 2021-07-31)
db (0, 2021-07-31)
db\migrations (0, 2021-07-31)
db\migrations\20210317193904_0_initial.sql (8786, 2021-07-31)
db\migrations\20210408011005_1_tmp_messages.sql (1290, 2021-07-31)
db\migrations\20210418181902_2_add_miner_indices.sql (766, 2021-07-31)
db\migrations\20210506212111_3_add_transactions_return.sql (387, 2021-07-31)
db\sql.go (18205, 2021-07-31)
extern (0, 2021-07-31)
extern\fil-blst (0, 2021-07-31)
extern\filecoin-ffi-stub (0, 2021-07-31)
extern\filecoin-ffi-stub\bls.go (760, 2021-07-31)
extern\filecoin-ffi-stub\go.mod (258, 2021-07-31)
extern\filecoin-ffi-stub\go.sum (13335, 2021-07-31)
extern\filecoin-ffi-stub\iface.go (2925, 2021-07-31)
extern\filecoin-ffi-stub\types.go (756, 2021-07-31)
go.mod (3142, 2021-07-31)
go.sum (214172, 2021-07-31)
init.sh (505, 2021-07-31)
lens (0, 2021-07-31)
lens\interface.go (5090, 2021-07-31)
lens\lotus (0, 2021-07-31)
lens\lotus\api.go (15097, 2021-07-31)
lens\lotus\cachestore.go (1328, 2021-07-31)
... ...
# 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](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04)
- Create db: `createdb filecoinminermarketplace`
- Migrate db: `./main --cmd=migrate`
- Set environment variables ([sample](.env.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](actorCodes.json)
- The epoch till which actor codes have been indexed is stored in the file [ACS_PARSEDTILL](acspt)
### 2. MinersTask
- Invocation: `./main --cmd=miners`
- Indexes miner info (and funds) at [EPOCH](.env.sample) or (latest tipset - [900](https://spec.filecoin.io/#section-glossary.finality))
- Overwrites the values in the db forever
- If [ACTIVE_MINERS_ONLY](.env.sample) is `1` then just the miners specified in [ACTIVE_MINERS](servedir/activeMiners.json) 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](acspt) (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](servedir/addrChanges.json)
### 5. MarketsTask
- Invocation: `./main --cmd=markets`
- Fetches all ongoing market deals at [EPOCH](.env.sample) or (latest tipset - [900](https://spec.filecoin.io/#section-glossary.finality)) and inserts them to the db
近期下载者:
相关文件:
收藏者: