Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRPC Ingest #183

Draft
wants to merge 73 commits into
base: main
Choose a base branch
from
Draft

GRPC Ingest #183

wants to merge 73 commits into from

Conversation

kespinola
Copy link
Collaborator

@kespinola kespinola commented Apr 10, 2024

Goal

Reduce the operational cost and complexity of running DAS by switching to Dragonmouth grpc stream for account and transaction updates.

Upgrade the ingestion engine by refactoring configuration, workers, and metrics.

Approach

Create a new crate named das-grpc-ingest which has 3 primary subcommands.

stream - connects to Dragonmouth and pushes relevant events into a redis queue
ingest - subscribes to redis streams, spawns workers, and processes events using program_transformers crate.
download - fetches metadata json for asset_data replacement to bgtasks
Based on #144

closes #83

Next Steps

  • Remove statsd as a dependency of program_transforms. Make the metrics backend the responsibility of the ingest runtime so prometheus can be used for grpc-ingest but nft_ingester can continue to use statsd.

Diagram

GRPC DAS Ingest V1 drawio

@kespinola kespinola force-pushed the grpc-ingest branch 3 times, most recently from b5d93b9 to a31344f Compare April 15, 2024 13:12

# Cargo.lock
- name: Check lock file
run: |
cargo tree
git checkout Cargo.lock
cargo tree --frozen
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yellowstone crates are referenced using git so require network fetch to retrieve which violates frozen flag.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kespinola kespinola marked this pull request as ready for review April 15, 2024 13:50
@niks3089
Copy link
Collaborator

Went over it quickly and it looks good. One question though, how would this work if we want to backfill some accounts or run account flushes to reindex some accounts?

kevinrodriguez-io and others added 30 commits September 12, 2024 23:28
* feat: allows complete reindex

* chore: allow deprecated borsh package

---------

Co-authored-by: Kyle Espinola <[email protected]>
* feat: mock snapshots code

* refactor: remove dead code

* feat: getting snapshot stream in the works

* feat: adds snapshot stream

* feat: adds config-ingester settings

* Remove dead config

* Add snapshot config in ingester

---------

Co-authored-by: Kevin Rodriguez <[email protected]>
* Include prometheus metric explorer

* Only xadd flush on a timeer

* Follow prom metric naming conventions

* Logging changes for ping-pong grpc
* feat: Add NFT single backfill command (ops) to fetch mint,tokenAcc,metadata for a nft and backfill it to the db

* chore: cleanup

* chore: optimize
* feat: move backfill to bubblegum crate and verfiy to it

* feat: grpc ingest monitor
…le each stream (#168)

* feat : separate global stream to multiple streams depending on programs

* WIP : add metrics for each program subscription

* refactor: add structs with builder for SubscriptionTask and add better shutdown handling

* refactor : separate subscription builder to work on each subscription

* refactor: change pipeline to handle single stream instead of multiple streams

* Update: readme for grpc-ingest, index-readme, ops (#172)

* Update: readme for grpc-ingest, index-readme, ops

* Update : README

* fix: prometheus ports

* chore: resolve comments

* chore: add comments to config files in grpc-ingest (#173)

* change tag name of subscriptions

* Remove topograph from grpc2redis

---------

Co-authored-by: Kyle Espinola <[email protected]>
* time the program transformer tasks

* add consumer labels to metrics
Co-authored-by: Ahzam Akhtar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: gRPC based indexer
7 participants