这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: query all proposals #642

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

Merged
merged 4 commits into from
Apr 9, 2025
Merged

Conversation

PaddyMc
Copy link
Collaborator

@PaddyMc PaddyMc commented Apr 8, 2025

Description

fix query:

  • osmosisd q gov proposals --output json --page-reverse

Currently on mainnet this fails:

  • osmosisd q gov proposals --output json --page-reverse --node https://rpc.osmosis.zone

The number of proposals that are ignored is:

855 - 847 = 8

see: https://www.mintscan.io/osmosis/proposals

case count < limit:
kv, err := iterator.KeyValue()
if err != nil {
if strings.Contains(err.Error(), "no concrete type registered for type URL") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the fix

This comment has been minimized.

case count == limit:
key, err := iterator.Key()
if err != nil {
if strings.Contains(err.Error(), "no concrete type registered for type URL") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added here as well just incase

} else {
kv, err := iterator.KeyValue()
if err != nil {
if strings.Contains(err.Error(), "no concrete type registered for type URL") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added here as well just incase

}

kv, err := iterator.KeyValue()
if err != nil {

Choose a reason for hiding this comment

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

Are we missing the fix here as well? This is called when the key param is provided for pagination afaik

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good shout added

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.

I reviewed the fix lines, I did not review that they match the original function. The fix lines look correct to me.

@PaddyMc PaddyMc merged commit ae97fc8 into osmo-v28/0.50.11 Apr 9, 2025
46 of 47 checks passed
@PaddyMc PaddyMc deleted the fix/query-all-proposals branch April 9, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants