-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
updated inner_call for hashing fn to follow generic approach #33128
Conversation
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
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.
now we're headed in the right direction! thanks for the changes
so I went with the default values of sha256 in compute_budget variables for the other hashes as well since I didn't know which values they are supposed to use as previously they were using the same ones as sha256 so if they need to be updated lmk.
hrm... wouldn't have expected that. we should definitely properly measure them, but that's out of scope fore this change set. i'd expect at leaset blake3 to be cheaper than sha256
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.
almost there!
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.
ok. looks good to me know. let's see what the robot says!
just realized you may not be able to view the ci output... looks like it's not liking trailing whitespace at |
Hey, I was able to see the ci output, and I ran
|
ah you need to |
Codecov Report
@@ Coverage Diff @@
## master #33128 +/- ##
=======================================
Coverage 81.8% 81.8%
=======================================
Files 806 806
Lines 217676 217674 -2
=======================================
+ Hits 178197 178202 +5
+ Misses 39479 39472 -7 |
@sanjsingh07 you don't need to worry about the "this branch is outdated..." warning, so long as it doesn't escalate to "this branch conflicts...". rebasing clears ci, so we'll need to rerun to merge @Lichtso @alessandrod can i get one of you to sign off on this again? it's ready to merge otherwise |
Oh ok, Thanks for letting me know about that cuz I wasn't sure if it was mergeable with the branch being outdated. |
no worries, github doesn't exactly make it obvious! once we get another sign-off from the runtime team, this will be ready to go |
@Lichtso @alessandrod @dmakarov can we get a final signoff from runtime on this? should be net better than the last time it was approved 😉 |
@sanjsingh07 looks like we picked up some trailing whitespace somewhere. ci sanity tests are failing |
yeah my bad, I might have left that while resolving the branch conflict, so do you want me to push the updated code or you can take care of it while merging? |
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! Please remove the whitespace at line 1951 then it's good to go
…et compute budget values
…omment form compute_budget
done! |
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.
we're r+ ci here. merge when green
finally made it! thanks for the contribution and patience with review responses! |
* updated inner_call for hashing fn to follow generic approach * different hash compute budget values for all digests * fixed conflicts * reverted changes to compute_budget.rs and added 3method to trait to get compute budget values * updated type for result fn for HasherImpl * using Hash directly in result fn, got rid of HASH_BYTES and removed comment form compute_budget * updated import statement * cargo fmt -all * removed unused import and reference related warning * oops forgot semicolon * removed trailing white space (cherry picked from commit a60d185)
* updated inner_call for hashing fn to follow generic approach * different hash compute budget values for all digests * fixed conflicts * reverted changes to compute_budget.rs and added 3method to trait to get compute budget values * updated type for result fn for HasherImpl * using Hash directly in result fn, got rid of HASH_BYTES and removed comment form compute_budget * updated import statement * cargo fmt -all * removed unused import and reference related warning * oops forgot semicolon * removed trailing white space (cherry picked from commit a60d185)
* updated inner_call for hashing fn to follow generic approach * different hash compute budget values for all digests * fixed conflicts * reverted changes to compute_budget.rs and added 3method to trait to get compute budget values * updated type for result fn for HasherImpl * using Hash directly in result fn, got rid of HASH_BYTES and removed comment form compute_budget * updated import statement * cargo fmt -all * removed unused import and reference related warning * oops forgot semicolon * removed trailing white space (cherry picked from commit a60d185)
* updated inner_call for hashing fn to follow generic approach (#33128) * updated inner_call for hashing fn to follow generic approach * different hash compute budget values for all digests * fixed conflicts * reverted changes to compute_budget.rs and added 3method to trait to get compute budget values * updated type for result fn for HasherImpl * using Hash directly in result fn, got rid of HASH_BYTES and removed comment form compute_budget * updated import statement * cargo fmt -all * removed unused import and reference related warning * oops forgot semicolon * removed trailing white space (cherry picked from commit a60d185) * Bump solana_rbpf to v0.8.0 (#33679) * Bumps solana_rbpf to v0.8.0 * Adjustments: Replaces declare_syscall!() with declare_builtin_function!(). Removes Config::encrypt_runtime_environment. Simplifies error propagation. (cherry picked from commit a5c7c99) --------- Co-authored-by: Alexander Meißner <[email protected]>
Problem
inner_call() function for hashing syscalls (sha256, keccak and blake3) are nearly identical
Summary of Changes
de-replicated the hashing syscalls to follow generic and trait approach, ref #33046.