-
Notifications
You must be signed in to change notification settings - Fork 43
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
Fix auth entry charge #1297
Comments
Using this to track a couple of other issue surfaced during the same review:
and
|
### What Fix a few small but protocol-breaking metering issues discovered by the security review: i. auth entry charging the wrong amount #1297 ii. (not protocol breaking) auth `snapshot()` function charge after allocation iii. auth manager not charging `RefCell` wrapping. I also did a clean up by wrapping the `with_capacity` method with metering into a new `MeteredContainer::with_metered_capacity` method, which makes sure bugs like (i) and (ii) above cannot happen. Unfortunately these breaks a lot of existing observations that depends on auth, basically all `mem_bytes` have increased by 8 (size of the RefCell counter) and `cpu_insns` have increased by 2, which is caused by fixing (iii). ### Why [TODO: Why this change is being made. Include any context required to understand the why.] ### Known limitations [TODO or N/A]
resolved by #1340 |
rs-soroban-env/soroban-env-host/src/auth.rs
Lines 855 to 856 in 9c53940
The text was updated successfully, but these errors were encountered: