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

Unable to parse PayForBlobs via CLI #1620

Closed
4 tasks
kinrokinro opened this issue Apr 11, 2023 · 2 comments · Fixed by #1666
Closed
4 tasks

Unable to parse PayForBlobs via CLI #1620

kinrokinro opened this issue Apr 11, 2023 · 2 comments · Fixed by #1666
Assignees
Labels
bug Something isn't working

Comments

@kinrokinro
Copy link
Contributor

kinrokinro commented Apr 11, 2023

Summary of Bug

I have this output when tryin to parse any MsgPayForBlobs

celestia-appd q tx 117860E06D33C91DE2B032592631E078DED01A6612E79F1044D0FA8FB3463363
Error: unable to resolve type URL 
 /celestia.blob.v1.MsgPayForBlobsd
/celestia1xh9qhadn3aehnm9h3zmurcf9p4p9uj7w46kgs�Qv|��" �aȼ����
                                                              ��)�4{nJ ��B��B: tx parse error

Or

celestia-appd q tx 62F28F6042E94684E223EB80013C97F512CFF5B018CB5F11A3F49E23C5E74ED8
Error: unable to resolve type URL 
 /celestia.blob.v1.MsgPayForBlobsd
��s���թ��fzB: tx parse errorzfmnqvmzeqae4zlzpun���Z��pe�" $M�z�BVM$��i��

Version

cosmos_sdk_version: v0.46.7
go: go version go1.19.3 linux/amd64
name: celestia-app
server_name: celestia-appd
version: 0.12.1

Steps to Reproduce

Try to parse any MsgPayForBlobs tx, i.e.:

celestia-appd q tx 117860E06D33C91DE2B032592631E078DED01A6612E79F1044D0FA8FB3463363

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@kinrokinro kinrokinro added the bug Something isn't working label Apr 11, 2023
@evan-forbes evan-forbes added this to the Mainnet milestone Apr 12, 2023
@vanphandinh
Copy link

The same problem in the API server: https://api.celestia.chainno.de/cosmos/tx/v1beta1/txs/2866B2A62C2BD8747C897654465CB9383D85F7EBC9474AA352C33985953BD4F5
I’m looking forward to the next patch to fix it.

@rootulp
Copy link
Collaborator

rootulp commented Apr 24, 2023

Investigation notes

  • The error appears to originate from here which indicates that the MsgPayForBlobs wasn't registered correctly
  • MsgPayForBlobs should be registered here and here
  • This error reproduces on the v0.12.x release branch and on main
  • When I reproduced this error on a local devnet, I encounter:
    $ celestia-appd query tx CF5E218E82DA3E4E6B35F383499B8E5FF4B737C90D3E3D4AE7BE682252FA98DE
    Error: unable to resolve type URL
    /celestia.blob.v1.MsgPayForBlobs|
    /celestia1fp2s6cyxp9cay8hrwm757cffg8h543warx8x7n!��[d�pcs�gd" �'$Q��P��s����~Y&�)ۖ��+FB: tx parse error
    
  • The TypeURL that is being searched for is incorrect.
    looking for typeURL:
    /celestia.blob.v1.MsgPayForBlobs|
    /celestia1v0wz7dxmhxfp8fpwh4azjpg4dx9t2e7snm530s!΢t�E�5�pHd" �E�T��S`c�Ӎ�a�Mo�
    ڇEc慼���B
    
    when the TypeURL in the registry.typeURLMap is:
    key: /celestia.blob.v1.MsgPayForBlobs
    
  • This looks wrong although that appears applicable to the non-Amino codec and the prefix of the type URL that is used indicates that it's trying to match on the Amino codec. The SDK docs aren't helpful at explaining which codec (non-Amino vs Amino) is used under which circumstances.
  • protoMessageName contains an incorrect TypeURL here. There is no diff between upstream and celestiaorg/cosmos-sdk for this method.
  • MsgPayForBlobs is defined via Legacy Amino LegacyMsgs as documented here
  • I have two WIP branches on celestia-app and cosmos-sdk that include debug print statements.
  • The following looked suspect but I confirmed that the fields of EventPayForBlobs don't impact decoding the TypeURL by removing the signer from the event: {"key":"signer","value":"\"celestia1vdjkcetnw35kzvtkxpmh5dmy0pkks7rxwquxvurhdq6xz7n2wpnngerc896ryefhwdhx6dfnxpes4ha7g5\""}]}
  • Protobuf decoding the tx bytes fails so the next step is to find a tool that can decode Protobuf bytes and compare the output to RejectUnknownFields
  • The raw TxBody is not an index wrapped tx before being passed to RejectUnknownFields
  • This only repros for txs that contain a MsgPayForBlobs and does not repro for a bank send tx
  • The fieldBytes here for the message look incorrect.
  • I think this issue only impacts the Protobuf encoding / decoding b/c JSON appears fine here

Screenshot

MsgPayForBlob tx Bank send tx
Screenshot 2023-04-25 at 11 28 13 AM Screenshot 2023-04-25 at 11 37 07 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants