Sergi Delgado Segura
74a9dad071
Updates Watcher to use new Cleaner functions and reformats filter_valid_breaches to return a list of valid and invalid breaches.
2020-01-21 19:11:15 +01:00
Sergi Delgado Segura
a49f86dd88
Merge branch 'master' into 64-data-to-disk
2020-01-15 12:44:29 +01:00
Sergi Delgado Segura
42a957f555
Merge branch 'master' into chainmonitor
2020-01-15 11:38:32 +01:00
Sergi Delgado Segura
6bf2cb5379
Merge branch 'master' into isolate-config
2020-01-15 10:15:48 +01:00
Turtle
40d7ca1912
Refactor add_appointment cli code
2020-01-15 03:35:31 -05:00
Turtle
7aa74d5953
Move config options used by watcher and responder to the constructor
2020-01-13 02:23:02 -05:00
Sergi Delgado Segura
5196f5df29
Removes most appointment data from memory
...
Data used to be stored both in memory and disk (db). This commits modifies the Watcher, Responder and Cleaner so they only keep the needed maps and load information from disk when necessary.
2020-01-09 18:18:26 +01:00
Sergi Delgado Segura
e5514cefce
Updates old docs/comments regarding zmq
2020-01-06 12:27:02 +01:00
Sergi Delgado Segura
c594018dce
Bug fix: Properly initializes Responder
2020-01-03 11:37:26 +01:00
Sergi Delgado Segura
8fab59975f
Adds basic ChainMonitor to the system
...
ChainMonitor is the actor in charge of checking new blocks. It improves from the previous zmq_subscriber by also doing polling and, therefore, making sure that no blocks are missed.
Documentation and tests are still required. Partially covers #31
2020-01-02 16:15:27 +01:00
Sergi Delgado Segura
5c585a7a02
Refactors code to use appointment from common based on f4a1e34e2f4d75226c7e313b83ff5ae06c8c89ca
2019-12-17 16:22:23 +01:00
Sergi Delgado Segura
1184b4648a
Fixes logs and removes redundant tailing dots
2019-12-16 19:45:30 +01:00
Sergi Delgado Segura
77b191dde2
Moves Logger to common
2019-12-16 14:15:30 +01:00
Sergi Delgado Segura
2f67ecfa6e
Changes sk_path to sk_der in Watcher
...
The Watcher used to receive a secret key file path ion the __init__ to load a secret key for signing. That made testing the Watcher hard, since the file needed to be present. Changing it so the main (pisad) loads the file from disk and passes the data the Watcher on init.
2019-12-16 10:54:13 +01:00
Sergi Delgado Segura
63488cb69e
Fixes wrong identation in Watcher
2019-12-13 19:44:19 +01:00
Sergi Delgado Segura
e2ca226b11
Last formatting details troughout the codebase
2019-12-13 18:13:29 +01:00
Sergi Delgado Segura
008a71da3a
Renames matches to breaches to be consistent with the Responder. Also adds docstrings
2019-12-13 18:13:29 +01:00
Sergi Delgado Segura
d881706eb3
Refactors the codebase to match the new naming from 793d563b8c053136dd5f936b0ef0cd88af215b06 and 3046eae38ee3f34857c96e6b9d43e645f7d2de2d
2019-12-13 18:13:29 +01:00
Sergi Delgado Segura
df5dcbdfe9
Renames dispute_delta to to_self_delay and justice tx to penalty tx
...
Uses the naming convention followed by LN implementations and BOLTs
2019-12-11 12:45:05 +01:00
Sergi Delgado Segura
2cdd78b8e6
Simplifies the Cleaner and adds docstrings
...
We were passing some unnecessary parameters to the Cleaner (locator) that could be derived from other data (uuid and appointments). Also standarises the order of the parameters to match the rest of the methods
2019-12-10 13:31:42 +01:00
Sergi Delgado Segura
d39056a0cc
Refactors signing/verifiying functionality to be part of the Cryptographer
...
- All encryption/decryption and signing/verifying calls are performed by the cryptographer now.
- The current signature format is temporal. We should define something not base on json.
- Some Cryptographer tests are still missing.
- The cli tests should be modified to fit this too.
2019-12-07 13:22:39 +01:00
Sergi Delgado Segura
a8800ac375
Integrates encryption/decryption within the Cryptographer. Close #63
...
Includes unittests. Also reformats test_inspector to avoid using cli functions
2019-12-06 13:23:02 +01:00
Sergi Delgado Segura
bd08b151df
Replaces locator with common/constants value
2019-12-05 11:03:36 +01:00
Sergi Delgado Segura
f0150ce585
Removes hash/cipher configuration and changes AESGCM128 for CHACHA20POLY1305
...
Updates tests accordingly
2019-12-04 17:46:07 +01:00
Sergi Delgado Segura
3c6f13ef00
Rename delete_completed_appointments and rearange arguments
2019-11-11 13:27:57 +00:00
Sergi Delgado Segura
4233c9d5cc
Refactor get_matches and filter_valid_matches to not be static
2019-11-08 18:21:42 +00:00
Sergi Delgado Segura
20faa04c4c
Refactord Watcher and BlockProcessor. Closes #36 .
...
Brings back check_potential_matches and check_matches to the Watcher.
The methods have now been renamed to check_matches (old check_potential_matches) and filter_valid_matches (old check_matches) to provide a better description of their purpose.
decode_raw_transaction has been added to BlockProcessor
2019-11-08 16:25:35 +00:00
Sergi Delgado Segura
8b2f0efa2f
Moves appointment deletion + db update to the cleaner
2019-11-07 19:16:05 +00:00
Sergi Delgado Segura
20f296c9d4
Reformats code to match code guidelines
2019-11-07 15:47:35 +00:00
Sergi Delgado Segura
e6e577c99e
Updates Watcher to use serialize instead of to_json
2019-11-07 15:08:05 +00:00
Sergi Delgado Segura
31afb1373a
Integrates the locator map dumping to the Watcher and Cleaner
2019-11-06 17:08:42 +00:00
Sergi Delgado Segura
8ad3ae5f1d
Initializes block_queue on init
...
Building from backed up data may require initializing the block queues of both the watcher and responder with the blocks they've missed.
2019-10-30 12:20:42 -07:00
Sergi Delgado Segura
ddcbc6a6de
Fixes log level
2019-10-29 15:20:32 -07:00
Sergi Delgado Segura
bc7c7dc26f
Fixes based on DBManager unit tests
2019-10-29 14:52:27 -07:00
Sergi Delgado Segura
f61474216c
Fixes and tests updates
...
Updates tests so they run with the db_manager and fixes some bugs introduced in d7d42c9.
2019-10-28 14:49:40 -07:00
Sergi Delgado Segura
cf61e6e265
Reports the block hash to the responder on adding response
...
The responder can use the block hash to figure out whether or not he is on sync
2019-10-28 14:40:44 -07:00
Sergi Delgado Segura
a0538739d2
Starts data persistence integration
...
The difference between master and the old data-persistence branch was huge, seems more effective to manually cherry pick the changes and integrate them
2019-10-28 14:38:50 -07:00
Salvatore Ingala
21b54f048e
Refactored error handling in add_appointment; minor comments from PR review
2019-10-25 14:51:15 +08:00
Salvatore Ingala
a19bfa13ff
Separated signing logic of the Watcher in sign_appointment function; added unit test
2019-10-24 12:19:33 +08:00
Salvatore Ingala
9b1af92fc3
Minor fixes
2019-10-22 18:59:27 +08:00
Salvatore Ingala
1601f0ca15
Renamed constants and default file names for Pisa's private and public keys
2019-10-22 12:13:12 +08:00
Salvatore Ingala
ca64b59277
Added signature verification to pisa_cli
2019-10-18 14:56:59 +08:00
Salvatore Ingala
414a4638bd
Added signature verification to watcher's add_appointment test
2019-10-18 12:37:06 +08:00
Salvatore Ingala
db522500c3
Switched to cryptography instead of ecdsa for signatures
2019-10-17 17:02:09 +08:00
Salvatore Ingala
f19c499efa
Handling errors when constructing the Watcher in pisa daemon
2019-10-17 12:08:01 +08:00
Salvatore Ingala
deaf704bc5
Removed redundant parentheses
2019-10-17 09:59:36 +08:00
Salvatore Ingala
c6db6eddb3
Using a PEM keyfile instead of a DER for the signing key
2019-10-17 09:59:34 +08:00
Salvatore Ingala
7c1d8b69c7
Changed to_json to to_dict in Appointment and Job; added to_json to Appointment to actually return a string
2019-10-17 09:59:34 +08:00
Salvatore Ingala
e4e83167b7
Made signing key optional (will only sign if given)
2019-10-17 09:59:34 +08:00
Salvatore Ingala
99db9a29ad
Added signatures to appointment
2019-10-17 09:59:29 +08:00