Sergi Delgado Segura
a49e587d7c
watcher - adds RWLocks for the LocatorCache
...
Threads should aboit reading the cache when it is being updated/fixed. The latter is specially relevant since during a reorg most of the cache may change.
2020-06-15 11:25:26 +02:00
Sergi Delgado Segura
5748c73da3
plugin - Adds start_block log after an accepted appointment
2020-06-12 12:10:57 +02:00
Sergi Delgado Segura
4c66d6c2cd
cli - Adds start_block log after an accepted appointment
2020-06-12 12:10:45 +02:00
Sergi Delgado Segura
df326465a7
watcher - Updates the LocatorCache so it is self handled
...
With the current approach the cache deals with deletion and provides getters and setters so consumers do not directly access the internals
2020-06-10 17:44:50 +02:00
Sergi Delgado Segura
2facd61f6c
teos - addresses minor comments from #149
2020-06-09 16:59:01 +02:00
Sergi Delgado Segura
08c794590c
teos - additional docs
2020-06-03 17:39:27 +02:00
Sergi Delgado Segura
6ea3e8e3ff
watcher - simplifies locator_cache and check_breach
...
locator_cache.blocks was storing a dictionary with both the locator and txid pair, when only the locators were actually necessary. Reworks the code a bit to only use locators.
check_breach was returning some values that could be worked out from the unaltered inputs.
Also fixes some comments and docs.
2020-06-03 17:23:29 +02:00
Sergi Delgado Segura
37d1bd9b12
testing - fixes e2e test utxo management
...
e2e tests where reusing utxos for transactions that where not confirmed, meaning than some times we were actually sending the same appointment over and over.
2020-06-02 20:05:13 +02:00
Sergi Delgado Segura
837f7d428a
watcher - Fixes cache setup for regtest
...
Cache setup in regtest was raising some warnings due to the blocks not being found
2020-06-02 20:05:03 +02:00
Sergi Delgado Segura
e1aab63940
tests - unit tests LocatorCache reorg protection
2020-05-22 19:57:48 +02:00
Sergi Delgado Segura
5af0658720
watcher - Adds reorg protection for the LocatorCache
2020-05-22 19:57:20 +02:00
Sergi Delgado Segura
2a52006c03
tests - Removes Wartcher from LocatorCache tests
2020-05-22 19:56:16 +02:00
Sergi Delgado Segura
77d1ea21c8
teos - BLOCK_CACHE_SIZE -> LOCATOR_CACHE_SIZE
2020-05-22 19:56:11 +02:00
Sergi Delgado Segura
c05f96b738
tests - Adds e2e tests to cover the cache
2020-05-22 18:25:08 +02:00
Sergi Delgado Segura
386642ff42
Adds checks of add_appointment returning current block
2020-05-22 14:18:37 +02:00
Sergi Delgado Segura
76e4780f4c
teos - Adds start_block to add_appointment response
2020-05-21 19:39:42 +02:00
Sergi Delgado Segura
708f2e1f3b
teos - Changes the behavior for updates of already triggered appointments
...
If an update for an already triggered appointment is received, it will be drop no matter if the locator is in the cache or not. This tries to prevent inconsistencies between the Watcher and the Responder, specially in the case of a reorg when data may have to flow backwards.
2020-05-21 19:37:33 +02:00
Sergi Delgado Segura
3228eeac6b
tests - Adds LocatorCache unittests and updates existing ones to match
2020-05-21 17:06:20 +02:00
Sergi Delgado Segura
17128edada
teos - Renames get_locator to check_locator, adds LocatorCache.init and docstrings
2020-05-21 16:40:36 +02:00
Sergi Delgado Segura
699da54aa0
teos - Adds LocatorCache
2020-05-19 18:24:40 +02:00
Sergi Delgado Segura
9c10f7964f
teosd- First bits of locator cache
2020-05-18 20:40:17 +02:00
Sergi Delgado Segura
01bf857161
Merge pull request #145 from talaia-labs/cli-readme
...
Cli readme
2020-05-08 20:11:28 +02:00
Sergi Delgado Segura
6855168e30
Merge branch 'master' into cli-readme
2020-05-08 20:02:45 +02:00
Sergi Delgado Segura
8a9e985362
Merge pull request #144 from talaia-labs/cmd_params_hotfix
...
Fixes cmd parameters edge cases
2020-05-08 20:02:33 +02:00
Sergi Delgado Segura
cdf8a94284
Merge branch 'master' into cmd_params_hotfix
2020-05-08 19:57:08 +02:00
Sergi Delgado Segura
3405490a10
cli - Updates README
2020-05-08 19:55:31 +02:00
Sergi Delgado Segura
1a8bdad3f3
Merge pull request #143 from talaia-labs/watchtower-plugin
...
Watchtower plugin
2020-05-08 19:48:54 +02:00
Sergi Delgado Segura
d5dc833bf5
datadir and apibind were not properly working
2020-05-08 19:43:56 +02:00
Sergi Delgado Segura
e91f65048d
cli - fixes cli without params
...
Cli was crashing if no param was provided
2020-05-08 19:43:56 +02:00
Sergi Delgado Segura
f2162b6add
plugin - Improves README and defaults misbehaving_proof to empty dict
2020-05-08 19:43:08 +02:00
Sergi Delgado Segura
445d4c0aca
plugin - Adds README
2020-05-07 15:10:36 +02:00
Sergi Delgado Segura
1f1fa161cf
Merge pull request #142 from talaia-labs/pypi_common
...
Adds common module to PyPi
2020-05-07 12:01:40 +02:00
Sergi Delgado Segura
a2c010b685
Adds teos-common requirements to the plugin
2020-05-07 11:43:57 +02:00
Sergi Delgado Segura
63cd55c1c6
plugin - removes unused commented line
2020-05-07 11:41:41 +02:00
Sergi Delgado Segura
07e00c2e5e
common - Adds requirements for common (added to PyPi)
2020-05-07 10:13:33 +02:00
Sergi Delgado Segura
304af4f8b9
Updates gitignore
2020-05-06 22:49:04 +02:00
Sergi Delgado Segura
0c5ad56a84
Adds common to pypi under teos-common
2020-05-06 22:48:59 +02:00
Sergi Delgado Segura
4af32a11c4
Merge pull request #141 from talaia-labs/update-readme
...
Updates readme with watchtower-plugin info
2020-05-06 19:53:31 +02:00
Sergi Delgado Segura
0044a65396
Updates readme with watchtower-plugin info
2020-05-06 19:04:53 +02:00
Sergi Delgado Segura
3d10589ea7
Merge pull request #139 from talaia-labs/watchtower-plugin
...
Watchtower plugin
2020-05-06 18:56:51 +02:00
Sergi Delgado Segura
c18abefe4b
plugin - adds getappointment tests and tests with multiple towers
2020-05-06 12:58:00 +02:00
Sergi Delgado Segura
cda13c5a04
plugin - Fixes behaviour for misbehaving towers
...
Returning made the hook to stop if a single tower was misbehaving. Fixing that.
2020-05-06 12:48:16 +02:00
Sergi Delgado Segura
69b0109ca8
plugin - Fixes log entry
2020-05-05 20:11:20 +02:00
Sergi Delgado Segura
94e36ebeda
plugin - Adds docstrings
2020-05-05 20:11:04 +02:00
Sergi Delgado Segura
bef8df8d36
plugin - fixes key generation
...
Key generation was performed using pyca/crpytography but keys were expected to be objects from coincurve. This comes from teos_cli where keys are generated beforehand and stored, and later on loaded from disk. The plugin generates keys and uses them straightaway (at least the first time), so it would fail in that case.
2020-05-05 18:46:37 +02:00
Sergi Delgado Segura
df43d30ca5
Fixes tests
2020-05-05 17:07:22 +02:00
Sergi Delgado Segura
1fae487071
plugin - Fixes log entry
2020-05-05 17:07:02 +02:00
Sergi Delgado Segura
f5c634ed14
plugin - repurpose invalid_appointments and adds misbehaving_proof
...
invalid_appointments in TowerInfo was used to stored invalid appointment responses from the tower when it was misbehaving (i.e. wrong or missing signature). However, a single item was stored since the tower is abandoned after misbehaving. data reported as invalid by the tower was not backed up.
invalid_appointments now stores the appointment rejected by the tower and reported as invalid.
misbehaving_proof stores the proof of misbehaviour by the tower (single item)
2020-05-05 17:03:31 +02:00
Sergi Delgado Segura
b650ba3c26
plugin - small changes
2020-05-05 15:22:48 +02:00
Sergi Delgado Segura
8704dcf2b9
plugin - defines TowerSummary as object to improve readability of the code
2020-05-05 15:22:44 +02:00