mirror of
https://github.com/logos-storage/logos-storage-proofs-circuits.git
synced 2026-01-05 23:13:06 +00:00
update the nim-poseidon2 dependency
This commit is contained in:
parent
6e9fcc632c
commit
72e55b22ab
@ -7,5 +7,5 @@ srcDir = "src"
|
||||
bin = @["cli","testmain"]
|
||||
|
||||
requires "nim >= 1.6.0"
|
||||
requires "https://github.com/mratsim/constantine"
|
||||
requires "https://github.com/codex-storage/nim-poseidon2#9be7b0c134e64e3d57a38520a32af93a55a37c44"
|
||||
requires "https://github.com/mratsim/constantine#ab6fa6ae1bbbd1b10071a92ec209b381b5d82511"
|
||||
requires "https://github.com/codex-storage/nim-poseidon2#8a54c69032a741160bbc097d009e45a8b5e4d718"
|
||||
|
||||
@ -6,6 +6,7 @@ import constantine/math/arithmetic
|
||||
|
||||
import poseidon2/types
|
||||
import poseidon2/merkle
|
||||
import poseidon2/io
|
||||
|
||||
import types
|
||||
import blocks
|
||||
@ -20,7 +21,7 @@ import json
|
||||
|
||||
proc testMerkleProofs*( input: seq[F] ) =
|
||||
let tree = merkleTree(input)
|
||||
let root = merkleRoot(input)
|
||||
let root = Merkle.digest(input)
|
||||
assert( bool(root == treeRoot(tree)) )
|
||||
|
||||
let n = input.len
|
||||
|
||||
@ -53,7 +53,7 @@ proc testVectorsMerkle() =
|
||||
echo "-----------------------------------------------------"
|
||||
for n in 1..40:
|
||||
let input : seq[F] = collect( newSeq , (for i in 1..n: toF(i)) )
|
||||
let root = merkleRoot(input)
|
||||
let root = Merkle.digest(input)
|
||||
echo( "Merkle root of [1.." & ($n) & "] : seq[F] = " & toDecimal(root) )
|
||||
|
||||
echo ""
|
||||
@ -61,7 +61,7 @@ proc testVectorsMerkle() =
|
||||
echo "--------------------------------------------------------"
|
||||
for n in 0..80:
|
||||
let input : seq[byte] = collect( newSeq , (for i in 1..n: byte(i)) )
|
||||
let root = merkleRoot(input)
|
||||
let root = Merkle.digest(input)
|
||||
echo( "Merkle root of [1.." & ($n) & "] : seq[byte] = " & toDecimal(root) )
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
@ -10,5 +10,5 @@ bin = @["testvectors"]
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 1.6.0"
|
||||
requires "https://github.com/mratsim/constantine"
|
||||
requires "https://github.com/codex-storage/nim-poseidon2#596f7b18070b44ca0bf305bf9bdf1dc4f6011181"
|
||||
requires "https://github.com/mratsim/constantine#ab6fa6ae1bbbd1b10071a92ec209b381b5d82511"
|
||||
requires "https://github.com/codex-storage/nim-poseidon2#8a54c69032a741160bbc097d009e45a8b5e4d718"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user