792 Commits

Author SHA1 Message Date
arnau
f0886b3d2a Merge pull request #517 from hermeznetwork/feature/priceserrwarn
Update README
2021-02-01 12:28:36 +01:00
Eduard S
49610330c4 Update README 2021-02-01 12:24:24 +01:00
arnau
7559991f7f Merge pull request #516 from hermeznetwork/feature/priceserrwarn
Use Warn instead of Error on get prices error
2021-02-01 12:03:02 +01:00
arnau
c396820129 Merge pull request #515 from hermeznetwork/feature/updatecontracts
Update contracts and get verifiersLen from SC
2021-02-01 11:35:34 +01:00
Eduard S
e73499628c Use Warn instead of Error on get prices error 2021-02-01 11:19:10 +01:00
Eduard S
90fe98d15c Update contracts and get verifiersLen from SC 2021-01-29 17:46:14 +01:00
arnau
8cc23b9fb2 Merge pull request #513 from hermeznetwork/test/idx
Fix incorrect initial CurrentIdx in kvdb
2021-01-29 13:27:03 +01:00
Eduard S
bc831af6a8 Merge pull request #504 from hermeznetwork/feature/txsel-checkenoughbalance
Check enough funds on sender at TxSelector and don't include the tx in the selection
2021-01-29 13:17:48 +01:00
arnaucube
bffc0d08ae Check enough funds on sender on TxProc &TxSel
- TxSelector
	- Add check enough funds on sender at TxSelector and don't
include the tx in the selection
- TxProcessor
	- Add checks that the balance when substracted the
amount/amount+fee never goes below 0

fix #502
2021-01-29 13:13:17 +01:00
Eduard S
d7c56afa5c Fix incorrect initial CurrentIdx in kvdb 2021-01-29 12:41:26 +01:00
Eduard S
30973aa292 Merge pull request #507 from hermeznetwork/feature/txid-fixcollisions
Feature/txid fixcollisions
2021-01-29 11:43:10 +01:00
arnaucube
aade6220d4 Update TxID to avoid collisions on DB (fix #503) 2021-01-29 11:38:22 +01:00
arnaucube
a899f43914 Add TokenID to L2Tx
L2Tx.TokenID is not on the data obtained by the Synchronizer from the
blockchain, but is set by the TxProcessor when processing the
transactions in the StateDB.
2021-01-27 12:40:09 +01:00
Pedro Sousa Grilo
f3678e8cb8 Merge pull request #496 from hermeznetwork/feature/integration
run integration on push to master
2021-01-22 14:44:59 +00:00
Pedro grilo
1e7f903cf9 Add action to trigger tests in integration-testing 2021-01-22 11:59:37 +01:00
arnau
733ffb6399 Merge pull request #500 from hermeznetwork/fix/exitnonces1
Fix exit tree nonces
2021-01-22 10:10:32 +01:00
Eduard S
1772422803 Fix exit tree nonces
Remove increment in exit tree leaf nonce when there are multiple exits for the
same account in the same batch.

Add a test to verify the correct implementation of exit leafs caused by
multiple exits.
2021-01-21 17:06:59 +01:00
arnau
3801d0bee6 Merge pull request #498 from hermeznetwork/feature/update-txman
Update coordinator to work better under real net
2021-01-20 17:33:57 +01:00
Eduard S
70482605c4 Update coordinator to work better under real net
- cli / node
    - Update handler of SIGINT so that after 3 SIGINTs, the process terminates
      unconditionally
- coordinator
    - Store stats without pointer
    - In all functions that send a variable via channel, check for context done
      to avoid deadlock (due to no process reading from the channel, which has
      no queue) when the node is stopped.
    - Abstract `canForge` so that it can be used outside of the `Coordinator`
    - In `canForge` check the blockNumber in current and next slot.
    - Update tests due to smart contract changes in slot handling, and minimum
      bid defaults
    - TxManager
        - Add consts, vars and stats to allow evaluating `canForge`
        - Add `canForge` method (not used yet)
        - Store batch and nonces status (last success and last pending)
        - Track nonces internally instead of relying on the ethereum node (this
          is required to work with ganache when there are pending txs)
        - Handle the (common) case of the receipt not being found after the tx
          is sent.
        - Don't start the main loop until we get an initial messae fo the stats
          and vars (so that in the loop the stats and vars are set to
          synchronizer values)
- eth / ethereum client
    - Add necessary methods to create the auth object for transactions manually
      so that we can set the nonce, gas price, gas limit, etc manually
    - Update `RollupForgeBatch` to take an auth object as input (so that the
      coordinator can set parameters manually)
- synchronizer
    - In stats, add `NextSlot`
2021-01-20 17:29:02 +01:00
Eduard S
eaca2f4f21 Merge pull request #499 from hermeznetwork/feature/fixexitinfos
Feature/fixexitinfos
2021-01-20 16:46:12 +01:00
arnaucube
b20ffd826e TxProc merge multiple exits into single ExitInfo
Fix #497
2021-01-20 16:37:13 +01:00
Eduard S
168432c559 Remove +1 in DefaultSlotSetBidSlotNum
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.
2021-01-20 16:01:03 +01:00
Eduard S
699b9deef0 Add test to show txprocessor bug
- Test that two exits for the same account in the same batch should be merged
  into one exitInfo with the accumulated balance of both exits, in the
  txprocessor output
2021-01-20 13:49:44 +01:00
Eduard S
79b73ce8af Merge pull request #495 from hermeznetwork/fix/coord-fees-duplicated
Fix CoordIdxs fees duplicated
2021-01-19 16:59:09 +01:00
arnaucube
b2f1a75ac6 Fix CoordIdxs fees duplicated
Fix #483
2021-01-19 16:48:33 +01:00
Eduard S
1ac2d783e9 Merge pull request #486 from hermeznetwork/fix/api-hardcoded-bootcoordinator
Stop using hardcoded bootcoordinator in api
2021-01-18 18:04:25 +01:00
Eduard S
9ce4dd9b6d Merge pull request #489 from hermeznetwork/feature/test-flow-txsel-batchbuild-zkinputs
Add test connecting TxSelector, BatchBuilder, ZKInputs, ProofServer
2021-01-18 17:58:24 +01:00
arnaucube
7f46c3028e Add tests connecting TxSelector, BatchBuilder, ZKInputs, ProofServer
- Add tests connecting TxSelector, BatchBuilder, ZKInputs, ProofServer
- Added test to check that the signatures of the PoolL2Txs from the L2DB
pool can be verified, to check that the parameters of the PoolL2Tx match
the original parameters signed before inserting them into the L2DB
2021-01-18 17:52:14 +01:00
a_bennassar
1633a88a67 Merge pull request #490 from hermeznetwork/feature/pooleffectiveto
In pool l2tx, store effective in aux column
2021-01-18 15:27:41 +01:00
Eduard S
828b8177c2 In pool l2tx, store effective in aux column 2021-01-18 13:21:56 +01:00
Arnau B
5ff42220ce Stop using hardcoded bootcoordinator in api 2021-01-14 16:00:44 +01:00
Eduard S
8f6b081f2c Merge pull request #484 from hermeznetwork/feature/proofservertest-zki6
Add ZKInputs test to use ProofServer
2021-01-14 15:13:51 +01:00
arnaucube
c61a5aa3da Add ZKInputs test to use ProofServer 2021-01-14 14:45:32 +01:00
Eduard S
ca6a4a6013 Merge pull request #481 from hermeznetwork/feature/set-idx-new-accounts
Add idx for txs that create account
2021-01-14 10:22:10 +01:00
Eduard S
ec194d5066 Set l1tx.EffectiveFromIdx in TxProcessor and til 2021-01-13 18:20:47 +01:00
Arnau B
50fc607306 Add idx for txs that creat account, step1 2021-01-13 18:16:32 +01:00
arnau
84eff53691 Merge pull request #482 from hermeznetwork/feature/document
Document that /tmp should be mounted as tmpfs
2021-01-13 16:11:58 +01:00
arnau
6651df1e52 Merge pull request #480 from hermeznetwork/feature/testrealprover
Fix ChainID in zkInputs empty TxCmpData
2021-01-13 14:35:49 +01:00
arnaucube
a16ec1750e Abstract txs generation for ZKInputs tests
- 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
2021-01-13 14:29:37 +01:00
Eduard S
570926398c Document that /tmp should be mounted as tmpfs
Resolve #214
2021-01-13 13:27:55 +01:00
Eduard S
75f068baa8 Fix ChainID in zkInputs empty TxCmpData
Test TxProcessor zkInputs against a real proof server
2021-01-13 12:41:00 +01:00
Eduard S
5becadfa6e Merge pull request #479 from hermeznetwork/feature/log-outputs
Add opt to disable print logs but storing to file
2021-01-12 19:13:44 +01:00
arnaucube
dffc7e2f4e Add opt to disable print logs but storing to file
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"}
2021-01-12 18:55:05 +01:00
a_bennassar
1550b69f26 Merge pull request #478 from hermeznetwork/feature/api-bid-big-int
Remove big.Int from state API
2021-01-12 18:52:38 +01:00
ToniRamirezM
170da500db Remove big.Int from state API 2021-01-12 18:37:56 +01:00
a_bennassar
a5643c16f6 Merge pull request #476 from hermeznetwork/feature/api-big-ints-removal
Remove bigints from API
2021-01-12 15:35:16 +01:00
Eduard S
dade77046b Merge pull request #475 from hermeznetwork/feature/zki-batchnum
Add ZKI tests Til last batches MinimumFlow0 &other
2021-01-12 13:14:53 +01:00
arnaucube
0bea7bcfea Add ZKI tests Til last batches MinimumFlow0 &other
- Add ZKI tests Til last batches MinimumFlow0
- Fix zki.CurrentNumBatch
- Fix StateDB BatchNum log
2021-01-12 13:10:42 +01:00
arnau
48ec769914 Merge pull request #474 from hermeznetwork/fix/coordinatorl1batch
Fix forging L1Batch too early
2021-01-12 13:10:10 +01:00
Eduard S
484fca12f8 Organize coordinator code, and rename some funcs 2021-01-12 12:57:44 +01:00