The smart contracts were updated at some point and there have been some changes
in slot calculation. Update these values in the synchronizer and test auction
smart contract implementaiton.
- TxProcessor move txCompressedDataEmpty inside the if of tp.zki!=nil
- Abstract generation of transactions for ZKInput tests to avoid code
repetition
- used at txprocessor & test/zkproof tests
By default outputs contains "stdout", which prints the logs at the
output of the process. To add a log file as output, the path should be
added at the outputs array. To avoid printing the logs but storing them
on a file, can use []string{"pathtofile.log"}
When scheduling an L1Batch, make sure the previous L1Batch has been
synchronized. Otherwise, an L1Batch will be forged that may not contain all
the L1UserTxs that are supposed to be included.
- 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
- Debug Batch File
- Add details about why a batch is scheduled to be L1Batch or regular
- Add timestamps in time and blockNumber of important events
- Use a different naming for the files (batchNum + timestamp)
- Coordinator:
- To make decisions and store debug info, always use the current block that
is being mined, instead of the last mined block
- Node
- Load Coordinator Fee Account from config
- Sign the AccountCreationMsg to generate the
AccountCreationAuth
- Resolve#465
- Wait for synchronizer termination before stopping coordinator to avoid
getting stuck when closing in the following case:
- The coordinator stops reading the synchronizer msg channel,
and the node gets stuck sending a message to that channel.
- Common
- Move account creation auth signature code to common.
- Update RollupConstInputSHAConstantBytes
- Coordinator
- Set batch status in the debug file
- Propagate SCVariables on reorg
- Pipeline: Get SCVariables updates
- Resolve#457
- Fix off by 1 error in Pipeline.shouldL1L2Batch() (which shouldn't have
caused any problem, but it was not right)
- KVDB
- Delete future checkpoints after reset
- In `ResetFromSynchronizer`, remove all checkpoints first, and follow
the same logic as `reset()`.
- Cli
- Add command to generate a BabyJubJub key pair (to be used for the
Coordinator Fee Account)
- Node
- Adjust example config `Coordinator.L1BatchTimeoutPerc` to avoid
missing the L1Batch deadline with the following setup:
- a block is mined every 2 seconds
- single proof server that takes 2 seconds to calculate a proof
- TxProcessor
- Close temporary pebble used for the exit tree after usage.
- Resolve#463
- Upgrade go-merkletree version to include the last changes of Pebble
that fixes the cgo issues (which should fix#453), from:
c2b05f12d7
- TxSelector
- Remove parameter batchNum for GetL2TxSelection & GetL1L2TxSelection
- Add checks of ToBJJ & ToEthAddr when ToIdx>255
- Avoid getting the sender account twice to get the TokenID of a l2tx
- Add test to check that selected L2Txs are sorted by Nonce
- Discard L2Tx that return error at ProcessL2Txs
- executed `go mod tidy`
- Add missing Fees to CoordAccounts after processing PoolL2Txs
- Add Nonces checks for L2Txs (txs with incorrect nonces not included
in the selection)
- Add missing MakeCheckpoint() at the LocalAccountsDB once the
selection is done
- Add TxSelector test of full flow using Til.SetBlockchainMinimumFlow0
checking balances & parameters
- Til
- tests that were using `til.SetBlockchainMinimumFlow0` have been
updated, as now the L1CoordinatorTxs are placed simulating TxSelector
creation (when needed, not before)
- Add `EthSk` to `tc.User` to allow to sign `AccoutCreationAuths` at
the tests flows
- TxProcessor
- for L2Txs get TokenID from tx.FromIdx Account.TokenID instead than
- update tests vectors for new values
from tx.TokenID (which not always is set)
- Common
- move TxIDsFromL2Txs & TxIDsFromPoolL2Txs from `coordinator` to
`common` to allow usage from other packages
- StateDB
- Update GetIdxByEthAddrBJJ to return ErrToIdxNotFound when idx not found, so can be checked at upper levels
- TxSelector
- rm CoordIdxsDB that is no longer needed (also related methods)
- add `getCoordIdx` method to get the Coordinator Idx for a given TokenID
- Update coordinator account creation related to new TokenIDs from L2Txs
- Reorganize GetL1L2TxSelection
- return CoordIdxs used in the selection
- Update go-merkletree version which avoids marshaling Siblings to json
with 'null' value in case of empty array
- In config, add Debug.MeddlerLogs to enable meddler debug logs. This only
affects the node started via cli, tests swill ran with `meddler.Debug = true`
- Remove unused ethereum client functions and config parameters
- Document all the config parameters