Commit Graph

15 Commits

Author SHA1 Message Date
Lucas Menéndez
84e7901031 feature: multiple big int keys and multi values support (#35)
Support to work with BigInts 

---------

Co-authored-by: Guido Iribarren <git@guidoi.com.ar>
2025-04-14 10:56:42 +02:00
p4u
e64315269b update deps
Signed-off-by: p4u <pau@dabax.net>
2024-12-16 11:39:34 +01:00
Gui Iribarren
cfebf3e7fd add HashMultiPoseidon 2024-12-16 11:33:45 +01:00
Lucas Menéndez
8e1cc943f4 feature: mimc bls12 377 (#31)
add mimc hash implementation over bls12_377 ecc from gnark
2024-11-20 12:26:23 +01:00
p4u
3554342282 update dependencies, upgrade code and add a memory database
Signed-off-by: p4u <pau@dabax.net>
2024-11-06 09:45:28 +01:00
arnaucube
a5eeb50d5e Upgrade to last goff version
Upgrade to last go-iden3-crypto, which has been upgraded to the new goff
(https://github.com/ConsenSys/goff) version used for the finite fields
arithmetic, which has been significantly optimized.

Previous:
TestAddBatchBench: nCPU: 4, nLeafs: 50000, hash: Poseidon, db: badgerdb
        Add loop:       44.043418294s
        AddBatch:       3.219378868s

New:
TestAddBatchBench: nCPU: 4, nLeafs: 50000, hash: Poseidon, db: badgerdb
        Add loop:       30.915348956s
        AddBatch:       2.289317479s

Improvement (using arbo with Poseidon hash): 1.40x
2022-01-07 11:33:41 +01:00
arnaucube
6cf1e58d9f Implement addBatchInDisk for big trees
Implement addBatchInDisk for big trees, which does not puts the tree in
memory, and works directly over the db data, parallelizing for each CPU.
2021-10-25 14:55:42 +02:00
arnaucube
2514b3188f Update db usage to new dvote.db interface version 2021-08-06 18:41:13 +02:00
arnaucube
f10265ed40 Migrate repository to github.com/vocdoni/arbo 2021-06-08 11:27:04 +02:00
arnaucube
c6059fcb75 Migrate kv db to go.vocdoni.io/dvote/db interface
Case tree empty, AddBatch was 10.95x times faster than without AddBatch
	nCPU: 4, nLeafs: 1024, hash: Poseidon, db: memory
	dbgStats(hash: 2.047k, dbGet: 1, dbPut: 2.049k)
Case tree not empty w/ few leafs, AddBatch was 7.28x times faster than without AddBatch
	nCPU: 4, nLeafs: 1024, hash: Poseidon, db: memory
	dbgStats(hash: 2.047k, dbGet: 198, dbPut: 2.049k)
Case tree not empty w/ enough leafs, AddBatch was 5.94x times faster than without AddBatch
	nCPU: 4, nLeafs: 1024, hash: Poseidon, db: memory
	dbgStats(hash: 2.047k, dbGet: 1.000k, dbPut: 2.049k)
Case tree not empty, AddBatch was 9.27x times faster than without AddBatch
	nCPU: 4, nLeafs: 4096, hash: Poseidon, db: memory
	dbgStats(hash: 8.191k, dbGet: 1.800k, dbPut: 8.193k)
Case tree not empty & unbalanced, AddBatch was 10.67x times faster than without AddBatch
	nCPU: 4, nLeafs: 4096, hash: Poseidon, db: memory
	dbgStats(hash: 10.409k, dbGet: 2.668k, dbPut: 10.861k)
TestAddBatchBench: nCPU: 4, nLeafs: 50000, hash: Blake2b, db: badgerdb
	Add loop:	10.10829114s
	AddBatch:	732.030263ms
		dbgStats(hash: 122.518k, dbGet: 1, dbPut: 122.520k)
TestDbgStats
	add in loop in emptyTree dbgStats(hash: 141.721k, dbGet: 134.596k, dbPut: 161.721k)
	addbatch caseEmptyTree dbgStats(hash: 24.402k, dbGet: 1, dbPut: 24.404k)
	addbatch caseNotEmptyTree dbgStats(hash: 26.868k, dbGet: 2.468k, dbPut: 26.872k)
2021-06-03 18:23:45 +02:00
arnaucube
6dcbbdf4a5 Replace naive AddBatch by optimized AddBatch
- Replace naive AddBatch by optimized AddBatch
- Add blake2b hash support
- Expose needed methods for external usage (ReadLeafValue,
ReadIntermediateChilds)
- Return 'value' in GenProof
2021-05-08 17:08:07 +02:00
arnaucube
f8ac4be02b Tests migrate from stretchr/testify to frankban/quicktest 2021-04-03 19:40:18 +02:00
arnaucube
bde87ca844 Add proof verification 2021-03-31 20:34:36 +02:00
arnaucube
43cb6041c9 Add Tree.Add compatible with circomlib 2021-03-30 22:41:34 +02:00
arnaucube
7cfa466b25 Add GithubActions: lint & test 2021-03-30 22:03:26 +02:00