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

Determine how to deal with error on final callbacks #1174

Open
AdityaSripal opened this issue Dec 5, 2024 · 0 comments
Open

Determine how to deal with error on final callbacks #1174

AdityaSripal opened this issue Dec 5, 2024 · 0 comments
Labels

Comments

@AdityaSripal
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

1 participant