Commit Graph

384 Commits

Author SHA1 Message Date
arnaucube
ce772b1d19 Add HashGlobalInputs for ZKInputs
Add HashGlobalInputs for ZKInputs compatible with js & circom circuits version.

Compatible with hermeznetwork/commonjs at version: c6a1448db5bae4cda839ce36c1f35d8defccc9cd
(c6a1448db5)
2020-11-17 16:33:29 +01:00
laisolizq
b3b23473b6 Add til api test first commit 2020-11-17 11:24:19 +01:00
laisolizq
4aa686797d Merge pull request #284 from hermeznetwork/feature/api-db-test-til-tx
HistoryDB TXs til test
2020-11-17 10:34:26 +01:00
a_bennassar
e0a4b656fe Merge pull request #279 from hermeznetwork/feature/l2db-test-til
Add til test l2db
2020-11-16 18:13:50 +01:00
ToniRamirezM
93d67ff699 HistoryDB TXs til test 2020-11-16 16:27:18 +01:00
laisolizq
1925110fda Add til test l2db 2020-11-16 13:35:24 +01:00
a_bennassar
f5c92418f2 Merge pull request #280 from hermeznetwork/feature/integration15
Add Sync stats, and report them in DebugAPI
2020-11-16 12:13:00 +01:00
Eduard S
6c0d48f4a2 Add Sync stats, and report them in DebugAPI 2020-11-16 11:48:36 +01:00
a_bennassar
7294d766cd Merge pull request #278 from hermeznetwork/feature/integration14
Test synchronizer reorg
2020-11-16 11:46:38 +01:00
Eduard S
457ff94bfa Test synchronizer reorg 2020-11-16 11:35:15 +01:00
arnau
adedd77956 Merge pull request #277 from hermeznetwork/feature/integration13
Fix exit table, set delayed_withdrawn in exits
2020-11-16 11:24:55 +01:00
Eduard S
e731b79e96 Fix exit table, set delayed_withdrawn in exits
- In exit table, `instant_withdrawn`, `delayed_withdraw_request`, and
  `delayed_withdrawn` were referencing batch_num.  But these actions happen
  outside a batch, so they should reference a block_num.
- Process delayed withdrawns:
    - In Synchronizer, first match a Rollup delayed withdrawn request, with the
      WDelayer deposit (via TxHash), and store the owner and token associated
      with the delayed withdrawn.
    - In HistoryDB: store the owner and token of a delayed withdrawal request
      in the exit_tree, and set delayed_withdrawn when the withdraw is done in
      the WDelayer.
- Update dependency of sqlx to master
    - Last release of sqlx is from 2018 October, and it doesn't support
      `NamedQuery` with a slice of structs, which is used in this commit.
2020-11-13 16:53:16 +01:00
arnau
8cc165f562 Merge pull request #275 from hermeznetwork/feature/api-db-tests-til
Feature/api db tests til
2020-11-11 15:54:41 +01:00
Arnau B
bed25d424a Use til for batches and blocks at historydb 2020-11-11 14:00:19 +01:00
a_bennassar
623c2e5ace Merge pull request #274 from hermeznetwork/feature/swagger-review
Swagger review
2020-11-11 11:44:56 +01:00
Eduard S
b5c5b49fb3 Merge pull request #276 from hermeznetwork/feature/statedb-accounts-root-js-comp
Cmptbility test for Root StateDB Accounts tree
2020-11-11 10:46:37 +01:00
ToniRamirezM
6919b561a5 Swagger Review
Swagger Review
2020-11-11 09:33:31 +01:00
arnaucube
a9f112c4ce Cmptbility test for Root StateDB Accounts tree
Checked with commonjs version:
c8414bd205
2020-11-10 17:45:42 +01:00
Eduard S
3a94363daf Merge pull request #272 from hermeznetwork/feature/update-account-hash
Update Account Hash comp to match js version
2020-11-10 16:53:16 +01:00
arnaucube
def6f46d75 Update Account Hash comp to match js version 2020-11-10 16:48:13 +01:00
Toni Ramírez
37b82604da Merge pull request #273 from hermeznetwork/feature/api-test
API state endpoint test
2020-11-10 14:51:21 +01:00
laisolizq
43e9bee9db API state endpoint test 2020-11-10 13:47:18 +01:00
Toni Ramírez
6ec7a0b55d Merge pull request #271 from hermeznetwork/feature/api-state-fee
API State RecommendedFee
2020-11-09 18:03:50 +01:00
laisolizq
9edf9d2168 API State RecommendedFee 2020-11-09 17:57:23 +01:00
a_bennassar
e8148e66ff Merge pull request #269 from hermeznetwork/feature/integration12
Process withdrawals in HistoryDB, test withdrawals and vars in sync
2020-11-09 17:27:04 +01:00
Eduard S
9f5af0aa07 Process withdrawals in HistoryDB, test withdrawals and vars in sync 2020-11-09 17:13:53 +01:00
a_bennassar
a1b9720e77 Merge pull request #270 from hermeznetwork/feature/api-state-metrics
API State Metrics
2020-11-09 16:54:25 +01:00
ToniRamirezM
55a78fbd72 API State Metrics 2020-11-09 16:50:15 +01:00
Eduard S
8190755d49 Merge pull request #268 from hermeznetwork/feature/wrapped-in-struct
Refactor api pagination
2020-11-09 15:32:28 +01:00
a_bennassar
a473070f65 Merge pull request #267 from hermeznetwork/feature/api-state
API add get state
2020-11-09 14:13:01 +01:00
laisolizq
cc6446e019 API add get state 2020-11-09 13:01:28 +01:00
Arnau B
d2e9196fba Refactor api pagination 2020-11-09 12:58:09 +01:00
Eduard S
a4886c99ef Merge pull request #265 from hermeznetwork/feature/zkinputs1
StateDB group Fee txs and ZKInputs gen of Fee txs & Update tx bytes parsers methods
2020-11-09 10:58:49 +01:00
arnaucube
900494fd8e StateDB group Fee txs and ZKInputs gen of Fee txs 2020-11-06 16:41:03 +01:00
arnaucube
fac8577bad Update tx bytes parsers methods 2020-11-06 15:24:12 +01:00
Eduard S
220fd992c5 Merge pull request #263 from hermeznetwork/feature/wrapped-in-struct
Put api DBs into struct
2020-11-06 15:05:53 +01:00
arnau
4a29cafcb7 Merge pull request #264 from hermeznetwork/feature/integration11
Add DebugAPI to Node, fix StateDB
2020-11-06 13:25:28 +01:00
Eduard S
5b6639a947 Add DebugAPI to Node, fix StateDB
- Allow starting the DebugAPI from the node via config
- In StateDB:
    - Make checkpoints when ProcessTxs() succeeds
    - Remove extra hardcoded `statedb` path that was redundant
    - Replace hardcoded `[:4]` by `[:]` when parsing idx, which failed because
      idx is 6 bytes length now.
- Extra: In node, use waitgroup instead of `stoppedXXX` channels to wait for
syncrhonizer goroutines to finish.
2020-11-06 13:00:11 +01:00
Arnau B
1112ded933 Put api DBs into struct 2020-11-06 12:00:56 +01:00
arnau
fd9b247120 Merge pull request #261 from hermeznetwork/feature/til-extra
Move logic to extend til blocks to til
2020-11-06 11:46:49 +01:00
Toni Ramírez
f662beb2ea Merge pull request #262 from hermeznetwork/feature/api-checks
ItemID to uint64 & check timestamp
2020-11-06 11:45:14 +01:00
laisolizq
22f0a45118 ItemID to uint64 & check timestamp 2020-11-06 10:40:57 +01:00
a_bennassar
3591e3c2a2 Merge pull request #259 from hermeznetwork/feature/api-account
Account API
2020-11-06 10:34:10 +01:00
ToniRamirezM
b840ceb57a Account API 2020-11-06 09:30:32 +01:00
Eduard S
5ebf46e045 Move logic to extend til blocks to til
Previously, the synchronizer test was extending the output from til to
precalculate many fields to compare it with the synchronizer and BD output.
Since this is useful outside of the syncrhonizer testing: move this
functionality to til via a function that extends the output
(til.Context.FillBlocksExtra).

Also, add new functionality: calculate fee idxs dynamically by setting a user
name, and calculate collected fees.
2020-11-05 18:09:12 +01:00
Eduard S
e8aabab2de Merge pull request #255 from hermeznetwork/feature/zkinputs0
ZKInputs update:
2020-11-05 18:07:28 +01:00
a_bennassar
1a9c96a720 Merge pull request #251 from hermeznetwork/feature/api-slots
API add slots endpoints
2020-11-05 16:04:43 +01:00
laisolizq
5012b82914 API add slots endpoints 2020-11-05 15:59:27 +01:00
laisolizq
651572cbf3 Merge pull request #260 from hermeznetwork/feature/api-fee-check
Check feeAmount overflow in API
2020-11-05 14:03:20 +01:00
ToniRamirezM
f90f14d0c1 Check feeAmount overflow in API 2020-11-05 12:15:47 +01:00