Arnau B
006bbf3321
Implement tx pool endpoints
2020-10-21 16:34:54 +02:00
arnaucube
265bdf23e3
Rename Transakcio to Til for a easier usage
...
Rename Transakcio to Til for a easier usage, also change til.TestContext
to til.Context, and til.NewTestContext to til.NewContext.
2020-10-21 15:17:22 +02:00
arnau
6a8b454368
Merge pull request #211 from hermeznetwork/feature/update-general
...
Feature/update general
2020-10-21 13:06:09 +02:00
Eduard S
54562c0367
Implement CalcFeeAmount, Resolve #140
2020-10-21 12:25:15 +02:00
arnau
edb466c996
Merge pull request #208 from hermeznetwork/feature/debugapi
...
Extend statedb and use prefixes, add debugapi
2020-10-21 11:39:42 +02:00
Eduard S
4d90cd9a02
Merge pull request #207 from hermeznetwork/feature/tkcio-l1queues
...
Add L1UserTxs queues system to Transakcio
2020-10-20 17:48:48 +02:00
arnaucube
e89f89102c
Add L1 Queues system for tx generation in Trnskcio
2020-10-20 17:43:57 +02:00
Eduard S
44c70dfbcb
Replace cp -r in StateDB by checkpoints, Resolve #93
2020-10-20 14:52:46 +02:00
Eduard S
88ddbbcddc
Delete tmp folders from tests, Resolve #105
2020-10-20 13:13:10 +02:00
Eduard S
96ceb014bf
Implement an eficient memory storage, Resolve #120
2020-10-20 13:13:05 +02:00
Eduard S
6afbda5302
Extend statedb and use prefixes, add debugapi
...
In statedb:
- Store all values using prefixes for keys to allow iteration
- Add methods MTGetRoot, GetAccounts
Implement debugapi, an http server with debugging endpoints:
- debugAPI.GET("sdb/batchnum", a.handleCurrentBatch)
- debugAPI.GET("sdb/mtroot", a.handleMTRoot)
- debugAPI.GET("sdb/accounts", a.handleAccounts)
- debugAPI.GET("sdb/accounts/:Idx", a.handleAccount)
2020-10-19 13:53:39 +02:00
a_bennassar
eb54162fb8
Merge pull request #204 from hermeznetwork/feature/api-gettokens
...
Add get tokens endpoint
2020-10-19 11:20:41 +02:00
laisolizq
043710112d
Add get tokens endpoint
2020-10-19 10:14:18 +02:00
Eduard S
b6ebbbaf95
Merge pull request #199 from hermeznetwork/feature/tkcio-tokenregister
...
Add transakcio Token Register instructions parser
2020-10-15 18:34:34 +02:00
arnaucube
a6006ebde7
Add transakcio Token Register instructions parser
2020-10-15 18:06:11 +02:00
a_bennassar
98255b99be
Merge pull request #200 from hermeznetwork/feature/api-gettoken
...
Add get token endpoint
2020-10-15 15:14:18 +02:00
laisolizq
63a4f3c8b6
Add get token endpoint
2020-10-15 14:25:04 +02:00
arnaucube
d7a1ba19b9
Fix PoolL2Tx.RqTxCompressedData
2020-10-14 18:30:58 +02:00
arnaucube
17ff917a20
Add transakcio coordinator tx instruction feature
...
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
2020-10-14 17:17:28 +02:00
Eduard S
250f1aa119
Merge pull request #194 from hermeznetwork/feature/txsel-noncesorting0
...
Add TxSel Nonce sort. Fix surplus from refactors
2020-10-14 11:45:46 +02:00
arnaucube
1a2f769b5d
Add TxSel Nonce sort. Fix surplus from refactors
...
- Add TxSel Nonce sort
- Fix surplus from refactors
- StateDB reuse computation of ToIdx across Synchronizer, TxSelector,
BatchBuilder
2020-10-14 11:38:40 +02:00
arnau
c145147e6e
Merge pull request #179 from hermeznetwork/feature/api-exits
...
Impl exit edpoint and refactor pagination
2020-10-14 11:16:03 +02:00
Arnau B
fe7d38843e
Impls exit endpoints and change pagination to cursor
2020-10-14 10:06:28 +02:00
arnaucube
431df55120
Add transakcio set type define, add set load [...]
...
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.
2020-10-09 20:00:43 +02:00
Arnau B
5097939b12
Avoid using pointers in common
2020-10-08 16:42:16 +02:00
Eduard S
b14495cfcc
Replace all []*Foo by []Foo in sql db return values
...
- Implement SlicePtrsToSlice and use it in all `meddler.QueryAll` sql db functions to always return []Foo instead of []*Foo
2020-10-07 17:03:39 +02:00
Eduard S
0277210c39
Extend ethclient test, implement new TxID spec
...
- Implement new TxID spec that distinguishes L1UserTx and L1CoordinatorTx
- Replace some type []*Foo by []Foo
- Fix HistoryDB & L2DB bug: in case of error, a rollback was applied and the returned error was nil
- Reorder inserts in historydb.NewHistoryDB() to follow foreign key dependencies
- Add initial synchronizer test with test.Client (for now, only tested l1UserTxs, blocks, addToken)
- Update L1UserTx event in test.Client
2020-10-07 16:41:51 +02:00
Eduard S
1a85f15d27
Fix conflicts and update dependencies of ethclient
2020-10-06 18:16:59 +02:00
a_bennassar
49366e3fa4
Feature/null refactor ( #173 )
...
* WIP: rebase
* Make nullable fields use pointers
2020-10-06 10:34:49 +02:00
Eduard S
7df9288977
Merge pull request #175 from hermeznetwork/feature/priceupdater-to-db
...
Connect price updater to historydb
2020-10-05 16:58:49 +02:00
arnaucube
3374a4754d
Add StateDB compute nonces on ProcessTx L2Tx
...
Add StateDB compute nonces on ProcessTx L2Tx, and update StateDB for
type TypeSynchronizer, TypeTxSelector, TypeBatchBuilder
2020-10-02 11:54:58 +02:00
Arnau B
f653ff8a73
Connect price updater to historydb
2020-10-02 10:13:48 +02:00
arnaucube
11c45cfc2f
Update TxProcessor L2Tx logic for case ToIdx==0
2020-10-01 10:47:44 +02:00
arnaucube
9bb4a4ec1b
Add TxID calculation & New{Layer}Tx Type
...
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.
2020-09-30 15:37:13 +02:00
a_bennassar
c6f70f3177
Feature/merge history l2 tables ( #156 )
...
* WIP rebase
* Combine both SQL DBs
* API and DB refactor
2020-09-29 18:27:07 +02:00
a_bennassar
0c9a6e3f2d
Merge pull request #150 from hermeznetwork/feature/historydb-sync2
...
Helper methods for Synchronizer and TX refactor
2020-09-23 18:22:07 +02:00
ToniRamirezM
ac677694fe
Helper methods for Synchronizer and TX refactor
2020-09-23 17:05:38 +02:00
arnaucube
06703aecad
Idx to 6 bytes (48 bits)
2020-09-22 18:01:14 +02:00
a_bennassar
c0336f485f
Merge pull request #148 from hermeznetwork/feature/txsel-l2logic
...
Add TxSelector L2Tx filtering logic
2020-09-22 15:40:40 +02:00
Eduard S
b86d21902b
Merge pull request #142 from hermeznetwork/feature/api-boilerplate
...
Add GET histroy-transactions endpoint
2020-09-22 15:39:13 +02:00
arnaucube
5d6f8cd3ec
Add TxSelector L2Tx filtering logic
2020-09-22 13:31:48 +02:00
Arnau B
85fe885265
Add GET histroy-transactions endpoint
2020-09-22 13:21:28 +02:00
arnaucube
934b6120ae
Add StateDB set & get Idx by EthAddr & BJJ methods
2020-09-21 22:02:20 +02:00
Eduard S
35a558f6c9
Merge pull request #135 from hermeznetwork/feature/synchronizer-sc
...
Smart Contracts Data Synchronization
2020-09-21 14:40:10 +02:00
Eduard S
9f83fcf520
Review synchronizer, rearange some stuff, add notes and TODOs.
2020-09-21 14:33:07 +02:00
Eduard S
d3f6da22ed
Fix sync integration with StateDB & HistoryDB
2020-09-18 12:10:39 +02:00
Arnau B
94e1f11a98
Implement L2DB
2020-09-18 10:17:51 +02:00
a_bennassar
8a21cd1b5c
Add HistoryDB SQL triggers ( #125 )
2020-09-17 11:57:42 +02:00
arnaucube
41715e47ba
TxSel integrated with L2DB, Add L1CoordTx creation
...
- GetL2TxSelection & GetL1L2TxSelection integrated with dbs
- Create L1CoordinatorTx of type CreateAccountDeposit when a L2
requires it (and the AccountCreationAuth exists)
2020-09-16 12:40:56 +02:00
arnaucube
69fe471f11
Add StateTree leafs & ExtTree data ZKI calculation
2020-09-10 17:58:08 +02:00