bonomat
0660f1ec8c
Log CFD timeout on start for debugging purposes
3 years ago
Lucas Soriano del Pino
307bad1358
Introduce short-lived rollover_taker::Actor
3 years ago
bonomat
be8aa0c6ec
Settle CFDs after 7 days
3 years ago
bonomat
b467f38700
Settle CFDs every 2h
3 years ago
Thomas Eizinger
357341c8dd
Remember UTXOs previously used for creating transactions
This should prevent accidential double-spends of our own inputs
when doing concurrent contract setups or other interactions of the
wallet.
We only store these in-memory, thus a simple restart of the application
will "unlock" a UTXO in case it was previously marked used but the
transaction never made it to the blockchain for whatever reason.
Resolves #790 .
3 years ago
Thomas Eizinger
6dd95d01c3
Move `dummy_wallet` to `daemon::bdk_ext::new_test_wallet`
This wallet is also useful for unit tests. Move it out of the harness
into the library.
3 years ago
Thomas Eizinger
60f8d441c0
Upgrade `maia`
This gives us access to the `TxBuilder` for the lock transaction.
3 years ago
Thomas Eizinger
4e9c9d6c6d
Simplify wallet actor
We don't need to `Clone` the wallet actor ever so we can remove this
custom derive which allows us to also drop the `Arc<Mutex>` of the
`bdk::Wallet`, thus simplifying all of the handlers quite a bit.
We also add `&mut` to all handlers. Even though not strictly necessary
(because they are processed by `xtra-productivity`), it is more correct
to write `&mut self` because that is what the macro will output anyway.
3 years ago
Mariusz Klochowicz
ad551e7161
Allow projection actor to retrieve latest Cfd state itself from DB
Instead of retrieving Cfds inside Cfd actors, send a msg that they changed and
retrieve them by the projection actor itself.
3 years ago
itchymax
88f64a0bba
Prepare release 0.2.0
3 years ago
Daniel Karzel
fbdc6c5e77
Hello message
3 years ago
Daniel Karzel
302c1be86b
Use identity more consistently
3 years ago
Daniel Karzel
287ad4788d
Move framed read and write into connection setup
This enables us read/write messages before creating actors.
3 years ago
dependabot[bot]
071a9efd9b
Bump bdk from 0.13.0 to 0.14.0
Bumps [bdk](https://github.com/bitcoindevkit/bdk ) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/bitcoindevkit/bdk/releases )
- [Changelog](https://github.com/bitcoindevkit/bdk/blob/v0.14.0/CHANGELOG.md )
- [Commits](https://github.com/bitcoindevkit/bdk/compare/v0.13.0...v0.14.0 )
---
updated-dependencies:
- dependency-name: bdk
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Thomas Eizinger
5eee7ff2f9
Move testnet seeds to `testnet` directory
This makes it easier to run the application with default arguments.
3 years ago
Thomas Eizinger
7bd428e8c7
Upgrade to Rust 1.57
The clippy version included with 1.57 flagged several problems:
1. Multiple fields were never read, removed those.
2. The `Default` impl on `Tasks` could be derived.
3. A redundant closure
4. A large enum variant
3 years ago
Mariusz Klochowicz
6c674a8530
Add test covering collaborative close
To minimise the noise, create a function that "picks up" from the CfdState::Open.
3 years ago
Mariusz Klochowicz
0a8969ed63
Clean up tests
- Remove dummy transaction and txid (use the transactions received in the
messages instead
- extract helpers for quote and price to prevent misalignments in tests
- extend contract setup to finish at Open state of the cfd
3 years ago
dependabot[bot]
ef926f8525
Bump rust_decimal_macros from 1.17.0 to 1.18.0
Bumps [rust_decimal_macros](https://github.com/paupino/rust-decimal ) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/paupino/rust-decimal/releases )
- [Commits](https://github.com/paupino/rust-decimal/compare/1.17.0...1.18.0 )
---
updated-dependencies:
- dependency-name: rust_decimal_macros
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Thomas Eizinger
6348374790
Remove unnecessary default arguments
This is legacy, we don't want any defaults here.
3 years ago
Lucas Soriano del Pino
c6e59abcfc
Introduce short-lived setup_maker::Actor
3 years ago
Thomas Eizinger
b515d90a66
Use `xtra-productivty` for `TakeOffer`
This reduces one layer of indirection.
3 years ago
dependabot[bot]
c1e0835fc7
Bump rust_decimal from 1.17.0 to 1.18.0
Bumps [rust_decimal](https://github.com/paupino/rust-decimal ) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/paupino/rust-decimal/releases )
- [Commits](https://github.com/paupino/rust-decimal/compare/1.17.0...1.18.0 )
---
updated-dependencies:
- dependency-name: rust_decimal
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Lucas Soriano del Pino
d337e23906
Remove unnecessary allow attribute
3 years ago
Thomas Eizinger
d75e73da9f
Move collab. settlement protocol into dedicated actor for taker
3 years ago
Thomas Eizinger
a07453ec8e
Bundle all settlement related messages in a individual enums
Once these messages are handled by dedicated actors, this will reduce
the amount to runtime errors a la "this message should be handled by
someone else".
See #696 .
3 years ago
Thomas Eizinger
dd374474e9
Remove error case from updating projection
Not finding a proposal for a specific error does not need to be
bubbled up to the caller.
3 years ago
bonomat
696d82cc6a
Add HTTP API to get cfds and takers
3 years ago
Mariusz Klochowicz
2ee97c41fe
Pass changes in cfd proposals into projection actor
Instead of passing the whole HashMap to the projection actor, only send what has
actually changed.
Provide separate messages to update settlement proposal and roll over proposals,
as they will be sent from different actors.
3 years ago
Thomas Eizinger
30e5dc8ae7
Refactor bitmex price feed to Actor that reconnects on error
Fixes #758 .
3 years ago
Daniel Karzel
020e1383e4
Log target = module
```
2021-11-30 16:39:33 INFO daemon::logger: Initialized logger
2021-11-30 16:39:33 INFO taker: Running version: 0.1.2-11-g09cfe03
```
instead of
```
2021-11-30 14:33:14 INFO Initialized logger
2021-11-30 14:33:14 INFO Running version: 0.1.1-367-gcbc42b6
```
Makes it way easier to interpret logs because we have context who logged what.
3 years ago
Thomas Eizinger
b6d82129e4
Introduce a 10s timeout for connecting to the maker
3 years ago
Thomas Eizinger
4ff4d01804
Cleanup logs for establishing connection
- Only print state changes on `info`
- Don't print the same information twice
3 years ago
Lucas Soriano del Pino
4245c22b44
Refactor maker_inc_connections::Actor
To allow us to control where to forward each message from the taker.
3 years ago
itchymax
26b75b75d6
Prepare release 0.1.2
3 years ago
Mariusz Klochowicz
01a6dba79b
Use projection::Cfd in the feeds
Roll-out its usage in the actor tests
3 years ago
Mariusz Klochowicz
0fb4457f37
Create cfds from the local state kept in projection actor
3 years ago
Mariusz Klochowicz
b028ed6e84
Pass in `Role` and `Network` into projection actor
Projection actor needs this information for creating Cfds for display in the UI.
3 years ago
dependabot[bot]
8fd42a8b8f
Bump rust-embed from 6.2.0 to 6.3.0
Bumps [rust-embed](https://github.com/pyros2097/rust-embed ) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/pyros2097/rust-embed/releases )
- [Changelog](https://github.com/pyros2097/rust-embed/blob/master/changelog.md )
- [Commits](https://github.com/pyros2097/rust-embed/commits )
---
updated-dependencies:
- dependency-name: rust-embed
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
3b66dc35f5
Bump derive_more from 0.99.16 to 0.99.17
Bumps [derive_more](https://github.com/JelteF/derive_more ) from 0.99.16 to 0.99.17.
- [Release notes](https://github.com/JelteF/derive_more/releases )
- [Changelog](https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md )
- [Commits](https://github.com/JelteF/derive_more/compare/v0.99.16...v0.99.17 )
---
updated-dependencies:
- dependency-name: derive_more
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Mariusz Klochowicz
7464ababc8
Move Cfd types into the projection actor
Move the logic of creating Cfd representation suitable for UI into the
projection actor
For the time being, keep the logic as free functions that are still used in the
"old" way (inside ToSseEvent)
3 years ago
Mariusz Klochowicz
1ddab68188
Extract code generating mempool.space URLs to avoid duplication
3 years ago
Mariusz Klochowicz
384ac2bfec
Move more types from ToSseEvent to projection actor
Preparation for the final stage of the refactor.
3 years ago
Mariusz Klochowicz
612f810088
Move TxUrl assembly into a separate module
Creating transactions' URLs is a functionality that doesn't need to be
tightly-coupled with other modules.
3 years ago
Thomas Eizinger
673555b1b0
Remove taker_cfd::CfdAction enum and use `xtra-productivity`
3 years ago
Thomas Eizinger
220c0766c6
Introduce `AddressMap` primitive
This should remove some duplication as we will repeat this pattern
a couple of times.
3 years ago
Lucas Soriano del Pino
f9cd6cb5d5
Handle incoming InvalidOrderId in setup_taker::Actor
3 years ago
Mariusz Klochowicz
17673e50cc
Remove deadlock after triggering collaborative settlement
3 years ago
Daniel Karzel
2781f57e29
Add acknowledge message at the end of rollover
This is to avoid going on chain in a scenario where one party finished the rollover, while the other party ran into a timeout after send-/receiving the last message for the revoke-commit.
3 years ago
Mariusz Klochowicz
9624cc2ece
Use projection actor for connected takers
Use projected Identity in the tests.
3 years ago