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

Add helpers for container bulk init; applies to auth metering #975

Merged
merged 3 commits into from
Aug 1, 2023

Conversation

jayz22
Copy link
Contributor

@jayz22 jayz22 commented Jul 31, 2023

What

Resolves #668

  • Close metering gaps in Auth-related code. Mostly around unmetered container usages i.e. Vec<T>.
  • Added a couple of helper traits MeteredContainer, MeteredCollect to make the bulk collection with metering a little bit more seamless.

Why

[TODO: Why this change is being made. Include any context required to understand the why.]

Known limitations

[TODO or N/A]

@jayz22 jayz22 changed the title Add new container bulk init trait, applies to auth metering Add helpers for container bulk init; applies to auth metering Jul 31, 2023
@jayz22 jayz22 requested a review from dmkozh July 31, 2023 23:32
Copy link
Contributor

@dmkozh dmkozh left a comment

Choose a reason for hiding this comment

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

This looks nice, thanks! I think that's much better than just using metered vector internally at cost of n^2 memory and allocations.

soroban-env-host/src/auth.rs Show resolved Hide resolved
soroban-env-host/src/auth.rs Show resolved Hide resolved
@dmkozh dmkozh merged commit 1b66a67 into stellar:main Aug 1, 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.

Auth Next: Audit the metering
2 participants