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

Store state for IBC lifecycle errors #4194

Open
nicolaslara opened this issue Feb 1, 2023 · 0 comments
Open

Store state for IBC lifecycle errors #4194

nicolaslara opened this issue Feb 1, 2023 · 0 comments
Assignees

Comments

@nicolaslara
Copy link
Contributor

nicolaslara commented Feb 1, 2023

Background

When running callbacks on the IBC lifecycle (ack or timeout in wasm hooks) we may run into errors (contract doesn't exist, doesn't implement entry point, fails, put of gas, etc). Timeout will return regardless and emit an error, but we should store these and allow querying them.

Suggested Design

  • Store any errors in state
  • Add a query to retrieve the errors for a packet sequence
  • Ensure the state is cleared. Some options are (ii is favored):
    1. Make a new message (and far further, potentially incentives, e.g. gas-token like gas rebate). Let these be pruned after (say) 2 weeks
    2. On every new error, prune 2 oldest errors if they're greater than expiry time (2 weeks)
    3. Run some scheduled code every K blocks

Acceptance Criteria

  • all existing and new tests should pass
  • there are tests for the failures and new queries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage 🔍
Development

No branches or pull requests

1 participant