Skip to content

fix: query all proposals#642

Merged
PaddyMc merged 4 commits intoosmo-v28/0.50.11from
fix/query-all-proposals
Apr 9, 2025
Merged

fix: query all proposals#642
PaddyMc merged 4 commits intoosmo-v28/0.50.11from
fix/query-all-proposals

Conversation

@PaddyMc
Copy link
Copy Markdown
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
Copy Markdown
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

@github-actions

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
Copy Markdown
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
Copy Markdown
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 {
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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