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

Refactor authorization manager to only maintain mutable borrow on minimal amount of fields #938

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

dmkozh
Copy link
Contributor

@dmkozh dmkozh commented Jul 10, 2023

What

Refactor authorization manager to only maintain mutable borrow on minimal amount of fields.

Why

This avoids auth manager re-borrow hack and allows calling require_auth from within __check_auth. The latter might not be the most important feature, but it makes things more consistent.

Known limitations

N/A

@dmkozh dmkozh requested review from graydon, sisuresh and a team as code owners July 10, 2023 21:25
…imal amount of fields.

This avoids auth manager re-borrow hack and allows calling `require_auth` from within `__check_auth`. The latter might not be the most important feature, but it makes things more consistent.
This is to make sure there is no issue with invoker contract cleanup that didn't have any frames pushed.
Copy link
Contributor

@graydon graydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently over my head but I am generally on board with "finer grained borrows" and willing to defer careful review of this code until we're reviewing the whole subsystem.

@graydon graydon merged commit 07b60dc into stellar:main Jul 11, 2023
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 this pull request may close these issues.

3 participants