- 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
- 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
Update usage of `*babyjub.PublicKey` to `babyjub.PublicKeyComp`
- when the key is not defined, internally is used `babyjub.EmptyBJJComp`, which is a `[32]byte` of zeroes of type `babyjub.PublicKeyComp`
- the API continues returning `nil` when the key is not defined
- Move smart contract constants and structs for variables to
common/{ethrollup.go, ethauction.go, ethwdelayer.go}:
- This removes repeated code of the structs for variables
- Allows reusing the constants and variables from all modules without
import cycles
- Remove unused common/scvars.go
- In common.BlockData, split data from each smart contract into a sepparate
field (Rollup, Auction, WDelayer). This affects the structures that til uses
as output, and HistoryDB in the AddBlockSCData.
- In Synchronizer:
- Pass starting block of each smart contract as config, instead of
incorrectly using the genesis block found in the acution constant (which
has a very different meaning)
- Use variable structs from common instead of an internal copy
- Synchronize more stuff (resolve some TODOs)
- Fix some issues found after initial testing with ganache
- In eth:
- In auction.go: Add method to get constants
- Update README to use ganache instead of buidlerevm as local blockchain
for testing
- Update env variables and test vectors to pass the tests with the
deployment in the ganache testnet.
- Use ethereum keys derived from paths (hdwallet) in testing to avoid
hardcoding private keys and generate the same keys from a mnemonic used
in the ganache tesnet.
- Update StateDB ProcessTxs fees collection
- Update ProcessTxs tests to last StateDB & Til changes
- Til Blockchain L2Txs remove Nonce generation, update tests accordingly
- Update Til Set to test fees
- Node
- Updated configuration to initialize the interface to all the smart
contracts
- Common
- Moved BlockData and BatchData types to common so that they can be
shared among: historydb, til and synchronizer
- Remove hash.go (it was never used)
- Remove slot.go (it was never used)
- Remove smartcontractparams.go (it was never used, and appropriate
structs are defined in `eth/`)
- Comment state / status method until requirements of this method are
properly defined, and move it to Synchronizer
- Synchronizer
- Simplify `Sync` routine to only sync one block per call, and return
useful information.
- Use BlockData and BatchData from common
- Check that events belong to the expected block hash
- In L1Batch, query L1UserTxs from HistoryDB
- Fill ERC20 token information
- Test AddTokens with test.Client
- HistryDB
- Use BlockData and BatchData from common
- Add `GetAllTokens` method
- Uncomment and update GetL1UserTxs (with corresponding tests)
- Til
- Rename all instances of RegisterToken to AddToken (to follow the smart
contract implementation naming)
- Use BlockData and BatchData from common
- Move testL1CoordinatorTxs and testL2Txs to a separate struct
from BatchData in Context
- Start Context with BatchNum = 1 (which the protocol defines to be the
first batchNum)
- In every Batch, set StateRoot and ExitRoot to a non-nil big.Int
(zero).
- In all L1Txs, if LoadAmount is not used, set it to 0; if Amount is not
used, set it to 0; so that no *big.Int is nil.
- In L1UserTx, don't set BatchNum, because when L1UserTxs are created
and obtained by the synchronizer, the BatchNum is not known yet (it's
a synchronizer job to set it)
- In L1UserTxs, set `UserOrigin` and set `ToForgeL1TxsNum`.
Update Til with small fixes:
- L2Tx TxID & Type correctness done after Idxs setted
- Added PoolL2Tx signature for Exit type
Common:
- Add common.TxID Marshalers test
Transakcio:
- Transaction generation to fail when Transfer to an account that don't exist (not created yet)
- Add CreateAccountDepositCoordinator instruction feature
- Updated lang.go instruction type parser approach for more simplicity of code
- Remove `*testing.T` from transactions generation methods, use `log.Fatal` instead
Add transakcio set type definition, add set loading, move transakcio to
package, adapt branch to last master updates (fix compile due new common
types & git conflicts).
Update tests to pass the test, pending to adapt to new Transakcio
interface.
Add TxID calculation & New{Layer}Tx Type
New{Layer}Tx methods that compute the `TxID` & `TxType` values from the
transaction values:
- NewL1Tx
- NewL2Tx
- NewPoolL2Tx
Add TxID Scanner & Valuer for database/sql
HistoryDB & L2DB & API packages tests will need to be addapted to the
TestTransaction generation once is done.
Update tx testing generation:
- add new batch lexic to tx-test language
- add coordinatorL1Txs generation to tx-test
- add SetTest0 code to generate test L1&L2 transactions