All Projects → 41north → besu-exflo

41north / besu-exflo

Licence: Apache-2.0 License
A plugin for the Besu enterprise-grade Ethereum client with the aim of making it easier to extract chain data into a variety of different data stores and processing pipelines.

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to besu-exflo

pg credereum
Prototype of PostgreSQL extension bringing some properties of blockchain to the relational DBMS
Stars: ✭ 52 (+225%)
Mutual labels:  postgres, crypto
besu-pro-testnet
Blockchain Pro Test-Net, running on Hyperledger Besu
Stars: ✭ 45 (+181.25%)
Mutual labels:  besu, hyperledger-besu
algobot
Cryptocurrency trading bot with a graphical user interface with support for simulations, backtests, optimizations, and running live bots.
Stars: ✭ 776 (+4750%)
Mutual labels:  crypto
cryptocompare
Python3 Wrapper for the CryptoCompare API
Stars: ✭ 147 (+818.75%)
Mutual labels:  crypto
nodejs-with-postgres-api-example
k8s course example - node.js app with Postgres, Hapi.js and Swagger
Stars: ✭ 59 (+268.75%)
Mutual labels:  postgres
upper
Upper is a open source back-end framework based on the Dart language.
Stars: ✭ 39 (+143.75%)
Mutual labels:  postgres
SmartContractTrading-wFabric1-4-VSCodeExt
Learn now to create a smart contract with VSCode
Stars: ✭ 27 (+68.75%)
Mutual labels:  hyperledger
eventide-postgres
Event Sourcing and Microservices Stack for Ruby
Stars: ✭ 92 (+475%)
Mutual labels:  postgres
wechat-payment
微信支付Node.js基础工具库
Stars: ✭ 26 (+62.5%)
Mutual labels:  crypto
eslint-plugin-sql
SQL linting rules for ESLint.
Stars: ✭ 56 (+250%)
Mutual labels:  postgres
nest-blog-api
Blog Web API with NestJs, Postgres, and Sequelize ORM
Stars: ✭ 69 (+331.25%)
Mutual labels:  postgres
hyperledger-fabric-sdk-php
Client SDK for Hyperledger Fabric for use in PHP applications
Stars: ✭ 40 (+150%)
Mutual labels:  hyperledger
AlphaVantageAPI
An Opinionated AlphaVantage API Wrapper in Python 3.9. Compatible with Pandas TA (pip install pandas_ta). Get your FREE API Key at https://www.alphavantage.co/support/
Stars: ✭ 77 (+381.25%)
Mutual labels:  crypto
cryptocurrency-icons-font
A webfont for cryptocurrency symbols
Stars: ✭ 21 (+31.25%)
Mutual labels:  crypto
substrate-tcr
A Parity Substrate runtime implementation of a simple Token Curated Registry (TCR)
Stars: ✭ 45 (+181.25%)
Mutual labels:  crypto
feathers-objection
Feathers database adapter for Objection.js, an ORM based on KnexJS SQL query builder for Postgres, Redshift, MSSQL, MySQL, MariaDB, SQLite3, and Oracle. Forked from feathers-knex.
Stars: ✭ 89 (+456.25%)
Mutual labels:  postgres
ptrack
Block-level incremental backup engine for PostgreSQL
Stars: ✭ 21 (+31.25%)
Mutual labels:  postgres
walrus
Applying RLS to PostgreSQL WAL
Stars: ✭ 59 (+268.75%)
Mutual labels:  postgres
Crypto
封装多种CTF和平时常见加密及编码C#类库
Stars: ✭ 20 (+25%)
Mutual labels:  crypto
crypto-database
Database for crypto data, supporting several exchanges. Can be used for TA, bots, backtest, realtime trading, etc.
Stars: ✭ 72 (+350%)
Mutual labels:  crypto

Build Badge Exflo License

A plugin for the Besu enterprise-grade Ethereum client with the aim of making it easier to extract chain data into a variety of different data stores and processing pipelines.

Written with ❤️ in Kotlin.

⚠️ Warning: This project is in alpha stage, and we are working actively!

🗒️ Features

Exflo can extract the following information from a Besu archive instance into either a Postgres database or a Kafka topic:

  • Block headers.
  • Transactions.
  • Transaction traces.
  • Log events for standards-compliant ERC20, ERC721, ERC777 and ERC1155 tokens.
  • A detailed breakdown of Ether movements e.g. block rewards, tx fees, simple ether transfers and so on.
  • Contract creations and self-destructs.
  • Per block account state changes.

Some screenshots of captured data:

Plugin Screenshots
Postgres

Kafka

⏲️ Try Exflo in 10 seconds

We offer two docker-compose files ready to launch Exflo configured for Ethereum's Ropsten network (and easily configurable to other networks).

Postgres
docker-compose -f docker/exflo/docker-compose.postgres.yml up
Kafka
docker-compose -f docker/exflo/docker-compose.kafka.yml up

Wait for docker to properly initialize each service. Once everything is ready navigate to http://localhost:8082, you will be greeted with either pgweb or kafkahq.

🚆 Development quick start

Ensure you have the following programs installed in your system:

Clone the repository:

git clone [email protected]:41north/exflo.git

Generate Intellij's run configurations (it will read from the file intellij-run-configs.yml and auto create XML configurations to ease common operations inside the IDE):

./gradlew generateIntellijRunConfigs

Decide which data store you want to run:

Postgres

Terminal:

docker-compose -f docker-compose.exflo-postgres.yml up

Intellij:

Docker Intellij Run

Kafka

Terminal:

docker-compose -f docker-compose.exflo-kafka.yml up

Intellij:

Docker Intellij Run

Wait for each docker service to initialize.

After that, you can start processing with Exflo:

Postgres

Terminal:

./gradlew runPostgres

Intellij:

Postgres Intellij Run

Kafka

Terminal:

./gradlew runKafka

Intellij:

Kafka Intellij Run

You can now check the logs or open your browser and navigate to http://localhost:8082 and you will be greeted with either pgweb or kafkahq respectively.

Exflo will start processing immediately!

Usage with Besu

There are two possible ways of running Exflo with Besu.

Bundled docker images

We have provide a docker image that contains a pre-packaged version of Besu to make your life easier. This is the recommended way of running Exflo as you don't need to worry about placing the plugin in the correct folder path. Below is an an example using docker-compose:

version: "3.7"
services:
  besu:
    image: 41north/exflo:latest
    environment:
      BESU_LOGGING: INFO
      BESU_NETWORK: ROPSTEN
      BESU_SYNC_MODE: FULL
      BESU_DATA_PATH: /opt/besu/data
      BESU_PLUGIN_EXFLO_KAFKA_ENABLED: "false"
      BESU_PLUGIN_EXFLO_POSTGRES_ENABLED: "true"
      BESU_PLUGIN_EXFLO_POSTGRES_JDBC_URL: jdbc:postgresql://postgres/exflo?user=exflo&password=exflo

Have a look at the usage section for a full list of parameters.

JAR

If you are already using Besu with other plugins it is possible to include Exflo as a jar. Below are instructions assuming you are running Besu within docker:

  1. Go to releases and download the tar or zip file and extract it.
  2. Besu docker image relies upon a /etc/besu/plugins folder where it plugin jars. Ensure the Exflo jar is in this folder.

Here's an example of a possible docker configuration using docker-compose syntax and a bind mount for the plugin folder:

version: "3.7"
services:
  besu:
    image: hyperledger/besu:1.4.4
    volumes:
      - ./path/to/exflo-jar/:/etc/besu/plugins
    environment:
      BESU_LOGGING: INFO
      BESU_NETWORK: ROPSTEN
      BESU_SYNC_MODE: FULL
      BESU_DATA_PATH: /opt/besu/data
      BESU_PLUGIN_EXFLO_KAFKA_ENABLED: "false"
      BESU_PLUGIN_EXFLO_POSTGRES_ENABLED: "true"
      BESU_PLUGIN_EXFLO_POSTGRES_JDBC_URL: jdbc:postgresql://postgres/exflo?user=exflo&password=exflo

Have a look at the usage section for more information.

💻 Contribute

We welcome any kind of contribution or support to this project but before to do so:

  • Read our development guide to understand how to properly develop on the codebase.
  • Make sure you have read the contribution guide for more details on how to submit a good PR (pull request).

In addition you can always:

FAQ

Why Besu?

We chose Besu for several reasons:

  1. It is enterprise ready.
  2. It is written in Java, which allows us to work in Kotlin
  3. It has a modern codebase with good patterns and documentation.
  4. There is a plugin system allowing for customisation and integration without the need to maintain a fork.
  5. Their community is open and welcoming (we recommend you join!).

Why not use the Web3 interface that every Ethereum client has?

If you have ever tried this, you will quickly realise that extracting even just the basic information from an Ethereum client via the Web3 interface requires a lot of requests, and some non-trivial logic to do well. On top of that, depending on the client (we won't name anyone in particular), you may find that under heavy load, such as when syncing for the first time, your client may become unstable and periodically core dump. Maximising throughput, whilst keeping the client happy, quickly becomes a tedious exercise.

Put simply it has been our experience that pulling via the Web3 interface is sub-optimal for a variety reasons which are better explored in a blog post.

📬 Get in touch

Exflo has been developed initially by °41North.

If you think this project would be useful for your use case and want to talk more about it you can reach out to us via our contact form or by sending an email to [email protected]. We try to respond within 48 hours and look forward to hearing from you.

✍️ License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].