mirror of
https://github.com/logos-storage/logos-storage-proofs-circuits.git
synced 2026-01-02 13:33:07 +00:00
update to use the latest nim-poseidon2
This commit is contained in:
parent
78dcaaa396
commit
bd0a5e968c
@ -8,4 +8,4 @@ bin = @["cli","testmain"]
|
||||
|
||||
requires "nim >= 1.6.0"
|
||||
requires "https://github.com/mratsim/constantine"
|
||||
requires "https://github.com/codex-storage/nim-poseidon2#596f7b18070b44ca0bf305bf9bdf1dc4f6011181"
|
||||
requires "https://github.com/codex-storage/nim-poseidon2#9be7b0c134e64e3d57a38520a32af93a55a37c44"
|
||||
|
||||
@ -39,7 +39,7 @@ func splitBlockIntoCells( globcfg: GlobalConfig, blockData: openArray[byte] ): s
|
||||
func hashNetworkBlockOpen( globcfg: GlobalConfig, blockData: openArray[byte] ): Hash =
|
||||
let cells = splitBlockIntoCells(globcfg, blockData)
|
||||
let leaves = collect( newSeq , (for i in 0..<cellsPerBlock(globcfg): hashCell(globcfg, cells[i]) ))
|
||||
return merkleRoot(leaves)
|
||||
return Merkle.digest(leaves) # merkleRoot(leaves)
|
||||
|
||||
func hashNetworkBlock*(globcfg: GlobalConfig, blockData: Block): Hash =
|
||||
hashNetworkBlockOpen(globcfg, blockData)
|
||||
|
||||
@ -11,6 +11,7 @@ import constantine/math/arithmetic
|
||||
|
||||
import poseidon2/types
|
||||
import poseidon2/merkle
|
||||
import poseidon2/io
|
||||
|
||||
import types
|
||||
import blocks
|
||||
|
||||
@ -7,7 +7,7 @@ import constantine/math/io/io_fields
|
||||
|
||||
import poseidon2/types
|
||||
import poseidon2/compress
|
||||
#import poseidon2/merkle
|
||||
import poseidon2/io
|
||||
|
||||
import types
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import constantine/math/arithmetic
|
||||
|
||||
import poseidon2/types
|
||||
import poseidon2/sponge
|
||||
#import poseidon2/io
|
||||
import poseidon2/io
|
||||
|
||||
import types
|
||||
import misc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user