Commit Graph

808 Commits

Author SHA1 Message Date
Mikelle
e9b80d0c6d Merge branch 'develop' into feature/apiWithoutError
# Conflicts:
#	api/api.go
2021-03-31 19:02:44 +03:00
Danilo Pantani
2dba819696 Merge pull request #676 from hermeznetwork/feature/warnLogPriceUpdate
added checker and log.warn to updateMethodTypeStatic
2021-03-31 12:40:01 -03:00
Danilo Pantani
629c67a62e Merge pull request #675 from hermeznetwork/feature/configChainId
added chainId to config API
2021-03-31 12:39:39 -03:00
Eduard S
bb71a94e22 Merge pull request #688 from hermeznetwork/feature/txsel-l1frozenqueue-acccreation
TxSel avoid L1CoordTx for L2Tx that have a L1UserTx in the frozen queue
2021-03-31 13:25:24 +02:00
arnau
6074f2d7fb Merge pull request #683 from hermeznetwork/doc/api-and-sql-related
Add package level documentation for db, historydb, l2db, api, apitype…
2021-03-31 13:05:43 +02:00
arnaucube
6f1a44df02 TxSel avoid L1CoordTx for L2Tx that have a L1UserTx in the frozen queue
For the L2Txs of TransferToEthAddr & TransferToBJJ for a not-yet
existing accounts, in the TxSelector check if L2Tx receiver account will
be created by a L1UserFrozenTxs (in the next batch, the current frozen
queue). In that case, the L2Tx will be discarded at the current batch,
even if there is an AccountCreationAuth for the account, as there is a
L1UserTx in the frozen queue that will create the receiver Account.  The
L2Tx is discarded to avoid the Coordinator creating a new
L1CoordinatorTx to create the receiver account, which will be also
created in the next batch from the L1UserFrozenTx, ending with the user
having 2 different accounts for the same TokenID.
The double account creation is supported by the Hermez zkRollup
specification, but it was decided to mitigate it at the TxSelector level
for the explained cases.
2021-03-31 13:02:51 +02:00
arnaubennassar
4c99640b8c Add package level documentation for db, historydb, l2db and api/... 2021-03-31 11:14:49 +02:00
Danilo Pantani
3fedcb7023 Merge pull request #636 from hermeznetwork/feature/metric-package
instrumenting the application
2021-03-29 20:03:13 -03:00
Eduard S
3f643f022a Merge pull request #677 from hermeznetwork/feature/fastsync-get-headerByNumber
Faster synchronization by fetching only block headers
2021-03-29 11:10:24 +02:00
Danilo Pantani
b8d339d568 Merge pull request #670 from hermeznetwork/fix/remove-release-os
fix the invalid goarch build
2021-03-26 16:16:29 -03:00
Mikelle
01ec1ca395 added test and move logic to api.NewAPI 2021-03-25 22:41:46 +03:00
Mikelle
561f491d53 added token symbol to UpdateMethodTypeStatic log 2021-03-25 21:42:50 +03:00
Pantani
9245247ee4 create a gin middleware to collect request metrics and export them to the Prometheus route 2021-03-25 09:31:29 -03:00
Eduard S
6c1c157bc3 Merge pull request #672 from hermeznetwork/feature/configurable-recommendedfee-strategy
Add configuration option to choose recommended fee strategy, and add …
v1.0.0
2021-03-25 12:22:57 +01:00
arnaubennassar
f9ddf88c93 Add configuration option to choose recommended fee strategy, and add static strategy 2021-03-25 12:13:04 +01:00
Mikelle
4dc44e70c4 added checker for version in no route api 2021-03-24 23:13:45 +03:00
Mikelle
7b6dd0899e added checker and log.warn to updateMethodTypeStatic 2021-03-24 22:36:07 +03:00
Mikelle
14ead3ddf1 added chainId to config API 2021-03-24 22:20:46 +03:00
Pantani
a1eea43443 fix the invalid goarch build and avoid calling the migration-pack each build 2021-03-24 10:41:32 -03:00
Oleksandr Brezhniev
2125812e90 Faster synchronization with usage of HeaderByNumber instead of BlockByNumber 2021-03-23 23:09:31 +02:00
Danilo Pantani
f07fd82822 Merge pull request #653 from hermeznetwork/feature/goreleaser-integration
Generating automatically releases with Goreleaser
v0.1.0
2021-03-23 13:52:41 -03:00
arnau
d465d51e78 Merge pull request #667 from hermeznetwork/feature/documentpackages
Document synchronizer, node and coordinator
2021-03-23 13:33:40 +01:00
Eduard S
e23d0a07d2 Document synchronizer, node and coordinator 2021-03-23 13:19:23 +01:00
Pantani
6d84d143a2 Measure the server proof duration 2021-03-23 01:40:45 -03:00
Pantani
3b3d96e07c create the metrics package for a better app instrumenting 2021-03-23 01:40:32 -03:00
Danilo Pantani
e9be904c2f Merge pull request #656 from hermeznetwork/feature/license
add AGPLv3 License
2021-03-22 20:45:24 -03:00
Pantani
88b17cbe99 add release distribution with Goreleaser (https://goreleaser.com) 2021-03-22 20:44:27 -03:00
Danilo Pantani
1ffe437538 Merge pull request #657 from hermeznetwork/feature/documentserveapi
Add minimum documentation of serveapi command
2021-03-22 16:02:42 -03:00
arnau
e2f9a1d7eb Merge pull request #650 from hermeznetwork/fix/serveapi-flags
fix the application initialization flags
2021-03-22 18:14:03 +01:00
arnau
999dde5621 Merge pull request #662 from hermeznetwork/feature/improveSCinits
Bound the filter of init SC events by blocks
2021-03-22 18:12:53 +01:00
Eduard S
aa82efc868 Bound the filter of init SC events by blocks
When querying the init event for each smart contract, bound the search from
block genesis-24h to block genesis.  Otherwise, this query in geth synced to
mainnet takes too long.
2021-03-22 17:55:30 +01:00
a_bennassar
2184084408 Merge pull request #659 from hermeznetwork/feature/move-api-subpackages
Move apitypes & stateapiupdater into api dir
2021-03-22 17:02:38 +01:00
arnaucube
206c8e6e8f Move apitypes & stateapiupdater into api dir 2021-03-22 16:51:10 +01:00
Eduard S
c2c74e14f1 Merge pull request #655 from hermeznetwork/feature/api-versioning
Add API versioning
2021-03-22 16:38:12 +01:00
a_bennassar
80e20f3cf1 Merge pull request #658 from hermeznetwork/feature/update-sql-func
Add account_state view
2021-03-22 16:37:46 +01:00
arnaucube
d9741da43b Add API versioning 2021-03-22 16:33:38 +01:00
Eduard S
8c51cfb3d2 Add minimum documentation of serveapi command 2021-03-22 15:41:35 +01:00
laisolizq
7b297c77da Add account_state view 2021-03-22 14:43:24 +01:00
Pantani
9a863eadc4 add AGPLv3 License 2021-03-22 09:26:58 -03:00
Eduard S
d80e3a8988 Merge pull request #648 from hermeznetwork/feature/txsel-forgablepriority
Update TxSel selection to prioritize the forgable
2021-03-22 13:14:53 +01:00
arnaucube
2873ce875a Update TxSel selection to prioritize the forgable
Previous to this commit, there were cases where being
len(nonForgableL2Txs)>maxL2Txs and nonForgableL2Txs have bigger fee than
forgableL2Txs, the forgableTxs where never forged, neither the
nonForgableTxs.  Now, the TxSelector first forges the forgableTxs (which
are forgable for the initial state of the accounts (balances & nonces),
and then the nonForgableL2Txs, which may be unblocked once the forgable
ones have been processed.
2021-03-22 13:03:47 +01:00
Eduard S
10cfc91250 Merge pull request #651 from hermeznetwork/feature/total-txs-in-pool
API change names and add poolLoad, add maxFeeUSD
2021-03-22 11:59:09 +01:00
Eduard S
f6765f82bf Merge pull request #654 from hermeznetwork/feature/api-pending-l1s
Add pending L1 txs to API
2021-03-22 11:58:48 +01:00
arnaubennassar
90126a03a2 API change names and add poolLoad, add maxFeeUSD 2021-03-22 11:52:23 +01:00
arnaubennassar
3fcec947b4 Add pending L1 txs to API 2021-03-22 11:50:37 +01:00
Pantani
dc198c35ae fix import key command into the example script 2021-03-19 22:44:51 -03:00
Pantani
ae0858df3d fix the serve api flags 2021-03-18 12:02:18 -03:00
arnau
334eecc99e Merge pull request #645 from hermeznetwork/feature/newpolicy
Add config parameter  ForgeOncePerSlotIfTxs
2021-03-18 14:02:53 +01:00
arnau
b01d5d50ee Merge pull request #633 from hermeznetwork/feature/makefile
Create a Makefile for build using -ldflags and useful commands
2021-03-18 13:36:51 +01:00
a_bennassar
8018f348a7 Merge pull request #649 from hermeznetwork/feature/dbbigintsdecimal
Store *big.Int as DECIMAL in sql
2021-03-18 13:25:43 +01:00