update the nim-poseidon2 dependency

This commit is contained in:
Balazs Komuves 2024-07-12 12:15:21 +02:00
parent 6e9fcc632c
commit 72e55b22ab
No known key found for this signature in database
GPG Key ID: F63B7AEF18435562
4 changed files with 8 additions and 7 deletions

View File

@ -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"

View File

@ -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

View File

@ -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) )
#-------------------------------------------------------------------------------

View File

@ -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"