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

No events are given to reply from other than wasm submsg #1995

Closed
loloicci opened this issue Jan 15, 2024 · 4 comments · Fixed by #2334
Closed

No events are given to reply from other than wasm submsg #1995

loloicci opened this issue Jan 15, 2024 · 4 comments · Fixed by #2334
Assignees

Comments

@loloicci
Copy link
Contributor

loloicci commented Jan 15, 2024

The comment

/// with full Cosmos SDK events.
(SubMsgResponse is a field of Reply) says this contains all the SDK events.
However, x/wasm discards events from other than wasm submsg in /~https://github.com/CosmWasm/wasmd/blob/07c8beea006cd009e0c7b865fb32753f61221e1b/x/wasm/keeper/msg_dispatcher.go#L117 and this is passed to reply in /~https://github.com/CosmWasm/wasmd/blob/07c8beea006cd009e0c7b865fb32753f61221e1b/x/wasm/keeper/msg_dispatcher.go#L147.

Is it intentional? And if it is, I think the reason should be written in spec and cosmwasm's comment for SubMsgResponse.

@webmaster128
Copy link
Member

Thank you for bringing this up. The filtering was added for good reason (which I do not know in detail at this point). We'll update the docs to highlight this. Moving to the cosmwasm repo.

@webmaster128 webmaster128 transferred this issue from CosmWasm/wasmd Jan 18, 2024
@loloicci
Copy link
Contributor Author

Thank you @webmaster128 for your reply and for updating the docs! If you know who knows this well, could you give this question or tell this ISSUE to them?

@p0mvn
Copy link

p0mvn commented Mar 1, 2024

This leads to the fact that we charge gas for the attributes but not the events here:
/~https://github.com/CosmWasm/wasmd/blob/09c49d81d38990d232080069b9804af35d68a1b0/x/wasm/keeper/gas_register.go#L200-L211

What are the reasons for this behavior? If we filter events, should we also filter out their attributes?

@chipshort chipshort self-assigned this Jan 9, 2025
@chipshort
Copy link
Collaborator

Events are not part of consensus and therefore we generally cannot assume they are deterministic between systems. We know that wasm events are deterministic, since they are the result of deterministic execution, so in this special case, we can keep them.
I'll update the docs for this now.

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

Successfully merging a pull request may close this issue.

4 participants