-
Notifications
You must be signed in to change notification settings - Fork 79
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
Avoid redundant read/write of allocation/claims HAMT root when unchanged #1030
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1030 +/- ##
==========================================
+ Coverage 89.26% 89.36% +0.09%
==========================================
Files 93 93
Lines 19550 19554 +4
==========================================
+ Hits 17452 17474 +22
+ Misses 2098 2080 -18
|
Note that this will be transparently fixed also when the actors can depend on a version of H/AMT that includes the fixes for filecoin-project/ref-fvm#1443. Due to coupling of these datastructure with FVM development, the fixes aren't easy to just upgrade to without risking a dependency mess, making local repo patches more complex, etc. This change is still beneficial as it avoids the redundant load, too. |
See #1052. |
@arajasek I think this is still worth merging to avoid the redundant read too. |
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.
Looks good to me.
This saves 464k gas (4.9%) on a simple transfer making a single allocation an no claims (or vice versa), on an otherwise empty state.
Progress on #1020