ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

Add new accepted hash functions to the `hash` syscall (sha256, keccak256, ripemd160)

Open mriise opened this issue 3 years ago • 2 comments

  • [x] sha256
  • [x] sha3FIPS256 (Keccak256)
  • [x] ripemd160 ~~(waiting on new release of rust-multihash)~~

mriise avatar Aug 10 '22 18:08 mriise

Codecov Report

Merging #703 (531cb65) into master (f144970) will decrease coverage by 0.07%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #703      +/-   ##
==========================================
- Coverage   50.92%   50.85%   -0.08%     
==========================================
  Files         120      121       +1     
  Lines        9691     9705      +14     
==========================================
  Hits         4935     4935              
- Misses       4756     4770      +14     
Impacted Files Coverage Δ
fvm/src/kernel/default.rs 15.97% <0.00%> (+0.15%) :arrow_up:
fvm/src/syscalls/crypto.rs 0.00% <0.00%> (ø)
sdk/src/crypto.rs 0.00% <0.00%> (ø)
shared/src/crypto/hash.rs 0.00% <0.00%> (ø)

codecov-commenter avatar Aug 11 '22 06:08 codecov-commenter

Can we get a new integration test?

Stebalien avatar Aug 11 '22 19:08 Stebalien

@mriise could you fix the clippy issue and the conflicts?

raulk avatar Aug 15 '22 19:08 raulk

note: it is very odd that clippy was silent about this locally, maybe it was removed in latest toolchain update?

mriise avatar Aug 15 '22 20:08 mriise

For context ripemd160 was added as it is used by Bitcoin for address generation (for some random reason).

Kubuxu avatar Aug 17 '22 14:08 Kubuxu