You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement ProgPow 0.9.4 in Scala from the spec described here, but I have a problem matching test vectors from the repo to my results.
The problem starts in obtaining hash_init so I will focus only on this code:
caseclassHash32 (uint32s: Array[Long])
defkeccak_f800_progpow(
st: Array[Long]
):Hash32= {
for(r <-0 until 22){ ProgPow.keccak_f800_round(st, r) }
Hash32(st.take(8))
}
defkeccak_f800_initial_pass(
header: Hash32,
nonce: Array[Long],
):Hash32= {
valst=Array.fill[Long](25)(0L)
for(i <-0 until 8) { st(i) = header.uint32s(i) }
st(8) = nonce(0)
st(9) = nonce(1)
st(10) = keccakf_rndc(0)
st(18) = keccakf_rndc(6)
keccak_f800_progpow(st)
}
defhash(
prog_seed: Array[Long],
nonce: Array[Long],
header: Hash32
):PoW= {
valhash_init=ProgPow.keccak_f800_initial_pass(header, nonce)
// Further code is irrelevant as long as hash_init is wrong
}
The code is pretty straightforward and I don't see where the mistake could occur.
The previous version returns values as expected (passes all vectors from repo). ProgPow.keccak_f800_round passes test vector (I am not sure why this vector is removed from your repo) and nothing changed here from the previous version.
I'm trying to implement ProgPow 0.9.4 in Scala from the spec described here, but I have a problem matching test vectors from the repo to my results.
The problem starts in obtaining
hash_init
so I will focus only on this code:The code is pretty straightforward and I don't see where the mistake could occur.
The previous version returns values as expected (passes all vectors from repo).
ProgPow.keccak_f800_round
passes test vector (I am not sure why this vector is removed from your repo) and nothing changed here from the previous version.My results of calling
hash
function are:Could you please tell me if there is sth missing in my implementation (or maybe I misunderstood something)?
The text was updated successfully, but these errors were encountered: