Coder Social home page Coder Social logo

vincijy / ethereum2-etl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blockchain-etl/ethereum2-etl

0.0 0.0 0.0 263 KB

Python scripts for ETL (extract, transform and load) jobs for Ethereum 2.0 beacon blocks, attestations, deposits, slashings, validators, committees. Data is available in Google BigQuery

Home Page: https://console.cloud.google.com/bigquery?page=dataset&d=crypto_ethereum2_medalla&p=public-data-finance

License: MIT License

Python 99.58% Dockerfile 0.42%

ethereum2-etl's Introduction

Ethereum 2.0 ETL

Build Status Join the chat at https://gitter.im/ethereum-eth Telegram Discord

Ethereum 2.0 ETL lets you convert blockchain data into convenient formats like CSVs and relational databases.

Do you just want to query Ethereum data right away? Use the public dataset in BigQuery.

Full documentation available here.

Quickstart

Install Ethereum 2.0 ETL:

pip install ethereum2-etl

Sync your own node or request access to node on Infura.

Export beacon blocks, attestations, deposits, proposer slashings, attester slashings, voluntary exits (JSON Schema, CSV Schema, Reference):

> ethereum2etl export_beacon_blocks --start-block 0 --end-block 200 \
--output-dir output --output-format json \
--provider-uri https://projectid:[email protected]

Export beacon validators (JSON Schema, CSV Schema, Reference):

> ethereum2etl export_beacon_validtors --epoch 10 \
--output-dir output --output-format json \
--provider-uri https://projectid:[email protected]

Export beacon committees (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:[email protected]

Find other commands here. Read this article for example SQL queries.

For the latest version, check out the repo and call

> pip install -e . 
> python ethereum2etl.py

Useful Links

Running Tests

> pip install -e .[dev]
> export ETHEREUM2ETL_PROVIDER_URI=https://projectid:[email protected]
> pytest -vv

Running Tox Tests

> pip install tox
> tox

Running in Docker

  1. Install Docker https://docs.docker.com/install/

  2. Build a docker image

     > docker build -t ethereum2-etl:latest .
     > docker image ls
    
  3. Run a container out of the image

     > docker run -v $HOME/output:/ethereum2-etl/output ethereum2-etl:latest export_beacon_blocks -s 0 -e 200 -p https://projectid:[email protected]
     > 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:[email protected]
    

Projects using Ethereum ETL

ethereum2-etl's People

Contributors

askeluv avatar medvedev1088 avatar pswies avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.