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

MsgRecvPacket error while processing wormhole packet data #504

Open
pharr117 opened this issue Oct 21, 2023 · 4 comments
Open

MsgRecvPacket error while processing wormhole packet data #504

pharr117 opened this issue Oct 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@pharr117
Copy link
Collaborator

The receiver address for the wormhole Recv message contains a bad string in the receiver inside the data object. The error happens during insertion in the database since it is not proper UTF-8:

10:22AM INF Indexing 1 TXs from block 11980422
10:22AM INF Indexing 20 TXs from block 11980423
10:22AM INF Indexing 10 TXs from block 11980424
10:22AM ERR Error getting/creating receiver address for msg 1 of tx hash E26846FCAE22AAF984731AF38673EC49F9B4DA3280F1B00D763C8CF1B963F55A. Err: ERROR: invalid byte sequence for encoding "UTF8": 0x00 (SQLSTATE 22021)
10:22AM ERR Error getting/creating receiver address for msg 1 of tx hash E26846FCAE22AAF984731AF38673EC49F9B4DA3280F1B00D763C8CF1B963F55A. Err: ERROR: invalid byte sequence for encoding "UTF8": 0x00 (SQLSTATE 22021)
10:22AM FTL Error indexing block 11980424. error="ERROR: invalid byte sequence for encoding \"UTF8\": 0x00 (SQLSTATE 22021)"

image

Even mintscan (as of time of writing this) is having trouble parsing out the data:

https://www.mintscan.io/osmosis/tx/E26846FCAE22AAF984731AF38673EC49F9B4DA3280F1B00D763C8CF1B963F55A?height=11980424

image

@pharr117 pharr117 added the bug Something isn't working label Oct 21, 2023
@pharr117
Copy link
Collaborator Author

We may need to pull in something from the Wormhole package in order to parse this out:

https://github.com/wormhole-foundation/wormhole/tree/main/sdk

They provide some utils to parse wormhole addresses. Docs are here:

  1. Arch: https://docs.wormhole.com/wormhole/explore-wormhole/components
  2. CosmWasm refs: https://docs.wormhole.com/wormhole/blockchain-environments/cosmwasm

I am not entirely sure just yet if it will be possible to pull this into an address, it could represent some other chain data that is not a Cosmos address.

@pharr117
Copy link
Collaborator Author

After #503, we will need to do the following to fix these TXes, couple options:

  1. reindex-message-type - Use this to reindex ALL TXes that contain this message type, this would be a shotgun approach
  2. Build a script to comb the database for RecvPacket messages that do NOT have any data after the block, and reindex using an explicit list.

@misko9
Copy link

misko9 commented Oct 22, 2023

Hey @pharr117, yes, the receiver address is malformed. The write acknowledge shows an error ack so the tx was refunded, not transferred.

@pharr117
Copy link
Collaborator Author

@misko9 thanks for pointing that out, I see how we can parse out the write_acknowledgement event and check for errors. Thanks for the info!

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

No branches or pull requests

2 participants