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
Sergi Delgado Segura
e81ccd39a1
Adds API unit tests and modifies bitcoin_sim to be fixture compatible
...
- Adds unit tests for API
- Updates API to let BlockProcessor deal with block block related JSON-RPC
- Fixes BlockProcessor get_potential_matches return
- Makes bitcoin_sim runnable via function (instead of a main runnable script) to work with pytests fixture
- <3 Fixture
2019-10-08 18:55:27 +01:00
Sergi Delgado Segura
8403f871ca
Adds EncryptedBlob unittests
2019-10-07 16:56:55 +01:00
Sergi Delgado Segura
88532f7345
Changes derypt key input type and return
...
The input types for Blob.encrypt and EncryptedBlob.decrypt were not consistent. The former was in hex whereas the later was in bytes. Format the later in hex for consistency.
2019-10-07 16:47:54 +01:00
Sergi Delgado Segura
d2a07d6519
More clean up
2019-10-07 15:36:58 +01:00
Sergi Delgado Segura
4be506412e
Adds Inspector unittests. Fixes some related bugs.
2019-10-07 15:19:34 +01:00
Sergi Delgado Segura
23efd48796
Fixes logging bug introduced in 93e23e7
...
When cleaning up code in commit 93e23e7 a condition was removed that makes the inspector log empty data.
2019-10-07 11:47:21 +01:00
Sergi Delgado Segura
1e18630ce2
Adds Cleaner tests. Fixes Cleaner, Watcher and Responder
...
There is no need to return the dictionaries modified by the client since they are "passed-by-reference" in Python.
2019-10-04 17:23:45 +01:00
Sergi Delgado Segura
4704462502
Increases responder modularity
...
The responder had way too complex functions. Separate them into smaller / more specific ones to increse modularity and code reuse.
2019-10-04 13:52:51 +01:00
Sergi Delgado Segura
3ed9ccd466
Adds additional functionality that will be needed when deploying data persistence
2019-10-04 13:50:43 +01:00
Sergi Delgado Segura
9a37b211a0
Adds Carrier to take care of sending/getting transactions
2019-10-04 13:49:48 +01:00
Sergi Delgado Segura
3e0cca14d7
Clean up + higher modular design
2019-10-03 11:49:49 +01:00
Sergi Delgado Segura
5ba6fcb9ef
Improves modularity of the code
...
Adds cleaner and block processor to increase the modularity and reuse of the code
2019-10-03 11:49:24 +01:00
Sergi Delgado Segura
e9832e4408
More clean up
2019-10-03 11:47:07 +01:00