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

ibc: fix reversed misbehavior handling condition #4807

Open
aubrika opened this issue Aug 13, 2024 · 0 comments
Open

ibc: fix reversed misbehavior handling condition #4807

aubrika opened this issue Aug 13, 2024 · 0 comments
Labels
A-IBC Area: IBC integration with Penumbra C-bug Category: a bug needs-refinement unclear, incomplete, or stub issue that needs work _P-medium Medium priority _P-V2 Priority: after mainnet

Comments

@aubrika
Copy link
Contributor

aubrika commented Aug 13, 2024

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.

@aubrika aubrika added A-IBC Area: IBC integration with Penumbra C-bug Category: a bug _P-V2 Priority: after mainnet _P-medium Medium priority labels Aug 13, 2024
@github-actions github-actions bot added the needs-refinement unclear, incomplete, or stub issue that needs work label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-IBC Area: IBC integration with Penumbra C-bug Category: a bug needs-refinement unclear, incomplete, or stub issue that needs work _P-medium Medium priority _P-V2 Priority: after mainnet
Projects
None yet
Development

No branches or pull requests

1 participant