Merge pull request #611 from hermeznetwork/feature/sync-l1-account-creation-auth

Synchronize the AccountCreationAuths from L1CoordinatorTxs
This commit is contained in:
arnau
2021-03-09 17:24:54 +01:00
committed by GitHub
7 changed files with 106 additions and 22 deletions

View File

@@ -1897,12 +1897,16 @@ func (c *Client) CtlAddBlocks(blocks []common.BlockData) (err error) {
}
c.CtlSetAddr(auction.Vars.BootCoordinator)
for _, batch := range block.Rollup.Batches {
auths := make([][]byte, len(batch.L1CoordinatorTxs))
for i := range auths {
auths[i] = make([]byte, 65)
}
if _, err := c.RollupForgeBatch(&eth.RollupForgeBatchArgs{
NewLastIdx: batch.Batch.LastIdx,
NewStRoot: batch.Batch.StateRoot,
NewExitRoot: batch.Batch.ExitRoot,
L1CoordinatorTxs: batch.L1CoordinatorTxs,
L1CoordinatorTxsAuths: [][]byte{}, // Intentionally empty
L1CoordinatorTxsAuths: auths,
L2TxsData: batch.L2Txs,
FeeIdxCoordinator: batch.Batch.FeeIdxsCoordinator,
// Circuit selector