arnau
a9804dcc2b
Merge pull request #439 from hermeznetwork/feature/cliwipesql
...
Add cli command to wipe the SQL DB
2020-12-31 10:38:47 +01:00
Eduard S
e5fc403451
Add cli command to wipe the SQL DB
...
- Refactor the migrations code so that packr is only called (via an init
function in `db/utils.go`).
- When loading the migrations, make sure there is at least one migration,
otherwise panic (this would happen if the node is built incorrectly)
2020-12-31 10:34:32 +01:00
arnau
2e51860c37
Merge pull request #437 from hermeznetwork/feature/ethprivkey
...
Load ethereum private key
2020-12-31 10:33:44 +01:00
ToniRamirezM
64b214061c
Change queries that produced undesired meddler logs
2020-12-30 19:12:53 +01:00
Eduard S
fedbacaade
Merge pull request #440 from hermeznetwork/fix/api-empty-arrays
...
empty array instead of 404
2020-12-30 13:56:03 +01:00
Arnau B
a32f75db78
empty array instead of 404
2020-12-30 12:41:53 +01:00
a_bennassar
c2dd982d26
Merge pull request #436 from hermeznetwork/feature/exit-proof-siblings
...
Update ExitProofs-Siblings padding
2020-12-30 11:13:22 +01:00
Eduard S
42791181a1
Load ethereum private key
...
Load an ethereum keystore when the node is started in coordinator mode. The
private key corresponding to the forger address must be imported into the
keystore before running the node in coordinator mode. You can see an examples
in `cli/node/load-sk-example.sh`.
2020-12-30 10:48:14 +01:00
arnaucube
ca5870e3ba
Update ExitProofs-Siblings padding
2020-12-30 10:44:34 +01:00
Eduard S
88f924e9dd
Merge pull request #435 from hermeznetwork/feature/addrs-in-exit-endpoints
...
Include addrs in exit responses
2020-12-29 18:01:46 +01:00
Eduard S
6e2cde8a31
Merge pull request #434 from hermeznetwork/fix/next-forgers-null
...
Fix next forgers when no bids
2020-12-29 17:59:18 +01:00
Arnau B
6cd292b937
Include addrs in exit responses
2020-12-29 17:35:20 +01:00
Eduard S
8c6dc6e3f8
Merge pull request #433 from hermeznetwork/feature/kvdb
...
Abstract KVDB from StateDB
2020-12-29 17:21:01 +01:00
Arnau B
d3c703ca75
Fix next forgers when no bids
2020-12-29 16:55:26 +01:00
arnaucube
68bfbff269
Abstract KVDB from StateDB
...
- KVDB contains the Checkpoint & Resets system
- StateDB uses KVDB and adds all the StateDB related methods
2020-12-29 16:48:01 +01:00
Eduard S
890b94a41a
Merge pull request #428 from hermeznetwork/fix/api-next-forgers
...
Fix next forgers api response
2020-12-29 15:32:02 +01:00
Arnau B
6058d3c41a
Fix next forgers api response
2020-12-29 15:17:55 +01:00
a_bennassar
57cb6ac31f
Merge pull request #429 from hermeznetwork/feature/maybefixitemid
...
Fix item_id order in forged l1UserTxs
2020-12-29 15:15:54 +01:00
Eduard S
02c2ee155a
Fix item_id order in forged l1UserTxs
...
Also, make sure that all SQL queries that return slices are sorted
2020-12-29 12:28:53 +01:00
Eduard S
88cd43efbd
Merge pull request #427 from hermeznetwork/feature/abstr-txprocessor
...
Abstract TxProcessor from StateDB
2020-12-29 11:18:57 +01:00
arnaucube
0cf1ed217b
Abstract TxProcessor from StateDB
...
- Abstract TxProcessor from StateDB
- Upgrade to last version of go-merkletree for the key-value DB usage
2020-12-29 11:14:38 +01:00
Eduard S
025b56c8c3
Merge pull request #425 from hermeznetwork/fix/zki-ntx
...
Fix ZKI NTx for MaxTx
2020-12-28 12:17:51 +01:00
Eduard S
e69970cd41
Merge pull request #424 from hermeznetwork/feature/acccreationauth-js-comp
...
AccountCreationAuth compatible with js implementation
2020-12-28 11:48:38 +01:00
arnaucube
cf199fd832
Fix ZKI NTx for MaxTx
...
On the Circuits uses the name `nTx` (and on the tests `maxTx`), but
Contracts `maxTx`. On Go we had both variables, but really only used
one, now at Go we use `MaxTx` to refer to the maximum number of
transactions.
2020-12-28 11:26:47 +01:00
arnaucube
ca010275e1
AccountCreationAuth compatible with js implementation
2020-12-28 11:16:00 +01:00
arnau
cbcd387f98
Merge pull request #423 from hermeznetwork/feature/integration27
...
Delete old checkpoints in stateDB automatically & Don't log errors when context done
2020-12-28 11:15:00 +01:00
Eduard S
a0c8ace38d
Add missing tracerr.Wrap
2020-12-24 13:39:27 +01:00
Eduard S
2205fcadbc
Delete old checkpoints in stateDB automatically
...
Introduce a constructor parameter for the StateDB called `keep`, which tells
how many checkpoints to keep. When doing a new checkpoint, if the number of
existing checkpoints exeeds `keep`, the oldest ones will be deleted.
2020-12-24 13:35:47 +01:00
Eduard S
1b55296006
Merge pull request #420 from hermeznetwork/feature/txsel-accauths
...
TxSel return of AccCreatAuths from the selection
2020-12-24 11:07:02 +01:00
Eduard S
6a2b9474e3
Merge pull request #416 from hermeznetwork/feature/update-accountcreationauth
...
Update AccountCreationAuth & fix auth.HashToSign
2020-12-24 10:50:18 +01:00
arnaucube
8615a462ab
Update AccountCreationAuth & fix auth.HashToSign
...
- Fix AccountCreationAuth.HashToSign (was using `[]byte("0x...")`, which
uses the bytes of the string. Now uses the bytearray of the compressed
BJJ public key (compatible with js implementation))
- Update AccountCreationAuth to last specification (add to hash
parameters ChainID & HermezAddress)
- Add missing test to AccountCreationAuth
2020-12-24 10:41:35 +01:00
arnaucube
6413011294
TxSel return of AccCreatAuths from the selection
...
Add return of AccountCreationAuths at the TxSelector, which is an array
of bytearrays with the signatures of the AccountCreationAuthorization of
the accounts of the users created by the Coordinator with
L1CoordinatorTxs of those accounts that does not exist yet but there is
a transactions to them and the authorization of account creation exists.
2020-12-24 10:34:41 +01:00
arnau
e787651ba3
Merge pull request #414 from hermeznetwork/feature/syncforgercommitment
...
Sync ForgerCommitment and use it in coord
2020-12-24 10:31:58 +01:00
Eduard S
35d598f564
Don't log errors when context done
2020-12-23 17:33:41 +01:00
Eduard S
8267d007c9
Sync ForgerCommitment and use it in coord
...
Previously the coordinator was erroneously using Slot.BatchesLen to determine
when anyone can forge. The correct behaviour is implmenented with the boolean
flag `ForgerCommitment`, that is set to true only when there's a batch before
the deadline within a slot.
Delete Slot.BatchesLen, and the synchronization code of this value from the
Synchronizer, as this is not needed
2020-12-23 17:06:20 +01:00
Eduard S
cd6eb44c16
Merge pull request #413 from hermeznetwork/feature/parametrize-chainid
...
Parametrize ChainID
2020-12-23 16:35:39 +01:00
Eduard S
086dc85104
Get ChainID from ethereum node
2020-12-23 16:26:56 +01:00
arnaucube
150597c282
Parametrize ChainID
2020-12-23 15:23:48 +01:00
Eduard S
adc044001f
Merge pull request #412 from hermeznetwork/fix/sdb-nonce
...
Fix StateDB & Til Nonce increment
2020-12-23 12:47:40 +01:00
arnaucube
eea44b3990
Fix StateDB & Til Nonce increment
2020-12-23 12:32:41 +01:00
Eduard S
fb48ca4e58
Merge pull request #411 from hermeznetwork/feature/forged-txs-in-batchesapi
...
Add forged txs in batch endpoints response
2020-12-23 12:07:45 +01:00
Eduard S
4793a20727
Merge pull request #408 from hermeznetwork/feature/txsel-update-processinglogic
...
TxSelector update txs processing logic
2020-12-23 11:48:06 +01:00
arnaucube
982a423bf3
TxSelector update txs processing logic
2020-12-23 11:36:41 +01:00
Arnau B
6e7f860d61
Add forged txs in batch endpoints response
2020-12-23 11:26:23 +01:00
arnau
3cf615a769
Merge pull request #406 from hermeznetwork/feature/implforgebatchargs
...
Implement Pipeline.prepareForgeBatchArgs()
2020-12-23 11:22:28 +01:00
Eduard S
8d5b375625
Merge pull request #407 from hermeznetwork/fix/api-coordinator
...
Add bootCoord to coord table, get coord by forgerAddr
2020-12-23 11:10:23 +01:00
arnaucube
2583d35adf
Update ZKInputs for empty batches
...
- Add TestZKInputsEmpty circom test vectors
- Fix ZKInputsHash OldLastIdx bytearray
2020-12-23 11:09:43 +01:00
Arnau B
bc5fa92898
Add bootCoord to coord table, get coord by forgerAddr
2020-12-23 11:03:21 +01:00
Eduard S
cd1a193dcd
Merge pull request #405 from hermeznetwork/fix/api-nonce
...
Fix API nonces
2020-12-22 17:43:24 +01:00
Eduard S
a50bda3f59
Update packr dependency
...
Update packr to 2.8.1 which fixes this issue:
https://github.com/gobuffalo/packr/issues/261 which I encountered while running
a test with `-race`
2020-12-22 17:27:38 +01:00