mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-08 03:46:52 +01:00
ZKInput with L2Txs compatible with circom circuits
- Til
- update Til users BJJ key generation for better js tests
compatibility
- Common
- PoolL2Tx to L2Tx use AuxToIdx in case that ToIdx is 0
- Update ZKInputs parameter descriptions
- TxProcessor
- Fix AccumulatedFees in case that there is no CoordIdx for that token
- Fix zki.NewExit usage
- Use same order for AccumulatedFees & FeeIdx & FeePlanTokens
- Add Nonce usage to ExitLeafs
- Update TestZKInput6 and check its compatibility with circom Hermez
circuits
This commit is contained in:
@@ -311,10 +311,16 @@ func (tx *PoolL2Tx) VerifySignature(chainID uint16, pkComp babyjub.PublicKeyComp
|
||||
|
||||
// L2Tx returns a *L2Tx from the PoolL2Tx
|
||||
func (tx PoolL2Tx) L2Tx() L2Tx {
|
||||
var toIdx Idx
|
||||
if tx.ToIdx == Idx(0) {
|
||||
toIdx = tx.AuxToIdx
|
||||
} else {
|
||||
toIdx = tx.ToIdx
|
||||
}
|
||||
return L2Tx{
|
||||
TxID: tx.TxID,
|
||||
FromIdx: tx.FromIdx,
|
||||
ToIdx: tx.ToIdx,
|
||||
ToIdx: toIdx,
|
||||
Amount: tx.Amount,
|
||||
Fee: tx.Fee,
|
||||
Nonce: tx.Nonce,
|
||||
|
||||
Reference in New Issue
Block a user