Commit Graph

580 Commits

Author SHA1 Message Date
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