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

pindexer: implement override for hardcoded values in app views #4936

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cronokirby
Copy link
Contributor

Describe your changes

This adds two flags:

 --indexing-denom <INDEXING_DENOM>
            The denom to use for indexing related components, of the form passet1... [default:
            passet1w6e7fvgxsy6ccy3m8q0eqcuyw6mh3yzqu3uq9h58nu8m8mku359spvulf6

for setting the denom used for indexing (instead of USDC)

and

--dex-ex-min-liquidity <DEX_EX_MIN_LIQUIDITY>
            The minimum liquidity for the indexing denom in the dex explorer app view [default:
            100000000]

for overriding the minimum liquidity in terms of that asset for a pair to be considered in the aggregate dex explorer summary.

Closes #4920.

For testing, we can try running this against the testnet with different values.

Checklist before requesting a review

  • I have added guiding text to explain how a reviewer should test these changes.

  • 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

@conorsch
Copy link
Contributor

Rebased on latest main (ad95d8c) to include #4934, to make testing this more straightforward.

@conorsch
Copy link
Contributor

I tried reindexing testnet chain data with args --indexing-denom passet14h46dmcyy6fl5vyz7xx933n8l7jy202ahrxg92kad6yfladsvcyqczcwda --dex-ex-min-liquidity 1000 and then ran the dex-explorer interface against that local db. I'm still seeing "no summary found" for the UM/TestUSD pair, though:

dex-no-summary

I'm certain there's liquidity there, because when I view my own LPs:

❯ /opt/penumbra/v0.80.8/pcli view lps
Scanning blocks from last sync height 1004961 to latest height 1004961
[0s] ██████████████████████████████████████████████████       0/0       0/s ETA: 0s
 ID                                                                State    Fee  Sell Price                     Reserves
 plpid1txm38c70q27rk5nm6fpmm9h0da20n3ljqzvw8cpc70mdjrwjfz0st2xltr  opened  0bps   1penumbra           996.352359test_usd
 └──────────────────────────────────────────────────────────────▶          0bps   1test_usd             3.647797penumbra
 plpid1fj5td3yvjkscvr97y0wztmtzs4yfekjp5zxjrfaxwxczuzg2lgdqmxxc2m  opened  0bps   1penumbra  647641000000000000wtest_usd
 └──────────────────────────────────────────────────────────────▶          0bps   1test_usd            999.35245penumbra

The dex explorer can display summaries for gm/gn just fine:

dex-gm-summary

Am I wrong to assume that using this PR would affect summaries in the dex explorer? Should I instead be trying with the insights app?

@cronokirby
Copy link
Contributor Author

hmm, I'm going to try this on my end as well ; a priori I'd expect it to start working 🤔 Checking insights would be good as well

This looks backwards for the current price and liquidity,
allowing us to handle cases where snapshots are sparse, like on the
testnet.
@cronokirby
Copy link
Contributor Author

I pushed a commit which fixed unrelated issues with the behavior of the summary tab for assets with infrequent trading.

I don't think the dex explorer frontend has the relevant page where this overriden value matters, which is the "aggregate summary" page (where "explore" will point to)

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.

pindexer: add override for indexing asset id
2 participants