-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Improve test and abort safety with is_stack_unbiasable() check #13291
Conversation
⏱️ 3h 31m total CI duration on this PR
🚨 1 job on the last run was significantly faster/slower than expected
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13291 +/- ##
=========================================
- Coverage 57.6% 57.5% -0.1%
=========================================
Files 834 834
Lines 198396 198584 +188
=========================================
+ Hits 114325 114345 +20
- Misses 84071 84239 +168 ☔ View full report in Codecov by Sentry. |
if context.gas_feature_version() >= RELEASE_V1_13 { | ||
context.charge(RANDOMNESS_FETCH_AND_INCREMENT_BASE)?; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vgao1996 - should every native function charge some base gas, or if function is simple enough - charging of native call is enough?
i.e. randomness had no gas charging before, so I added it here. not sure if that is needed
|
||
if context.gas_feature_version() >= RELEASE_V1_13 { | ||
context | ||
.charge(RANDOMNESS_UNBIASABLE_CHECK_PER_STACK * NumArgs::new(visited))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is PerArg/NumArgs the best thing to use for per_count gas charge?
da544d8
to
7c4ccd1
Compare
Description
Implement safety measure as described in the AIP.
Type of Change
Which Components or Systems Does This Change Impact?
How Has This Been Tested?
Key Areas to Review
Checklist