ZKInputs update:

- Add ZKInputs parser to JSON
- Update ProcessTxs to last go-merkletree version changes
- Add StateDB test to generate ZKInputs to check inside a circom circuit
- Small fix at Til CoordinatorTx.LoadAmount=0
This commit is contained in:
arnaucube
2020-11-04 13:04:17 +01:00
parent 11dbf67377
commit 7af6371f1d
7 changed files with 166 additions and 77 deletions

View File

@@ -353,10 +353,10 @@ func GenExitTree(n int, batches []common.Batch, accounts []common.Account) []com
AccountIdx: accounts[i%len(accounts)].Idx,
MerkleProof: &merkletree.CircomVerifierProof{
Root: &merkletree.Hash{byte(i), byte(i + 1)},
Siblings: []*big.Int{
big.NewInt(int64(i) * 10),
big.NewInt(int64(i)*100 + 1),
big.NewInt(int64(i)*1000 + 2)},
Siblings: []*merkletree.Hash{
merkletree.NewHashFromBigInt(big.NewInt(int64(i) * 10)),
merkletree.NewHashFromBigInt(big.NewInt(int64(i)*100 + 1)),
merkletree.NewHashFromBigInt(big.NewInt(int64(i)*1000 + 2))},
OldKey: &merkletree.Hash{byte(i * 1), byte(i*1 + 1)},
OldValue: &merkletree.Hash{byte(i * 2), byte(i*2 + 1)},
IsOld0: i%2 == 0,