-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Use native implementation to optimize object derived address computation #12768
Conversation
⏱️ 1h 46m total CI duration on this PR
🚨 3 jobs on the last run were significantly faster/slower than expected
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12768 +/- ##
=======================================
Coverage 62.3% 62.3%
=======================================
Files 828 828
Lines 185791 185829 +38
=======================================
+ Hits 115821 115855 +34
- Misses 69970 69974 +4 ☔ View full report in Codecov by Sentry. |
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.
Do we have any perf data on this?
@@ -194,12 +194,18 @@ module aptos_framework::object { | |||
from_bcs::to_address(hash::sha3_256(bytes)) | |||
} | |||
|
|||
public native fun create_user_derived_object_address_impl(source: address, derive_from: address): address; |
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.
Can we make the native private?
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.
oh mistake
if gas is paid from primary fungible store, prologue+epilogue gets 35% faster |
d6a53a8
to
9194612
Compare
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.
lgtm
9194612
to
75dd92c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
75dd92c
to
049f350
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
049f350
to
b43e3ea
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b43e3ea
to
01cc490
Compare
01cc490
to
3236e99
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
Description
Computing address for primary_fungible_asset store is expensive, and repeated multiple times. (especially if we start using fungible assets for gas charging)
This optimizes that computation by moving it to rust, and by caching it within a transaction (so computation in prologue gets saved for epilogue)
Type of Change
Which Components or Systems Does This Change Impact?
How Has This Been Tested?
added unit test
performance on Coin => FA migration
Checklist