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

Callisto[0.50.x]: Bug parse /cosmos.gov.v1.MsgVote for cosmos-sdk 0.50.x #749

Open
Chuiko-GIT opened this issue Aug 2, 2024 · 3 comments

Comments

@Chuiko-GIT
Copy link

Chuiko-GIT commented Aug 2, 2024

Hello,

I’m currently encountering an issue with parsing vote options in the latest version of cosmos-sdk 0.50.x. The parameter I’m passing looks like this: [{"option":"1","weight":"1.000000000000000000"}]. I suspect the issue may be due to changes in the data structure in the new version of the SDK, which might not be handled correctly by the existing parsing logic.

Could you confirm if there have been changes to the expected format for vote options in the new version? If so, could you provide guidance on how to adapt to these changes or if there is a forthcoming update that would resolve this compatibility issue?

Знімок екрана 2024-08-02 о 11 24 35 Знімок екрана 2024-08-02 о 11 27 13 Знімок екрана 2024-08-02 о 11 27 20
@Chuiko-GIT
Copy link
Author

The error occurs on line 62

@Chuiko-GIT
Copy link
Author

Chuiko-GIT commented Aug 2, 2024

I tried to fix the error at line 62 but got the following error at line 67.

Inconsistent Event Data Format in cosmos-sdk 0.50.x

Description:

We have identified a potential bug in the cosmos-sdk version 0.50.x related to the format of event data. The event used to store data in a specific format, but it appears that there has been a change in how vote options are represented in the event payload.

Previous Format:

{ "key": "option", "value": "option:VOTE_OPTION_YES weight:\"1.000000000000000000\"" }

Current Format:

{ "key": "option", "value": "[{\"option\":1,\"weight\":\"1.000000000000000000\"}]" }

In the previous version, the event included the parameter VOTE_OPTION_YES. However, in the new version, the parameter is represented by the numeric value 1.

@dadamu
Copy link
Contributor

dadamu commented Aug 2, 2024

@Chuiko-GIT Can you provide the transaction chain name that occurs the error?

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

No branches or pull requests

2 participants