Skip to content
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

evm: add sha512-256 precompile #1408

Merged
merged 1 commit into from Jul 17, 2023
Merged

evm: add sha512-256 precompile #1408

merged 1 commit into from Jul 17, 2023

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Jul 10, 2023

No description provided.

@ptrus ptrus requested review from kostko and pro-wh as code owners July 10, 2023 13:50
@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #1408 (733096f) into main (db7d146) will increase coverage by 0.10%.
The diff coverage is 96.55%.

@@            Coverage Diff             @@
##             main    #1408      +/-   ##
==========================================
+ Coverage   56.42%   56.52%   +0.10%     
==========================================
  Files         128      130       +2     
  Lines        9198     9238      +40     
==========================================
+ Hits         5190     5222      +32     
- Misses       3966     3974       +8     
  Partials       42       42              
Impacted Files Coverage Δ
...ime-sdk/modules/evm/src/precompile/confidential.rs 80.34% <ø> (ø)
runtime-sdk/modules/evm/src/precompile/standard.rs 77.77% <ø> (ø)
runtime-sdk/modules/evm/src/precompile/testing.rs 75.86% <ø> (ø)
runtime-sdk/modules/evm/src/precompile/mod.rs 93.33% <95.23%> (-1.91%) ⬇️
runtime-sdk/modules/evm/src/precompile/sha512.rs 100.00% <100.00%> (ø)

@ptrus ptrus force-pushed the ptrus/feature/sha512-256 branch 3 times, most recently from 029a936 to 8fefeb6 Compare July 10, 2023 16:44
@ptrus ptrus force-pushed the ptrus/feature/sha512-256 branch 5 times, most recently from 69a389a to 145bb3e Compare July 17, 2023 13:51
use super::{record_linear_cost, PrecompileResult};

pub(super) fn call_sha512_256(handle: &mut impl PrecompileHandle) -> PrecompileResult {
// Costs were computed by benchmarking and comparing to SHA256 and using the already set SHA256 costs (unsure how those were obtained).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(unsure how those were obtained)

I believe those come from Ethereum.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, indeed. Updated the comment.

@ptrus ptrus merged commit dafc660 into main Jul 17, 2023
24 of 27 checks passed
@ptrus ptrus deleted the ptrus/feature/sha512-256 branch July 17, 2023 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants