Git Product home page Git Product logo

eksportisto's Introduction

Eksportisto

Eksportisto (meaning 'exporter' in Esperanto) is a lightweight Celo blockchain parser we've built for internal and external use at cLabs. It will print all transactions (take a look in the monitor directory to see exactly how it parses these) to standard out and additionally exposes Prometheus compatible metrics on port 8080.

Eksportisto uses SQLite to keep track of the last block parsed, so it is safe to start and stop without having to reparse the whole chain.

At cLabs we often rely on (Google's Operations (formerly Stackdriver))[https://cloud.google.com/products/operations] to collect these standard out logs and derive insights.

How do I use it?

Running a full node

We'd recommend running a Celo full node on the same network as Eksportisto. Taks a look at our documentation for running a full node if you haven't already.

In addition to the steps in the above guide, you'll also need to make sure you run your full node with the following command line arguments:

  • --ws
  • --wsapi eth,net,web3,debug
  • --wsaddr 0.0.0.0
  • --gcmode archive

Starting up Eksportisto

To start parsing blocks it should be as simple as running go run main.go from the root of this repository. We also maintain a Dockerfile if you want to run Eksportisto in a container.

The command line parameters most relevant to getting started quickly are:

  • -nodeUri (default ws://localhost:8546) use this to point at your running full node
  • -datadir (default $HOME/.eksportisto) where the Sqlite data directory will be stored. This is especially relevant if you choose to run Eksportisto in a Docker container and want to mount the same directory every time
  • -sensitiveAccounts allows passing a JSON file of addresses->url entries. Whenever a transfer is initiated from one of these addresses a webhook will be sent with the payload of the transaction. It's important to note that these webhooks will only fire when in tipMode, or when Eksportisto has caught up to the tip of the chain and is reading blocks as they come.
  • -from-block allows passing a from block to start exporting metrics at

More information can be found by running go run main.go --help.

Block 2899 is where contract migrations begin.

Deployment steps

  1. Switch to the right project with gcloud cli gcloud config set project <project name>
  2. Update the env file of the network you want to deploy to (.env, or env.baklava, env.alfajores, etc) with the docker image hash
  3. Update suffix (so you don't overwrite)
  4. Make sure to have this env variables set in your terminal . GETH_ENABLE_METRICS=false . GOOGLE_APPLICATION_CREDENTIALS=false
  5. Install terraform v0.12 if you haven't already . Download it from this this link . Install it withmv ~/Downloads/terraform /usr/local/bin/
  6. It's a know issue that celo_tf_state should be replaced for celo_tf_state_prod in this file
  7. Finally deploy with celotool: celotooljs deploy initial eksportisto -e <env_name> --verbose --yesreally

eksportisto's People

Contributors

nambrot avatar diminator avatar martinvol avatar mcortesi avatar tkporter avatar yorhodes avatar

Watchers

James Cloos avatar  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.