用于将以太坊2.0区块链数据导出为CSV和JSON的工具
ethereum2-etl的Python项目详细描述
以太坊2.0 ETL
以太坊2.0 ETL允许您将区块链数据转换为方便的格式,如CSV和关系数据库。在
是否要立即查询以太坊数据?使用public dataset in BigQuery。
Full documentation available here。在
快速启动
安装以太坊2.0 ETL:
pip install ethereum2-etl
同步您自己的节点或请求访问Infura上的节点。在
出口信标块、证明、存款、提议者削减、证明者削减、自愿退出(JSON Schema), CSV Schema, Reference):
^{pr2}$导出信标验证器(JSON Schema, CSV Schema, Reference):
> ethereum2etl export_beacon_validtors --epoch 10\ --output-dir output --output-format json \ --provider-uri https://projectid:secret@medalla.infura.io
导出信标委员会(JSON Schema, CSV Schema, Reference):
> ethereum2etl export_beacon_committees --start-epoch 0 --end-epoch 10\ --output-dir output --output-format json \ --provider-uri https://projectid:secret@medalla.infura.io
查找其他命令here。 阅读this article的 示例SQL查询。在
要了解最新版本,请查看回购并致电
> pip install -e . > python ethereum2etl.py
有用的链接
运行测试
> pip install -e .[dev] > exportETHEREUM2ETL_PROVIDER_URI=https://projectid:secret@medalla.infura.io > pytest -vv
进行毒物测试
> pip install tox > tox
在Docker中运行
- 在
安装Dockerhttps://docs.docker.com/install/
在 - 在
构建docker映像
在> docker build -t ethereum2-etl:latest . > docker image ls
- 在
从映像中运行容器
在> docker run -v $HOME/output:/ethereum2-etl/output ethereum2-etl:latest export_beacon_blocks -s 0 -e 200 -p https://projectid:secret@medalla.infura.io > docker run -v $HOME/output:/ethereum2-etl/output ethereum2-etl:latest export_beacon_blocks -s 2020-08-04 -e 2020-08-05 -p https://projectid:secret@medalla.infura.io
使用以太坊ETL的项目
- Google-公共BigQuery以太坊数据集
- Nansen-区块链分析平台
- Medalla Data Challenge-以太坊2.0区块链分析
- 项目
标签: