dymensionxyz/dymension

`UnderlyingPacketExistInvariant` will break because reverted packets are not removed

omritoptix opened this issue · 0 comments

In x/eibc/keeper/hooks.go:69, the AfterPacketDeleted function removes the
demand order with commontypes.Status_FINALIZED status every epoch when its
packet is deleted. This is problematic because the packets can be
commontypes.Status_REVERTED status if the sequencer submitted a fraudulent state, as
seen in x/delayedack/keeper/fraud.go:39.
Consequently, demand orders with reverted packets will not be removed, causing the
UnderlyingPacketExistInvariant invariant to fail in
x/eibc/keeper/invariants.go:83-90.