Skip to content

ibc: fix reversed misbehavior handling condition #4807

Open
@aubrika

Description

@aubrika

IBC-GO assumes that in the misbehavior message header1 is at a greater height than header2 and enforces this ordering. A misbehavior is considered valid if header1's timestamp is not greater than header2s timestamp:

https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/07-tendermint/misbehaviour_handle.go#L75

Our misbehavior handling has this condition reversed, header1 is expected to be at a lower height than header2 and it is a misbehavior if header1s timestamp is greater than header2's timestamp:

https://github.com/penumbra-zone/penumbra/blob/release/v0.80.x/crates/core/component/ibc/src/component/msg_handler/misbehavior.rs#L177

This method of submitting misbehaviors is deprecated and should not be used, but if someone does use it, valid submissions will be blocked. Misbehaviors can still be submitted and acknowledged through the standard update handler, which is recommended.

We can and should still fix this, so that the deprecated path still works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-IBCArea: IBC integration with PenumbraC-bugCategory: a bug_P-V2Priority: after mainnet_P-mediumMedium priorityneeds-refinementunclear, incomplete, or stub issue that needs work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions