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

[test] Cover rollbacks with invoker contract auth #1252

Closed
dmkozh opened this issue Nov 27, 2023 · 0 comments · Fixed by #1260
Closed

[test] Cover rollbacks with invoker contract auth #1252

dmkozh opened this issue Nov 27, 2023 · 0 comments · Fixed by #1260
Assignees

Comments

@dmkozh
Copy link
Contributor

dmkozh commented Nov 27, 2023

The tests should ensure that:

  • A failing try_call after authorize_as_curr_contract still consumes invoker contract auth entries (which prevent accidental reuse of authorization)
  • A failing try_call deeper in the call tree has the authorization rolled back and reusable (consistently with account-based authorizations)
github-merge-queue bot pushed a commit that referenced this issue Nov 29, 2023
…s. (#1260)

### What

Fix the invoker contract auth rollback logic and cover it in the tests.

Besides the 'obvious' issue of missing the code that actually performs
rollback, there was much more subtle issue of incorrect ordering between
`rollback` and `pop_frame`. To avoid this I've moved the
snapshots/rollbacks to the auth manager, so that it's not possible to
accidentally mess up that order.

Resolves #1252

### Why

Bug fix/adding tests

### Known limitations

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant