-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Emit events from x/gov proposal messages execution #13389
Comments
We experienced this issue when attempting to write an e2e integration test with interchain accounts and x/gov, but the issue would be the same for any x/gov executed ibc message as relayers rely on events for packet processing. I noticed that #13063 has been implemented but not included into the I did test out a simple Could we see #13063 backported and included in a Thanks ❤️ |
The same behaviour still exists in |
Summary of Bug
When a proposal in
x/gov
has passed, the EndBlocker gets all the proposal messages and executes them one by one. I would have expected that the events emitted by these messages get included in that particular block's end-block events. This expectation seems to be justified by the event emission that comes after the message execution.However I noticed that the handler creates a new event manager, overriding but not overwriting the one already in
ctx
. So when the event manager is accessed after message execution, it no longer has any of the emitted events. Instead, these events are actually in the result returned by the handler, which get assigned here. Unfortunately this result returned by the handler is ignored and so the events are never emitted.I think events should instead be emitted by aggregating all events generated by messages into a list of events, and then emitting the events in that list, similar to what is done in normal message handling.
Version
v0.46.1
Steps to Reproduce
The text was updated successfully, but these errors were encountered: