Thomas Eizinger
8d52cfbec7
Make cache to be per target
Otherwise the armv7 build uses the x64 cache which is no good.
3 years ago
Thomas Eizinger
7f66504090
Merge pull request #187 from comit-network/housekeeping
3 years ago
Thomas Eizinger
1560d86698
Move re-broadcasting functionality from actor ctor to housekeeping
3 years ago
Thomas Eizinger
a49e1d342f
Rename `cleanup` module to `housekeeping`
3 years ago
Thomas Eizinger
268f94a6b8
Merge pull request #178 from comit-network/simplify-monitoring
Rework monitoring actor to use local state instead of tasks
3 years ago
Thomas Eizinger
2fb374bcc5
Merge pull request #186 from comit-network/no-nonce-pks-for-now
Don't take announcements from oracle for now
3 years ago
Thomas Eizinger
069cdd2f45
Add test for monitoring actor
3 years ago
Thomas Eizinger
0ce2375ef7
Make Actor generic over electrum client implementation
3 years ago
Thomas Eizinger
eee0fdac25
Rework monitoring actor to use local state instead of tasks
This should greatly improve resilience as we no longer have any
tasks within `tokio` that can fail without recovering.
Instead, we periodically ping the actor with a `Sync` message which
updates the local state of all scripts and sends out messages accordingly.
3 years ago
Thomas Eizinger
7b8b80052a
Refer to symbols within `std::fmt` via `fmt::`
3 years ago
Thomas Eizinger
f028ca662d
Don't take announcements from oracle for now
These are not yet set which means we cannot go through contract-setup
at the moment.
3 years ago
Thomas Eizinger
79c7570498
Merge pull request #184 from comit-network/fix-olivia-actor
Some fixes around the oracle actor
3 years ago
Thomas Eizinger
7375ab1508
Actually construct the correct URLs
3 years ago
Thomas Eizinger
4ac13e405e
Make sure we can request HTTPS urls
3 years ago
Daniel Karzel
a9cad7ec3e
Merge pull request #179 from comit-network/non-collaborative-close
Non collaborative close
3 years ago
Daniel Karzel
550bdcdd22
Integrate settlement endpoint into actions
Caused trouble because of route collisions, so the integration was done now.
Required distinguishing Maker and Taker on the cfd level, which comes in handy anyway.
We distinguish by order origin, but still map to a `Role` enum (`Taker` / `Maker`) for readability.
To avoid duplication the `Role` from contract setup was moved into the model and used throughout.
3 years ago
Daniel Karzel
9c02592836
Pass order_id instead of msg to handle func
3 years ago
Daniel Karzel
a43312de2d
Don't panic in endpoints
Does not tackle fixing previously already existing endpoints.
3 years ago
Daniel Karzel
592e81c897
Re-trigger sending commit in case we start up in `PendingCommit`
For now the behavior is: Once the user pressed the button commit will be published and also retried upon startup.
3 years ago
Daniel Karzel
42b4701bc7
Non-collaborative close by publishing commit tx
3 years ago
Daniel Karzel
2eb135d155
Simplify state transition code
The complexity of the code part was not worth the information we got out of it, so it was simplified.
Should hopefully make it a bit more readable and easier to understand.
3 years ago
Mariusz
c11cb6f51b
Merge pull request #183 from comit-network/request-order-fix
Fix the API breakage on posting a CfdOrderRequest
3 years ago
Mariusz Klochowicz
1f5083fa65
Fix the API breakage on posting a CfdOrderRequest
Recent PR #175 introduced a breaking change and the UI did not get updated.
3 years ago
Thomas Eizinger
5cf03d83bd
Merge pull request #156 from comit-network/payout-curve-api
3 years ago
Thomas Eizinger
43b1d08898
Add API for calculating payout curve
3 years ago
Thomas Eizinger
5d5347ce56
Merge pull request #172 from comit-network/directly-initialize-price-feed
3 years ago
Thomas Eizinger
ee785354f3
Directly initialize feed with list of current CFDs
3 years ago
Thomas Eizinger
fa2ca990a1
Use the same database connection throughout the actor setup
3 years ago
Thomas Eizinger
bbaf66a754
Merge pull request #145 from comit-network/oracle-actor
3 years ago
Mariusz
cf08326c64
Add a taker endpoint for initiating collaborative settlement ( #175 )
* Add a taker endpoint for initiating collaborative settlement
For now, only logs the proposal in the logs on the maker side
3 years ago
Lucas Soriano del Pino
23d7c6110f
Watch relevant olivia announcements and attestations
3 years ago
Daniel Karzel
079322511d
Merge pull request #174 from comit-network/model-update
Clear UI model separation and dynamic actions
3 years ago
Daniel Karzel
558443b97d
Properly configure linting and fix lint errors
Also adds tsc as command so it can more easily be used in run configurations.
3 years ago
Daniel Karzel
faaaed8705
Remove unused code
3 years ago
Daniel Karzel
e8d48ef449
Group case statements of switches in UI
3 years ago
Thomas Eizinger
18d6c6771c
Merge pull request #180 from comit-network/bdk-sqlite
Use sqlite for BDK
3 years ago
Thomas Eizinger
fa87ad90c6
Use sqlite for BDK's database
3 years ago
Thomas Eizinger
57fe104d9c
Selectively depend on bdk features
3 years ago
Thomas Eizinger
a219d90dd0
Update to bdk 0.12
3 years ago
Daniel Karzel
a2fbfedc02
UI state mapping & dynamic actions
All display related decisions are taken in the UI, but on top of the UI's model.
For this purpose we introduce classes for `CfdState` and `Position` so we can add the relevant mapping functions to these classes.
To achieve the mapping from daemon sse even to the `Cfd` / `Order` interface (that now contain classes instead of just primitives) we extend the sse hook to accept a mapping function.
We define this mapping function for `Cfd` and `Order`, because those contain classes, for all others we just use the default mapping.
Actions are dynamically rendered based on the state.
The daemon decides on the action name.
A single post endpoint handles all actions.
The UI maps the actions to icons.
Co-authored-by: Thomas Eizinger <thomas@coblox.tech>
3 years ago
Thomas Eizinger
36521bdee8
Merge pull request #177 from comit-network/fix-contract-setup
Fix parsing of electrum error response
3 years ago
Thomas Eizinger
d78ae049be
Merge pull request #176 from comit-network/fix-electrum-response-parsing
3 years ago
Thomas Eizinger
00883af0a9
Don't panic on unexpected messages
This is actually a security bug as it would allow remote triggers
of panics!
3 years ago
Thomas Eizinger
cf5a3752d3
Improve readability of special handling for electrum error
The default path through the function would be to propagate every
error. However, we want to inspect whether it is one very specific
error.
Make this clear in the code structure by having a dedicated `if let`
for the special case but keep using `?` afterwards.
3 years ago
Thomas Eizinger
fdd50e889e
Fix parsing of electrum error response
3 years ago
Mariusz
e1e3d4bd94
Merge pull request #173 from comit-network/maker-cfd-cleanup
Clean up message handlers in maker_cfd actor
3 years ago
Mariusz Klochowicz
28ecd8a680
Clean up message handlers in maker_cfd actor
No need to pass the message structs into the handlers as they are mostly
superfluous boilerplate and are destructured afterwards anyway.
3 years ago
Thomas Eizinger
d47b97b807
Merge pull request #162 from comit-network/dependabot/cargo/bdk-8c21bcf
Bump bdk from `919522a` to `8c21bcf`
3 years ago
dependabot[bot]
f237b0ee0b
Bump bdk from `919522a` to `8c21bcf`
Bumps [bdk](https://github.com/bitcoindevkit/bdk ) from `919522a` to `8c21bcf`.
- [Release notes](https://github.com/bitcoindevkit/bdk/releases )
- [Commits](919522a456
...8c21bcf40a1fe76637b65c3e483b6c46351f28fa)
---
updated-dependencies:
- dependency-name: bdk
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Thomas Eizinger
59d8590892
Merge pull request #159 from comit-network/more-useful-caches
3 years ago