Sergi Delgado Segura
837f7d428a
watcher - Fixes cache setup for regtest
...
Cache setup in regtest was raising some warnings due to the blocks not being found
2020-06-02 20:05:03 +02:00
Sergi Delgado Segura
5af0658720
watcher - Adds reorg protection for the LocatorCache
2020-05-22 19:57:20 +02:00
Sergi Delgado Segura
77d1ea21c8
teos - BLOCK_CACHE_SIZE -> LOCATOR_CACHE_SIZE
2020-05-22 19:56:11 +02:00
Sergi Delgado Segura
76e4780f4c
teos - Adds start_block to add_appointment response
2020-05-21 19:39:42 +02:00
Sergi Delgado Segura
708f2e1f3b
teos - Changes the behavior for updates of already triggered appointments
...
If an update for an already triggered appointment is received, it will be drop no matter if the locator is in the cache or not. This tries to prevent inconsistencies between the Watcher and the Responder, specially in the case of a reorg when data may have to flow backwards.
2020-05-21 19:37:33 +02:00
Sergi Delgado Segura
17128edada
teos - Renames get_locator to check_locator, adds LocatorCache.init and docstrings
2020-05-21 16:40:36 +02:00
Sergi Delgado Segura
699da54aa0
teos - Adds LocatorCache
2020-05-19 18:24:40 +02:00
Sergi Delgado Segura
9c10f7964f
teosd- First bits of locator cache
2020-05-18 20:40:17 +02:00
Sergi Delgado Segura
d5dc833bf5
datadir and apibind were not properly working
2020-05-08 19:43:56 +02:00
Sergi Delgado Segura
390dc3e090
teos - adds log line with tower id
2020-04-29 13:04:02 +02:00
Sergi Delgado Segura
88c19d5a0d
teos - moves errors to common so it can be used by clients
2020-04-29 13:03:39 +02:00
Sergi Delgado Segura
75ca281cc4
api - updates errors and separates error from message in api errors responses
2020-04-27 19:51:38 +02:00
Sergi Delgado Segura
8918f15b62
gatekeeper - stores user_info in db after adding appointment (it was missing)
2020-04-27 19:51:38 +02:00
Sergi Delgado Segura
a8b9697a38
teosd - handles AppointmentDBM exceptions
...
AppointmentDBM creation was outside the main try/except, so exception were not properly handled
2020-04-23 12:38:07 +02:00
Sergi Delgado Segura
f810607348
responder - wipes completed/expired data from the gatekeeper
2020-04-22 14:55:43 +02:00
Sergi Delgado Segura
e7141b295e
watcher - wipes completed/expired appointments from the Gatekeeper
2020-04-22 14:55:10 +02:00
Sergi Delgado Segura
f66e4785f2
cleaner - adds delete_gatekeeper_appointments
...
delete_gatekeeper_appointments takes care of deleting data from the Gatekeeper once it has expired / it has been completed
2020-04-22 14:53:58 +02:00
Sergi Delgado Segura
69e9c12258
gatekeeper reformats update_available_slots to add_update_appointment
...
- add_update_appointment handles the slot count and also keeps a copy of the appointment uuid and slots taken.
- gatekeeper.appointments is turned to a dict uuid:slots so appointment updates can be computed with no further data
- deleting appointment will also allow to update the slot count with no further data from both the Watcher and the Responder
2020-04-22 14:50:13 +02:00
Sergi Delgado Segura
eb6d292d3c
extended_appointment - deletes appointment size
2020-04-22 14:48:00 +02:00
Sergi Delgado Segura
5f7a909804
user_pk/client_pk -> user_id and cli/client -> user (when it does not reffer to the software)
2020-04-21 19:05:20 +02:00
Sergi Delgado Segura
0e5a99b778
Fixes potential runtime errors for dictionaries changing size
2020-04-21 13:40:43 +02:00
Sergi Delgado Segura
96cb8d4afd
Adds user_id to ExtendedAppointment after authentication
...
The ExtendedAppointment is passed to the Watcher without user_id, since the user is not yet authenticated.
The Watcher has to add the user_id to the ExtendedAppointment after the user is authenticated.
2020-04-20 17:59:57 +02:00
Sergi Delgado Segura
6ef6e68e18
Adds Responder.get_summary. Fixes bug on Responder.get_expired_trackers
2020-04-20 17:59:56 +02:00
Sergi Delgado Segura
797cb9786e
Adds new gatekeeper tests
2020-04-20 17:59:47 +02:00
Sergi Delgado Segura
66dce42526
Adds get_summary to extended appointment
...
The Watcher used to create the summary, but that was not modular enough and introduced issues when testing
2020-04-20 17:58:41 +02:00
Sergi Delgado Segura
2e6095971d
Improves docstrings
2020-04-20 17:58:41 +02:00
Sergi Delgado Segura
eea12a695e
Improves API returns for 404 and extends tests to cover it
2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
8fad4d79cc
Small fixes and docs
2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
a9b255e267
Removes gatekeeper from API
2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
8e3caadc5c
Adds ExtendedAppointent unit tests and simplifies Appointment's
2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
3f15459f2c
Creates ExtendedAppointment as an appointment with user information
2020-04-20 17:58:16 +02:00
Sergi Delgado Segura
86e97e37bf
Removes start/end time from appointment
2020-04-20 17:56:58 +02:00
Sergi Delgado Segura
9cbd9ed18a
Adds end time to the user (subscription) information. It will replace the appointment one.
2020-04-20 17:56:58 +02:00
Sergi Delgado Segura
a1a87ba9da
Can't -> cannot
2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
08701f0fee
Refactors Cryptographer to remove logs and avoid multi return types
...
Cryptographer now uses exceptions to report errors and does not use the log anymore
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
71507d4c32
Gets rid of blob classes. Close #66
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
ed8ff228d8
First commands with basic structure.
...
- Moves DBManager to common.
2020-04-20 17:30:15 +02:00
Sergi Delgado Segura
472efd847b
Typos
2020-04-20 17:01:55 +02:00
Sergi Delgado Segura
bed21e9625
Adds API HOST and PORT as configurable parameters.
...
Uses API_BIND/API_PORT for the server and API_CONNECT/API_PORT for the user, for consistency.
2020-04-20 17:01:55 +02:00
Sergi Delgado Segura
630c3f6e0c
Fixes last known block initialization on Watcher
2020-04-07 11:40:44 +02:00
Sergi Delgado Segura
75eebf80cd
Adds last_known_block to Watcher and stores last block on db on fresh bootstrap Watcher and Responder
2020-04-07 11:40:44 +02:00
Sergi Delgado Segura
10e856ae74
Fixes typos according to the review
2020-04-03 16:38:46 +02:00
Sergi Delgado Segura
fe73ee7298
Fixes comments, docstrings and some renamings
2020-04-02 15:20:09 +02:00
Sergi Delgado Segura
099ec5d1ce
PEP8 fixes
2020-04-02 10:02:50 +02:00
Sergi Delgado Segura
9a29e59781
Adds additional checks to DBManagers (Appointments and Users)
2020-04-01 21:30:18 +02:00
Sergi Delgado Segura
3009bb83ba
Addaps api and daemon to use userDB
2020-04-01 18:26:36 +02:00
Sergi Delgado Segura
a46bab6b20
Adds user database and modifies registered_user content to be a dict instead of an int
...
Future additional data may be stored, so it's better if we store it as something that can hold it
2020-04-01 18:25:14 +02:00
Sergi Delgado Segura
7031b552f7
Splits DBManager in parent and child classes so a UserDBManager can be implemented
...
- DBManager preserves the basic methods, while the appointment related ones have been moved to AppointmentDBM.
- AppointmentDBM handles json loads and dumps for appointments and trackers, so the corresponding methods can be removed from their classes.
- Updates docs.
2020-04-01 17:18:37 +02:00
Sergi Delgado Segura
2d67fe8638
rpc_passwd -> rpc_password. The former can be confusing since the bitcoind parameter is rpcpassword. Avoiding that.
2020-04-01 11:14:20 +02:00
Sergi Delgado Segura
502f507b21
Adds missing size field in Builder when loading data from the database
2020-03-31 15:00:30 +02:00