Skip to content

zkgm: batch with a failing CALL child emits an undecodable acknowledgement #151

Description

@notJoon

Summary

In the batch execute path, a CALL child that fails on the proven (non-intent) receive path causes executeBatch to return the raw ACK_ERR_ONLY_MAKER sentinel as the outer acknowledgement instead of an ABI-encoded Ack. The source-side batch acknowledgement handler decodes the outer ack with DecodeAck, which cannot decode the 4-byte sentinel and returns an error. That error reaches impl.Ack and panics.

Location

  • gno.land/r/core/ibc/v1/apps/zkgm/v0/impl/batch.gno (executeBatch, only-maker short-circuit)
  • gno.land/r/core/ibc/v1/apps/zkgm/v0/impl/dispatch.gno (dispatchAck, OP_BATCH decode)
  • gno.land/r/core/ibc/v1/apps/zkgm/v0/impl/impl.gno (Ack)

Impact

The acknowledgement for that batch packet can never be processed, and every relay retry fails the same way. The packet is also not timeout-eligible because the destination already wrote a receipt. Any escrow recorded for token-order children in the batch is therefore left unsettled.

Expected behavior

The only-maker short-circuit is only valid on the intent path, where a market maker can retry. On the proven path a child only-maker outcome should surface as a decodable failure acknowledgement so the source takes its normal refund path. Alternatively, the source-side batch ack handler should treat an undecodable or only-maker outer ack as a failure acknowledgement rather than panicking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-encodingWire encoding: abi, rlp, packet/state schemasA-ibcIBC core, light client, packet/channel/connectionA-zkgmZKGM realm, opcodes, forward, integration

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions