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

whitelist lockup query AccountLockedCoins #5906

Merged
merged 8 commits into from
Aug 18, 2023

Conversation

Buckram123
Copy link
Contributor

@Buckram123 Buckram123 commented Jul 28, 2023

What is the purpose of the change

This PR adds lockup query(namely AccountLockedCoins) to stargate query whitelist.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Background

  • lockup.query/AccountLockedCoins: We build an cosmwasm app, for multiple staking providers, on different chains, that has the same API. Except our "query_staked(staking_token, staker_address)" method currently is not implementable on osmosis, because contracts can't query AccountLockedCoins.

@Buckram123 Buckram123 marked this pull request as draft July 28, 2023 13:54
@Buckram123 Buckram123 marked this pull request as ready for review July 28, 2023 14:19
@Buckram123 Buckram123 changed the title whitelist AccountLockedCoins whitelist lockup query AccountLockedCoins and gov query Proposal Jul 28, 2023
@sunnya97
Copy link
Collaborator

sunnya97 commented Aug 6, 2023

QueryProposal can have pretty unknown gas costs, especially if its a CosmWasm prop, that needs to load the entire code

@Buckram123
Copy link
Contributor Author

QueryProposal can have pretty unknown gas costs, especially if its a CosmWasm prop, that needs to load the entire code

Sure, whitelisting QueryAccountLockedCoins more important to us. There are no issues with that query?

@Buckram123 Buckram123 changed the title whitelist lockup query AccountLockedCoins and gov query Proposal whitelist lockup query AccountLockedCoins Aug 7, 2023
Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

So we can add this, but warning that this can have unbounded gas and you probably don't want to actually use this in production. You'd much rather have the FE get the lock-id's, and then do the query based on provided lock ID's

I'm happy to add this in, just warning that may not work how you want

The issue is that it iterates over every single lock the user has. So if they've LP'd in like 50 different pools, thats quite expensive gas wise! (And you probably only care about a small subset)

@ValarDragon ValarDragon added the V:state/breaking State machine breaking PR label Aug 7, 2023
@mergify mergify bot mentioned this pull request Aug 7, 2023
@p0mvn
Copy link
Member

p0mvn commented Aug 18, 2023

Hi @Buckram123 . Based on the latest reply, would you still like to get this whitelisted?

@Buckram123
Copy link
Contributor Author

Hi @Buckram123 . Based on the latest reply, would you still like to get this whitelisted?

Hey, yes, that would be really helpful!

@p0mvn
Copy link
Member

p0mvn commented Aug 18, 2023

Could you please resolve the conflict?

Also, do you mind summarizing ValarDragon's reply via comment above the line whitelisting this query?

@Buckram123
Copy link
Contributor Author

@p0mvn done!

Copy link
Member

@p0mvn p0mvn left a comment

Choose a reason for hiding this comment

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

Thanks!

@p0mvn
Copy link
Member

p0mvn commented Aug 18, 2023

Merging since all requests have been addressed

@p0mvn p0mvn merged commit 2a9b633 into osmosis-labs:main Aug 18, 2023
1 check passed
p0mvn pushed a commit that referenced this pull request Aug 29, 2023
* whitelist AccountLockedCoins

* update changelog

* format changelog

* add gov.query/proposal

* remove query proposal from whitelist

* summarize reply via comment
nicolaslara pushed a commit that referenced this pull request Aug 31, 2023
* whitelist AccountLockedCoins

* update changelog

* format changelog

* add gov.query/proposal

* remove query proposal from whitelist

* summarize reply via comment
@github-actions github-actions bot mentioned this pull request Mar 15, 2024
@github-actions github-actions bot mentioned this pull request Apr 15, 2024
@github-actions github-actions bot mentioned this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants