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

[Bug]: /cosmos/tx/v1beta1/txs?query=tx.height= response error #20364

Closed
1 task done
charlie-bit opened this issue May 13, 2024 · 10 comments
Closed
1 task done

[Bug]: /cosmos/tx/v1beta1/txs?query=tx.height= response error #20364

charlie-bit opened this issue May 13, 2024 · 10 comments
Assignees
Labels

Comments

@charlie-bit
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

it response error expected 2 wire type, got 0: tx parse error

Cosmos SDK Version

0.47

How to reproduce?

No response

@charlie-bit
Copy link
Author

here is an example: it's for dydx on dydx-testnet-4 network. api: https://test-dydx-rest.kingnodes.com/cosmos/tx/v1beta1/txs?query=tx.height=12242164

@tac0turtle
Copy link
Member

it seems the block has not been created so there is no information. we should return a better error for sure. Ill open a quick pr

@tac0turtle tac0turtle self-assigned this May 13, 2024
@tac0turtle
Copy link
Member

it seems we do check for height:

if req.Height < 1 || req.Height > currentHeight {
return nil, sdkerrors.ErrInvalidHeight.Wrapf("requested height %d but height must not be less than 1 "+
"or greater than the current height %d", req.Height, currentHeight)
}
. Not sure why you got this error.

could you be using an old binary. I believe dydx is on 0.50

@charlie-bit
Copy link
Author

do you mean I use the old dydx binary? yes dydx is on 0.50.
I use the dydx binary and it use the cosmos sdk innerly. I'm sure the height is smaller than the latest block height.

@charlie-bit
Copy link
Author

I can provide the normal example https://dydx-testnet-api.polkachu.com/cosmos/tx/v1beta1/txs?query=tx.height=10242164 here is an old block, it works well. is it different?

@tac0turtle
Copy link
Member

the link you posted above (https://test-dydx-rest.kingnodes.com/cosmos/tx/v1beta1/txs?query=tx.height=12242164) is for a future block so there is nothing to return. The error is not descriptive

@charlie-bit
Copy link
Author

but it's not future block. here is info in explore https://testnet.dydx.explorers.guru/block/12242164, is it buggy?

@tac0turtle
Copy link
Member

oh weird mintscan shows its in the future, my bad.

I believe this would fix your query #20323. The issue seems related to vote extensions not being able to be decoded. Even in https://testnet.dydx.explorers.guru/block/12242164 the tx fails parsing. Dydx is running a fork of the sdk so they will need to take the above pr and put it on their fork to fix your issue

@charlie-bit
Copy link
Author

cool. it's clear on my side. let me sync to the team. thanks a lot

@tac0turtle
Copy link
Member

closing this for now. If you have further questions or run into more issues please reopen and ill try to answer as fast as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🥳 Done
Development

No branches or pull requests

2 participants