Merge pull request #255 from hermeznetwork/feature/zkinputs0

ZKInputs update:
This commit is contained in:
Eduard S
2020-11-05 18:07:28 +01:00
committed by GitHub
7 changed files with 166 additions and 77 deletions

View File

@@ -359,10 +359,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,

View File

@@ -150,7 +150,7 @@ func (tc *Context) GenerateBlocks(set string) ([]common.BlockData, error) {
FromBJJ: tc.Users[inst.from].BJJ.Public(),
TokenID: inst.tokenID,
Amount: big.NewInt(0),
LoadAmount: big.NewInt(int64(inst.loadAmount)),
LoadAmount: big.NewInt(0),
Type: common.TxTypeCreateAccountDeposit, // as txTypeCreateAccountDepositCoordinator is not valid oustide Til package
}
testTx := L1Tx{