Coder Social home page Coder Social logo

firehose-cosmos's Introduction

firehose-cosmos

Firehose integration for Cosmos chains

Getting Started

To get started, first clone the repository and install all dependencies:

git clone https://github.com/figment-networks/firehose-cosmos.git
go mod download

Once done, let's build the development binary:

make build

You should be able to use the ./build/firecosmos binary moving forward.

To install the binary globally, run:

make install

Alternatively, use a prebuilt binary from Releases Page

Docker

You can use our official Docker images: https://hub.docker.com/r/figmentnetworks/firehose-cosmos/tags

docker pull figmentnetworks/firehose-cosmos:0.4.0

Execute with:

docker run --rm -it figmentnetworks/firehose-cosmos:0.4.0 /app/firehose help

Usage

To view usage and flags, run: ./build/firecosmos help.

Usage:
  firecosmos [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  init        Initialize local configuration
  reset       Reset local data directory
  start       Starts all services at once
  tools       Developer tools

Flags:
      --common-auth-plugin string            Auth plugin URI, see streamingfast/dauth repository (default "null://")
      --common-merged-blocks-store-url string       Store URL (with prefix) where to read/write (default "file://{fh-data-dir}/storage/merged-blocks")
      --common-live-blocks-addr string       GRPC endpoint to get real-time blocks (default "0.0.0.0:9010")
      --common-first-streamable-block uint   First streamable block number
      --common-metering-plugin string        Metering plugin URI, see streamingfast/dmetering repository (default "null://")
      --common-oneblock-store-url string     Store URL (with prefix) to read/write one-block files (default "file://{fh-data-dir}/storage/one-blocks")
      --common-shutdown-delay duration       Add a delay between receiving SIGTERM signal and shutting down apps. Apps will respond negatively to /healthz during this period (default 5ns)
      --common-startup-delay duration        Delay before launching firehose process
  -c, --config string                        Configuration file for the firehose (default "firehose.yml")
  -d, --data-dir string                      Path to data storage for all components of firehose (default "./fh-data")
  -h, --help                                 help for firecosmos
      --log-format string                    Logging format (default "text")
      --metrics-listen-addr string           If non-empty, the process will listen on this address to server Prometheus metrics (default "0.0.0.0:9102")
      --pprof-listen-addr string             If non-empty, the process will listen on this address for pprof analysis (see https://golang.org/pkg/net/http/pprof/)
  -v, --verbose int                          Enables verbose output (-vvvv for max verbosity) (default 3)

Use "firecosmos [command] --help" for more information about a command.

Configuration

If you wish to use a configuration file instead of setting all CLI flags, you may create a new firehose.yml file in your current working directory.

Example:

start:
  args:
    - reader
    - merger
    - relayer
    - firehose
  flags:
    # Common flags
    common-first-streamable-block: 1

    # Reader specific flags
    reader-mode: node
    reader-node-path: path/to/node/bin
    reader-node-args: start --x-crisis-skip-assert-invariants
    reader-node-env: "KEY=VALUE,KEY=VALUE"

Logs input mode

It's possible to run the firehose reader from the static logs, mostly for development/testing purposes.

Example config:

start:
  args:
    - reader
    # ... other services
  flags:
    # ... other config options

    # reader specific flags
    reader-mode: logs
    reader-logs-dir: /path/to/logs/dir

    # Configure the pattern if not using .log extension
    # reader-logs-pattern: *.log

Supported networks

We provide scripts for running firehose for these networks:

Service Ports

By default, firecosmos will start all available services, each providing a GRPC interface.

  • 9000 - Reader
  • 9010 - Relayer
  • 9020 - Merger
  • 9030 - Firehose

License

Apache License 2.0

firehose-cosmos's People

Contributors

sosedoff avatar emiliocramer avatar lavabyrd avatar pienkowb avatar seb-figment 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.