Update ZKInputs for empty batches

- Add TestZKInputsEmpty circom test vectors
- Fix ZKInputsHash OldLastIdx bytearray
This commit is contained in:
arnaucube
2020-12-23 11:01:20 +01:00
parent a50bda3f59
commit 2583d35adf
3 changed files with 33 additions and 20 deletions

View File

@@ -96,6 +96,7 @@ func (s *StateDB) ProcessTxs(ptc ProcessTxsConfig, coordIdxs []common.Idx, l1use
s.zki = common.NewZKInputs(ptc.MaxTx, ptc.MaxL1Tx, ptc.MaxTx, ptc.MaxFeeTx, ptc.NLevels, s.currentBatch.BigInt())
s.zki.OldLastIdx = s.idx.BigInt()
s.zki.OldStateRoot = s.mt.Root().BigInt()
s.zki.Metadata.NewLastIdxRaw = s.idx
}
// TBD if ExitTree is only in memory or stored in disk, for the moment

File diff suppressed because one or more lines are too long