Salvatore Ingala
8b46c2f496
Merge branch 'testing' into 13-appointment-signature
2019-10-22 12:14:02 +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
Sergi Delgado Segura
71ce7c46ec
Removes the parameters for do_subscribe + PEP8
2019-10-21 16:54:48 +01:00
Sergi Delgado Segura
e5013d5bca
Dissables Flask logging
2019-10-21 16:53:29 +01:00
Salvatore Ingala
e71c014535
Sorting keys and removing whitespaces in Appointment.to_json
2019-10-21 11:07:58 +08:00
Salvatore Ingala
8b7597b909
typo
2019-10-18 15:59:23 +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
50d53e0960
Converted response format of add_appointment to json
2019-10-18 10:22:04 +08:00
Salvatore Ingala
f4bfd5ef40
Merge branch 'testing' into 13-appointment-signature
2019-10-18 08:32:38 +08:00
Sergi Delgado Segura
c09becd7fa
Fixes to_dict/to_json for and some fixes
2019-10-17 19:11:32 +01:00
Sergi Delgado Segura
95759793ba
Fixes bitcoin_cli
...
bitcoin_cli as a global variable in the main __init__.py was creating issues related to http.client.CannotSendRequest: Request-sent and connection re-usage. Define a new connection per request.
2019-10-17 17:17:52 +01:00
Salvatore Ingala
db522500c3
Switched to cryptography instead of ecdsa for signatures
2019-10-17 17:02:09 +08:00
Salvatore Ingala
edd04c23ea
non-zero exit code on error
2019-10-17 12:10:38 +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
41453bd271
Updated sample_conf
2019-10-17 09:59:35 +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
Sergi Delgado Segura
d7c89ddc91
Modifies behaviour towards a failed EncryptedBlob decrpytion
...
The decryption for the `EncryptedBlob` using AES-GCM-128 (the only cipher available atm) raises an `InvalidTag` exception. This was not properly captured by the watcher making it crash. This behavior was already discovered during the `EncryptedBlob` unit testing and left to be fixed in the `Watcher` unit testing.
However, making the EncryptedBlob raise such an exception may not be a good practice, since other ciphers may run into different exceptions. Therefore, the `EncryptedBlob` has been modified to return None upon facing a decryption issue, the `BlockProcessor` will detect that and return a None justice_txm and justice_txid. Upon receiving a None `justice_txid` the `Watcher` will delete the appointment without notifiying the `Responder`.
2019-10-14 16:57:46 +01:00
Sergi Delgado Segura
d35b9c13c4
Fixes responder missing_confirmation dict access
2019-10-14 13:00:49 +01:00
Sergi Delgado Segura
6baa059431
Adds additional unit tests to tools
2019-10-11 20:54:31 +01:00
Sergi Delgado Segura
98c27f6013
Adds basic unit tests for the Carrier
...
Further testing is required for this one.
2019-10-11 19:51:50 +01:00
Sergi Delgado Segura
a916c67cc5
Fixes error logging
2019-10-11 19:32:44 +01:00
Sergi Delgado Segura
b78c6ebfe7
Removes debug flags from old code
2019-10-11 19:07:46 +01:00
Salvatore Ingala
8acff789fe
Add reference to github issue for the Todo
2019-10-11 11:27:03 +07:00
Salvatore Ingala
6348319dfb
Using logging instead of print; added startup log message
2019-10-11 09:26:29 +07:00
Salvatore Ingala
99f3400d63
Added SIGTERM and SIGQUIT
2019-10-10 22:37:06 +07:00
Salvatore Ingala
9603138777
Added SIGINT signal handler
2019-10-10 22:25:20 +07:00
Sergi Delgado Segura
15c78072c9
Cleans comments + added method in generic exceptions
...
tx rejection comments moved to #37
2019-10-10 16:22:46 +01:00
Sergi Delgado Segura
6b058dfaf9
Fixes a couple of bugs from the last merge
2019-10-10 13:01:21 +01:00
Salvatore Ingala
8c2c893c5c
Merge branch 'testing' into 21-json-logs
2019-10-10 18:49:06 +07:00
Salvatore Ingala
d05c2c21b7
warn ==> warning
2019-10-10 18:39:54 +07:00
Sergi Delgado Segura
eb2734ccfe
Improves carrier
...
- Takes receipt out of Carrier
- Adds missing cases (implementation missing)
- Adds notes on what to check
2019-10-10 12:34:18 +01:00
Salvatore Ingala
9f25ef8603
Fixes from PR review
2019-10-10 18:22:33 +07:00
Salvatore Ingala
aea1d1f1e0
Fixes from PR review
2019-10-10 11:07:58 +07:00
Salvatore Ingala
dee93e5c62
Moved StructuredMessage and Logger to separate file; refactored pisa-cli logging using new format
2019-10-10 09:59:11 +07:00
Salvatore Ingala
c524319027
Several fixes and improvements
2019-10-10 09:59:11 +07:00
Salvatore Ingala
a53e7a82e3
Added 'actor' among the fields of the structured log messages; minor other fixes
2019-10-10 09:59:10 +07:00
Salvatore Ingala
4bcc8e20a0
Refactored check_tx_in_chain with new log format
2019-10-10 09:59:10 +07:00
Salvatore Ingala
bae9b6b913
Added Logger class; refactored logging accordingly
2019-10-10 09:59:10 +07:00
Salvatore Ingala
7f9c7d8609
Removed double initialization of logging
2019-10-10 09:58:28 +07:00
Salvatore Ingala
2a5dd48950
PEP8 linting
2019-10-10 09:58:27 +07:00
Salvatore Ingala
ed0cb4f632
Changed log format to JSON; fixed missing return value in get_potential_matches
2019-10-10 09:58:27 +07:00
Sergi Delgado Segura
8b62ff9e56
Update some comments/todos/discuss
2019-10-09 17:38:15 +01:00
Sergi Delgado Segura
b69ffdc0aa
Adds some BlockProcessor unit tests.
...
The three last methods are missing, since they seem not to belong there (check #36 )
2019-10-09 17:34:32 +01:00
Sergi Delgado Segura
ab72c71039
Adds appointment unit test
2019-10-09 15:19:33 +01:00
Sergi Delgado Segura
ecadbc62ef
Adds _eq_ method to EncryptedBlob
2019-10-09 15:19:03 +01:00