forbole / callisto

Callisto (formerly BDJuno) is the official Juno implementation for Big Dipper, the open-source block explorer for Cosmos
https://bigdipper.live
MIT License
91 stars 248 forks source link

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

Open Chuiko-GIT opened 3 months ago

Chuiko-GIT commented 3 months ago

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 commented 3 months ago

The error occurs on line 62

Chuiko-GIT commented 3 months ago

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 commented 3 months ago

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