nim-codex/codex/utils
Dmitriy Ryajov 52c5578c46
Rework merkle tree (#654)
* rework merkle tree support

* deps

* rename merkletree -> codexmerkletree

* treed and proof encoding/decoding

* small change to invoke proof verification

* rename merkletree to codexmerkletree

* style

* adding codex merkle and coders tests

* fixup imports

* remove new codecs for now

* bump deps

* adding trace statement

* properly serde of manifest block codecs

* use default hash codec

* add more trace logging to aid debugging

* misc

* remove double import

* revert un-needded change

* proof size changed

* bump poseidon2

* add from nodes test

* shorte file names

* remove upraises

* wip poseidon tree

* adjust file names

* misc

* shorten file names

* fix bad `elements` iter

* don't do asserts

* add fromNodes and converters

* root and getProof now return result

* add poseidon2 tree tests

* root now returns result

* misc

* had to make merkletree a ref, because nim blows up otherwise

* root returns a result

* root returns a result

* import poseidon tests

* bump

* merkle poseidon2 digest

* misc

* add merkle digest tests

* bump

* don't use checksuite

* Update tests/codex/merkletree/generictreetests.nim

Co-authored-by: markspanbroek <mark@spanbroek.net>
Signed-off-by: Dmitriy Ryajov <dryajov@gmail.com>

* Update codex/merkletree/merkletree.nim

Co-authored-by: markspanbroek <mark@spanbroek.net>
Signed-off-by: Dmitriy Ryajov <dryajov@gmail.com>

* Update codex/merkletree/merkletree.nim

Co-authored-by: markspanbroek <mark@spanbroek.net>
Signed-off-by: Dmitriy Ryajov <dryajov@gmail.com>

* Update tests/codex/merkletree/generictreetests.nim

Co-authored-by: markspanbroek <mark@spanbroek.net>
Signed-off-by: Dmitriy Ryajov <dryajov@gmail.com>

* missing return

* make toBool private (it's still needed otherwise comparison won't work)

* added `digestTree` that returns a tree and `digest` for root

* test against both poseidon trees - codex and poseidon2

* shorten merkle tree names

* don't compare trees - it's going to be too slow

* move comparison to mekrle helper

* remove merkle utils

---------

Signed-off-by: Dmitriy Ryajov <dryajov@gmail.com>
Co-authored-by: markspanbroek <mark@spanbroek.net>
2023-12-21 06:41:43 +00:00
..
addrutils.nim Improving proc/func formatting consistency (#454) 2023-06-22 08:11:18 -07:00
asyncheapqueue.nim Slot queue (#455) 2023-07-25 12:50:30 +10:00
asynciter.nim Rework merkle tree (#654) 2023-12-21 06:41:43 +00:00
asyncspawn.nim [marketplace] Load sales state from chain (#306) 2023-03-08 14:34:26 +01:00
asyncstatemachine.nim Reverts logging-proxy, commit 27f585eb6f (#660) 2023-12-20 13:24:40 +11:00
digest.nim Rework merkle tree (#654) 2023-12-21 06:41:43 +00:00
exceptions.nim [marketplace] Availability improvements (#535) 2023-09-29 14:33:08 +10:00
fileutils.nim Reverts logging-proxy, commit 27f585eb6f (#660) 2023-12-20 13:24:40 +11:00
json.nim Reverts logging-proxy, commit 27f585eb6f (#660) 2023-12-20 13:24:40 +11:00
keyutils.nim Reverts logging-proxy, commit 27f585eb6f (#660) 2023-12-20 13:24:40 +11:00
optionalcast.nim [utils] Add operator `as` for optional casting 2022-10-25 15:10:35 +11:00
stintutils.nim feat: bigint uses decimal over hex encoding (#452) 2023-06-21 07:46:18 +02:00
then.nim Cancel and wait for asyncstatemachine futures when stopping (#493) 2023-07-31 15:09:34 +10:00
timer.nim Rework merkle tree (#654) 2023-12-21 06:41:43 +00:00
trackedfutures.nim Reverts logging-proxy, commit 27f585eb6f (#660) 2023-12-20 13:24:40 +11:00