Skip to content

Bug Report: Missing Event Emission in evmgov Handler #87

@Hellobloc

Description

@Hellobloc

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:

  1. Execute a message that should emit an event in evmgov.
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions