-
Notifications
You must be signed in to change notification settings - Fork 6
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
Unable to decode blocks (Phoenix) received via RPC using ModuleBasics.RegisterInterfaces #248
Comments
|
Hi @javiersuweijie
I still get the message Are there any other ideas? |
Hey @wolthrax I think here is the problem. Looking at the transaction you provided, the data field after decode. Shows this: This isn't a The switch case assumes that all |
When decoding the transactions, we get an error messagewhen decoding the block, we get an error message:
invalid character '\x12' looking for beginning of value
Working branch: terra-phoenix
File: tx_decoding.go
Function:
I am trying to decode a "MsgRecvPacket" message in a transaction within a block, but I am unable to do so using the ModuleBasics.RegisterInterfaces method. When I attempt to decode the message using this method, I receive an error message indicating that the decoding was unsuccessful.
Steps to reproduce:
Expected result: The "MsgRecvPacket" message should be successfully decoded using the ModuleBasics.RegisterInterfaces method.
Actual result: An error message is displayed, indicating that the decoding was unsuccessful.
Block: 903443
Transaction hash: 70321A8E0FF8B6790ABC5DDE1B8623B9F99B3D58737F993BEDF68135BF0E63BF
Message: MsgRecvPacket
I am using dependencies:
github.com/terra-money/core/v2 v2.2.1
github.com/terra-money/cosmos-sdk v0.45.12-terra.1
github.com/terra-money/tendermint v0.34.21-terra.1
github.com/cosmos/ibc-go/v3 v3.4.0
I have tried decoding other types of messages in transactions (& other blocks) using the ModuleBasics.RegisterInterfaces method, and they have been successful.
Update:
I have identified that the specific issue is with the unmarshalling of the "Data" field of the "MsgRecvPacket" message to a "FungibleTokenPacketData" struct. The error message indicates that the unmarshalling was unsuccessful.
Error location: https://github.com/mapofzones/cosmos-watcher/blob/terra-phoenix/pkg/cosmos_sdk/block/parsing/msg_parsing.go#L195-L199
After reviewing the error message and examining the code, it seems likely that the problem lies with the protobuf codec for FungibleTokenPacketData in the ibc-go library. This will need to be fixed in order to successfully unmarshal the data.
The text was updated successfully, but these errors were encountered: