Commit graph

429 commits

Author SHA1 Message Date
Sergi Delgado Segura
583d3ad7b6
Adds Responder and works on Watcher::do_watch 2021-07-21 13:00:46 +02:00
Sergi Delgado Segura
0d3642c024
Adds Watcher.get_appointment 2021-07-20 11:43:10 +02:00
Sergi Delgado Segura
207bac10bd
Rearranges imports and removes unused ones 2021-07-19 10:16:13 +02:00
Sergi Delgado Segura
a5315337d5
Fix matches! macro for existing tests 2021-07-16 16:03:24 +02:00
Sergi Delgado Segura
cec6eae310
Adds more logic to add_appointment 2021-07-16 16:03:18 +02:00
Sergi Delgado Segura
4430d53040
Adds basic add_appointment and tests 2021-07-14 17:15:49 +02:00
Sergi Delgado Segura
b4380b012d
Updates UUID, fixes ExtendedAppointment fields
UUIDS are 20-bytes long (output of RIPEMD160) so we  don't need to use any external UUID library.

ExtendedAppointment had some outdated fields types that needed updating
2021-07-14 17:15:12 +02:00
Sergi Delgado Segura
deff570568
Merges RegisterReceipt implementations and adds AppointmentReceipt 2021-07-14 17:08:48 +02:00
Sergi Delgado Segura
e395981c12
Adds serde to UserId 2021-07-14 17:07:49 +02:00
Sergi Delgado Segura
d36b56c119
Adds Watcher::register
`register` requires the `Watcher` to have a `Gatekeeper` and a `SecretKey`.

Updates the constructor and the tests accordingly.
2021-07-12 16:53:14 +02:00
Sergi Delgado Segura
863bdbd734
Moves UserId to common, updates Gatekeeper::add_update_user
`Gatekeeper::add_update_user` now returns a `RegistrationReceipt`.

Tests are updated accordingly
2021-07-12 16:52:26 +02:00
Sergi Delgado Segura
8762c264b8
Adds RegistrationReceipts 2021-07-12 16:50:43 +02:00
Sergi Delgado Segura
a2009edc80
Fixes ExtendedAppointment tests 2021-07-12 16:48:16 +02:00
Sergi Delgado Segura
41696f74bc
Completes Gatekeeper functionality and adds tests
WIP: Adds more methods and tests to the Gatekeeper
2021-07-07 17:23:46 +02:00
Sergi Delgado Segura
837d28d3ff
Gets rid of BlockProcessor in favor of ChanPoller
The ChainPoller has most of the functionality the BlockProcessor user to have, and the missing one can be achieved storing the last known block header.

This simplifies the design and the interaction with bitcoind.
2021-07-07 17:23:31 +02:00
Sergi Delgado Segura
e271d91cf4
Adds basic Gatekeeper 2021-07-07 17:23:15 +02:00
Sergi Delgado Segura
d34f22d0dd
WIP: Improves tests 2021-07-01 11:24:40 +02:00
Sergi Delgado Segura
fab97a051c
WIP: Working on porting a basic Watcher 2021-06-30 16:22:26 +02:00
Sergi Delgado Segura
1d6277a452
Simplifies crptography tests and addresses fixmes 2021-06-30 15:40:12 +02:00
Sergi Delgado Segura
73d2681b28
Adds basic cryptography primitives
Adds CHACHA20POLY1305 ENC/DEC and sign/verify/recover_pk based on lightning::util::message_signing
2021-06-29 18:03:13 +02:00
Sergi Delgado Segura
b99f79c3df
Fixes ChainMonitor to cover ChainTip:Worse cases
ChainTip::Worse can happen if the chainwork of the new block is actually lower, or if the work is the same but the parent differs. Cover both cases since the later is important.
2021-06-21 13:15:47 +02:00
Sergi Delgado Segura
e58d48d95e
Adds basic watching logic 2021-06-21 11:32:55 +02:00
Sergi Delgado Segura
f0298c00f6
Passes ChainPoller to Watcher instead of BitcoindClient, starts working on tests 2021-06-17 12:42:17 +02:00
Sergi Delgado Segura
118c546ea5
Starts working on the Watcher, adds a basic LocatorCache 2021-06-16 16:47:34 +02:00
Sergi Delgado Segura
d6d7af27a4
Adds Locator as a type to (Extended)Appointment 2021-06-16 16:47:01 +02:00
Sergi Delgado Segura
fafb9be250
Adds a basic BlockProcessor 2021-06-14 15:40:19 +02:00
Sergi Delgado Segura
29edc143dd
Implements BlockSource for BitcoindClient and simplifies code using the trait
Refactors the code so we can use the `BlockSource` and `Validate` traits from `lightning_block_sync`, in that way the whole polling process does not have to be re-implemented.
2021-06-14 15:39:58 +02:00
Sergi Delgado Segura
aeb2e206d8
Adds workspace for teos and teos-common
Also includes Appointment and ExtendedAppointment
2021-06-04 15:50:07 +02:00
Sergi Delgado Segura
79fc2d37e8
Adds basic bitcoin-cli and ChainMonitor 2021-06-01 11:48:10 +02:00