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

Problem: MsgExec may squeeze multiple message events into a single one #673

Open
calvinaco opened this issue Jan 25, 2022 · 2 comments · May be fixed by #737
Open

Problem: MsgExec may squeeze multiple message events into a single one #673

calvinaco opened this issue Jan 25, 2022 · 2 comments · May be fixed by #737
Assignees

Comments

@calvinaco
Copy link
Collaborator

calvinaco commented Jan 25, 2022

Background

For a simple transaction with multiple messages, the event log is an array in which each element corresponds to each message's produced events. e.g. https://mainnet.crypto.org:1317/cosmos/tx/v1beta1/txs/A895EE1E05935C87FBF301BB8277E091087B88C6AFF70772D5078496ADE1D8F4

However, when it is a MsgExec with multiple messages inside, the MsgExec only has one single event log and it will "collapse" all the underlying messages' events. i.e. key-value pairs of different messages with the same type are "squashed" into a single type entry. This will break the design of some message parser in which they assume the events should only be related to the message they are parsing.

https://mainnet.crypto.org:1317/cosmos/tx/v1beta1/txs/99A8D602F8025DA75310DC274A807F03C22E6CB4A12DA5270FE8B99B95A3AC30

Task Details

Stage 1

  • Disable MsgExec parser as a temp measure

Stage 2

  • Enable MsgExec parser only if the messages inside consists of "simple message"
  • Simple message means message which does not relies on event value

Stage 3

  • Evaluate case-by-case to message parser which relies on event value
@ysong42
Copy link
Contributor

ysong42 commented Feb 11, 2022

Blocked #161

@vincentysc
Copy link
Contributor

Current approach and constraint:

Based on the msg emit order, we can split the single message by msgType. However, it assumes that the msg will always emit the same list of events which is not true and we cannot map the event such as transfer event to the msgType.

Example:

We have three inner message on msgExec:

  1. MsgWithdrawDelegatorReward
  2. MsgDelegate
  3. MsgWithdrawDelegatorReward

If we have one or more transfer event, we do not know which msgType it belongs to. Noted that MsgDelegate can emit zero or more than one transfer event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants