-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Bug Report: Missing Event Emission in evmgov Handler
Location:
x/evmgov/keeper/keeper.go#L76-L85
Description:
The msgroute handler in cosmos-sdk always reinitializes a new EventManager inside the ctx copy. As a result, any events emitted within the handler are not reflected in the original ctx. This causes the emitted events to be lost at the top-level caller.
Impact:
Events are not properly propagated, leading to inconsistencies between on-chain state and off-chain tracking.
Wallets, exchanges, and other external systems relying on events may fail to detect or track state changes correctly.
Steps to Reproduce:
- Execute a message that should emit an event in evmgov.
- Observe that the expected event is missing from the final block events.
Expected Behavior:
Events emitted within the evmgov handler should be included in the top-level context’s EventManager, ensuring they are visible to off-chain consumers.
Suggested Fix:
Reference the implementation in gov and other Cosmos SDK modules. Ensure that the evmgov handler does not replace the original EventManager but instead correctly emits events into it.
https://github.com/cosmos/cosmos-sdk/blob/main/x/gov/abci.go#L189-L196