Commit Graph

596 Commits

Author SHA1 Message Date
Sergi Delgado Segura
1b2581be65 Adds README to cli 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
00a2137d5b Improves pisa-cli
Big refactor of the cli, includes proper help messages and get_appointment command. Also creates a separate folder for the cli (apps can be separated by folders).
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
2d77919af4 Updates get_appointment status messages and small changes 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
74ecf0ab54 Add temporary monitoring tools for pisa
Add endpoint and logic so appointment can be queried to pisa. A better implementation based on persistent storage (i.e. DB) should replace it in the future
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
44d1647b06 Adds JSONRPC exceptions to can_connect 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
b29d417a62 Improves cli commands and usage message 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
c1b2dee1e1 Changes default port
Current default port is 9814, which represents the white chess tower in ASCII
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
1028a94f64 Updates inspector checks related to dispute_delta.
dispute_delta and start_time/end_time are two different kind of time constrains, they were mixed up.
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
5a1d7911f3 Adds support for command line api host and port.
Defaults to __init__ parameters if missing
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
0c1ce056eb Adds sanity checks to make sure pisad and bitcoind are configured in the same way 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
13f21d64e8 fixes log record + todos 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
7aeca49db2 simplifies the handle_reorg logic 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
47939a9e3b Adds todo 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
8561288726 adds requests to requirements 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
a1d2f440d3 updates gitignore 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
b5009fcf9a Fixes typo: cyphers -> ciphers 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
7b511144c8 addapts tests to work with the new locator type 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
9a3628a8da Addaps pisa to work with the new key/encryption. Also fixes some discovered bugs
The number of confirmations stopped counting from 6+ due to a legacy part of the code. The JSONRPC error format changed with the new version and was not updated.
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
dd3dee5b7a Replaces KDF
Uses H(txid) for locator and H(txid|txid) for master_key now
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
c7ba4fb423 Fixes appointment json fields 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
b4fca13fd5 Defines tests for the inspector 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
ea0fc31398 Defines a proper inspector 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
a722065cdd Moves some of the params to the sample conf file 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
db263cf9b9 Some small refactors 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
531f2104c9 refactors rpc_errors and defines internal errors 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
72def85ec9 Fixes typo 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
5701a5bda5 Further tests and fixes bugs 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
e417ed0e8f Adds custom authproxy from bitcoin rpc from Bitcoin Core to deal with broken pipes 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
9aea751307 Fixes several bugs related with the encrypted blob
Uses a proper KDF to extend the LSB of the txid (HKDF). Standardizes the representation of the keys / hashes in both sides (encrypt/decrypt deals with bytes now instead of string). Adds further logging.
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
552a3622ac Removes old decrypt placeholder 2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
8bac78cf41 Update logging levels 2019-08-09 15:00:02 +01:00
Sergi Delgado
78b49c4109 Add some todos and cleans up some comments and old todos 2019-08-09 15:00:02 +01:00
Sergi Delgado
bc5cc2923d Removes unnecessary print 2019-08-09 15:00:02 +01:00
Sergi Delgado
f0f7f0b1ab Fixes severals bugs after testing
Basic case is working now
2019-08-09 15:00:02 +01:00
Sergi Delgado Segura
fb2bf05057 Adds blob encryption on both sides 2019-08-09 15:00:02 +01:00
Sergi Delgado
40cdcfa913 Working on integration with client and responder testing 2019-08-09 15:00:02 +01:00
Sergi Delgado
dea4a78edc Builds responder
Builds responder and adapts the rest of classes to integrate with it. Code has not been tested yet.
2019-08-09 15:00:02 +01:00
Sergi Delgado
90a1dc70e8 Separates back watcher and zmq subscriber
Separates the logic of the watcher from the subscriber for two reasons:\n - First, we should abstract the subscriber as an entity that handles the underlaying bitcoin client and feeds parsed data to pipeline that the watcher can read from. That way we can have different types of subscriber (not necessarily based on zmq).\n - Secondly, the responder will need to also receive data from the subscriber (as a different instance) to keep track of the state of the response.
2019-08-09 15:00:02 +01:00
Sergi Delgado
61bded5a23 Finishes basic watcher logic
The watcher can get appointments (containing only the locator) and find them in new generated blocks. Decryption and communication with the responder is still missing
2019-08-09 15:00:02 +01:00
Sergi Delgado
85c620b9a1 Adds dummy inspector 2019-08-09 15:00:02 +01:00
Sergi Delgado
b4d058fc62 Updates cli and api accordingly 2019-08-09 15:00:02 +01:00
Sergi Delgado
d34b94a858 Adds proper logging format 2019-08-09 15:00:02 +01:00
Sergi Delgado
8aba0f7daf Comments and sleep -> asleep 2019-08-09 15:00:02 +01:00
Sergi Delgado
803712e9b1 Improves on watcher logic.
Improves the dummy watcher logic. Sets a proper structure. Watcher can now check for potential matches and handle multiple appointments with the same locator (hash collisions).
2019-08-09 15:00:02 +01:00
Sergi Delgado
21eed576b2 Refactors tx_watcher and zmq_subscriber
Merges tx_watcher and zmq_subscriber into a single file: watcher. Watcher will handle all the watching process and container two inner classes, the watcher and the ZMQHandler
2019-08-09 15:00:02 +01:00
Sergi Delgado
39a9a92bdb pisa-btc initial commit
Contains basic structure, zmq so subscribe to blockid messages, api and so on. Still WIP
2019-08-09 15:00:02 +01:00