ZKInputs generation ISFinalAccFee update

- Update IntermediateState FinalAccFee values to fit in the Circom circuit expected inputs
- Add ZKInputs generation test with transactions generated by Til
(TestZKInputs6)
- BatchBuilder: remove redundant MakeCheckpoint call
This commit is contained in:
arnaucube
2020-12-11 18:58:22 +01:00
parent a165bda17d
commit 593a477e6c
4 changed files with 113 additions and 62 deletions

View File

@@ -221,7 +221,7 @@ type ZKInputs struct {
ISInitStateRootFee *big.Int `json:"imInitStateRootFee"` // Hash
// ISFinalAccFee final accumulated fees (before computing the fees-tx).
// Contains the final values of the ISAccFeeOut parameter
ISFinalAccFee []*big.Int `json:"imFinalAccFee"` // big.Int, len: [maxFeeIdxs - 1]
ISFinalAccFee []*big.Int `json:"imFinalAccFee"` // big.Int, len: [maxFeeIdxs]
}
func bigIntsToStrings(v interface{}) interface{} {
@@ -384,7 +384,7 @@ func NewZKInputs(nTx, maxL1Tx, maxTx, maxFeeIdxs, nLevels uint32, currentNumBatc
}
zki.ISStateRootFee = newSlice(maxFeeIdxs - 1)
zki.ISInitStateRootFee = big.NewInt(0)
zki.ISFinalAccFee = newSlice(maxFeeIdxs - 1)
zki.ISFinalAccFee = newSlice(maxFeeIdxs)
return zki
}