Skip to content

Determine how to deal with error on final callbacks #1174

Description

@AdityaSripal

In OnAcknowledgementPacket and OnTimeoutPacket, an error causes the entire tx to revert.

In the multipayload case, this means that a single payload returning an error will cause all payloads to never complete.

One simple solution to this is to call each payload individually. IF there's an error, we revert just that payload call but then continue executing the other payloads. This ensures that if transfer is coupled with another application, then transfer can still succeed and refund tokens even if the other application fails in its callback.

Another side benefit is that the core changes are also committed so commitment is cleared and prevents resubmissions that will be rejected anyway. This is a benefit even for the single payload case.

cc: @srdtrk

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions