Skip to content

Commit

Permalink
pindexer: indexing for insights dashboard (penumbra-zone#4898)
Browse files Browse the repository at this point in the history
Closes penumbra-zone#4896.

This adds the requisite tables, with a component parametrized by the
numeraire for price information. Price information uses candlestick data
for generating the price, so the recently added event will need to be
used there.

This also backfills in rich domain types into old crates as necessary,
for convenience.

Also closes penumbra-zone#4883, since at this point we've refactored out all
requisite schemas.

## Checklist before requesting a review

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

  > indexing only
  • Loading branch information
cronokirby authored Oct 21, 2024
1 parent ac84743 commit 112bb24
Show file tree
Hide file tree
Showing 22 changed files with 1,528 additions and 262 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/bin/pindexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ penumbra-app = {workspace = true, default-features = false}
penumbra-auction = {workspace = true, default-features = false}
penumbra-dex = {workspace = true, default-features = false}
penumbra-fee = {workspace = true, default-features = false}
penumbra-funding = {workspace = true, default-features = false}
penumbra-keys = {workspace = true, default-features = false}
penumbra-governance = {workspace = true, default-features = false}
penumbra-num = {workspace = true, default-features = false}
Expand Down
9 changes: 9 additions & 0 deletions crates/bin/pindexer/src/indexer_ext.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::str::FromStr;

pub trait IndexerExt: Sized {
fn with_default_penumbra_app_views(self) -> Self;
}
Expand All @@ -13,5 +15,12 @@ impl IndexerExt for cometindex::Indexer {
.with_index(crate::dex_ex::Component::new())
.with_index(crate::supply::Component::new())
.with_index(crate::ibc::Component::new())
.with_index(crate::insights::Component::new(
penumbra_asset::asset::Id::from_str(
// USDC
"passet1w6e7fvgxsy6ccy3m8q0eqcuyw6mh3yzqu3uq9h58nu8m8mku359spvulf6",
)
.ok(),
))
}
}
Loading

0 comments on commit 112bb24

Please sign in to comment.