Skip to content

BoostyLabs/boosty-orbtc-indexer

Repository files navigation

OrBTC Indexer

Table of Contents

Build

  1. Setup rust language env.
  2. Build service using just.
  3. Get the release binary.
just build

Prerequisites

Running indexer service requires the following external dependencies:

  • Docker
  • Docker Compose
  • PostgreSQL
  • Bitcoin RPC - due to limitations of the rpc crate that we use, we can work only with bitcoind RPC with user/password authorization and as address must be set IP address, not a domain.

Data Storage Layers

  • PostgreSQL application's main database
  • Redis cache layer

Local Dev Environment

To run the service locally, you need to have several services running in the background. For reference, this is what my local setup looks like:

Running Application

## Start indexer and api-server separatedly

env RUST_LOG=info ./orbtc -c path/to/config.toml api-server

# in the another shell
env RUST_LOG=info ./orbtc -c path/to/config.toml indexer

Use Firehose/Substream Sink dataprovider

  1. Compile orbtc with firehose support:
cargo build --release -p orbtc --features firehose
cp target/release/orbtc ./bin/
cp target/release/orbtc-api ./bin/
cp target/release/orbtc-indexer ./bin/
  1. Add firehose_api_key field to config.toml.

  2. All other steps are same.

Deployment

All required instructions and configurations examples can be found in Deployment Guide

Profile perf

  1. Install perf
  2. Install hotspot - https://github.com/KDAB/hotspot/releases
  3. Install cargo-flamegraph - https://github.com/flamegraph-rs/flamegraph

How to

License

This project is open source under the Apache 2.0 license.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages