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

Event changes in TM v0.37 #1353

Closed
julienrbrt opened this issue Dec 19, 2022 · 16 comments · Fixed by #1376
Closed

Event changes in TM v0.37 #1353

julienrbrt opened this issue Dec 19, 2022 · 16 comments · Fixed by #1376
Milestone

Comments

@julienrbrt
Copy link
Member

The SDK v0.47 upgrades TM to v0.37, which re-surface cosmos/cosmos-sdk#11997.
According to cosmos/cosmos-sdk#11997 (comment), there is already a TM v0.35 client.

It would be helpful if there is a cosmjs version supporting the event changes in v0.37 (ref: https://github.com/tendermint/tendermint/blob/main/UPGRADING.md#unreleased)

@garrettparris
Copy link

I am getting the same error with the following stack. same versions as above, using @cosmjs 0.29.5

Error: Invalid string. Length must be a multiple of 4
    at getLens (index.js?602a:26:1)
    at Object.toByteArray (index.js?602a:55:1)
    at fromBase64 (base64.js?9836:36:1)
    at decodeAttribute (responses.js?a8ef:45:1)
    at Array.map (<anonymous>)
    at decodeAttributes (responses.js?a8ef:50:1)
    at decodeEvent (responses.js?a8ef:55:1)
    at Array.map (<anonymous>)
    at decodeEvents (responses.js?a8ef:60:1)
    at decodeTxData (responses.js?a8ef:69:1)
    at decodeTxResponse (responses.js?a8ef:319:1)
    at Array.map (<anonymous>)
    at decodeTxSearch (responses.js?a8ef:329:1)
    at decodeTxSearch (responses.js?a8ef:437:1)
    at Tendermint34Client.doCall (tendermint34client.js?7cf7:310:1)
    at async Tendermint34Client.txSearchAll (tendermint34client.js?7cf7:257:1)
    at async StargateClient.txsQuery (stargateclient.js?c525:279:1)
    at async StargateClient.getTx (stargateclient.js?c525:191:1)
    at async pollForTx (stargateclient.js?c525:252:1)

@julienrbrt
Copy link
Member Author

cc @@pyramation

@tac0turtle
Copy link
Member

Should we do this ourself, its a blocker for a variety of things

@webmaster128
Copy link
Member

This particular change was already implemented in the Tendermint 0.35 client last summer. If I understand things correctly, only 0.34 and 0.37 are needed now. So we can rename the 0.35 client to 0.37 and test it against a 0.37 backend.

@webmaster128
Copy link
Member

Is there a better source for Tendermint 0.37 docker images than v0.37.0-rc2 from https://hub.docker.com/r/tendermint/tendermint/tags/ that we should use for testing the client?

@julienrbrt
Copy link
Member Author

Is there a better source for Tendermint 0.37 docker images than v0.37.0-rc2 from hub.docker.com/r/tendermint/tendermint/tags that we should use for testing the client?

I believe it's there https://hub.docker.com/r/cometbft/cometbft/tags/

@webmaster128
Copy link
Member

webmaster128 commented Mar 2, 2023

What do you currently need this client for? I think the standalone client is ready and I can create a StargateClient/CosmWasmClient constructor where you pass an explicit tendermint client (either 34 or 37). The auto-detection would be a bigger thing as the functionality was removed at some point. I don't want to block the client on the auto-detection. Does this make sense?

@webmaster128 webmaster128 modified the milestones: 0.31.0, 0.30.0 Mar 2, 2023
@webmaster128
Copy link
Member

#1376 is ready for anyone wants to review it

@Anmol1696
Copy link

Anmol1696 commented Jun 17, 2023

@webmaster128 maybe I am missing something here, but i am running cosmos-sdk simd

simd version
# 0.47.3

CometBFT version github.com/cometbft/cometbft@v0.37.1

With @cosmjs/faucet at v0.30.0 and v0.30.1, but still seem to be getting this error:

Sending 10000000000 stake from cosmos1dxacpfsesc3h3gznuq4ldtpa0jskdzf7c6z9uy to cosmos1cglefserrv6l3rct7ruuyedm3cxe3ul2nnx4cs ...
Error: Invalid string. Length must be a multiple of 4
    at c (/app/packages/faucet/dist/node/cli.js:2:159563)
    at Object.t.toByteArray (/app/packages/faucet/dist/node/cli.js:2:158637)
    at t.fromBase64 (/app/packages/faucet/dist/node/cli.js:2:2100856)
    at l (/app/packages/faucet/dist/node/cli.js:2:2255810)
    at Array.map (<anonymous>)
    at p (/app/packages/faucet/dist/node/cli.js:2:2255991)
    at Array.map (<anonymous>)
    at A (/app/packages/faucet/dist/node/cli.js:2:2256050)
    at f (/app/packages/faucet/dist/node/cli.js:2:2256218)
    at O (/app/packages/faucet/dist/node/cli.js:2:2261060)

My issue is even though there is an error and server returns 500, some of the times the txn seems to go through and the faucet seems to transfer the tokens.

Am I missing something?

PS. This could just be limited to the Faucet. Please let me know if there is a better place to have this discussion.

@Anmol1696
Copy link

Actually you can see this in the gist of the logs during initialization itself... Error statement during refil, but refil actually happens

https://gist.github.com/Anmol1696/60b3e851b66fe6d45674dea9b4f92081#file-logs-txt

Maybe it is still some old validatation of address?

@webmaster128
Copy link
Member

@Anmol1696 you need a pre-release of 0.31 to get the Tendermint 0.37 client by default

@Anmol1696
Copy link

Ahh yes worked like a charm.
I got confused cuz the changelog mention v0.30 should have this PR. v0.31.0-alpha.2 works with simd v0.47.3

@webmaster128
Copy link
Member

0.30 ships a standalone Tendermint 0.37 client that you can use manually. From 0.31 onwards we have auto-detection in higher level clients and use it by default under the hood. Fianal release very very soon.

@Anmol1696
Copy link

Error re-occurs for cosmos-sdk version 50 as well. Does support for TM 0.38 also need some changes?
@webmaster128 Is there a way in which adding TM support is easier?

I am using cosmjs-facuet for running simd nodes with Starship. It would be nice if cosmos-sdk can be tested with cosmjs (but hard to do if there are too many breaking changes).

@webmaster128
Copy link
Member

High level clients use the Tendermint 0.34 client as a fall back when they find a version that does not start with "0.37". This might explain the problem. Could you open a ticket for Tendermint 0.38 / Cosmos SDK 0.50 support?

@webmaster128
Copy link
Member

It would be nice if cosmos-sdk can be tested with cosmjs (but hard to do if there are too many breaking changes).

This idea has been around for a while but CosmJS does not have the necessary development resources to keep up with Cosmos SDK development. Trying to test Cosmos SDK with an independent re-implementation creates dependency cycles that are very hard to maintain.

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 a pull request may close this issue.

5 participants