The `Attestation` in the `oracle` module has `Desiarialization` rules that conflict with loading it from the db.
We should not reuse domain structs between modules anyway, so this was cleaned up by introducing a dedicated `model::Attestation` and mapping to `oracle::Attestation`.
252: Rework oracle actor communication r=da-kami a=da-kami
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Daniel Karzel <daniel@comit.network>
Note: Since our sliding window of `next_24_hours` in the oracle actor is current hour `+[1..24]` the window should always be able to handle fetching an event of current hour + 1.
211: Rename "Accept / Reject" to "Pending" in CfdTables r=klochowicz a=klochowicz
Pending is a more succinct nudge to the user that they should react with an
action to the CFDs inside these tables.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Instead of the oracle actor sending out the `Announcements` we only store them internally and let the cfd actors chose what `Announcement` is relevant given the term of the offer.
The specific `Announcement` is then fetched from the oracle actor.
The monitoring logic for pending attestations remains the same.
249: First cet trial fixes r=da-kami a=da-kami
Note: Just discussed with `@thomaseizinger` that the Oracle actor should be changed to be able to handle multiple terms.
So, instead of the oracle actor sending out the current 24 hours to the cfd actor, the cfd actor should be able to request events for a time interval (i.e. different terms).
Changing that should also allow us to test more easily, because we can use a very short term.
Co-authored-by: Daniel Karzel <daniel@comit.network>
250: Roll over bug fixes r=bonomat a=bonomat
With these bugs fixed we get all the way back into `Open` state :)
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
240: Implement rollover protocol in daemons r=luckysori a=luckysori
Fix#136.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
245: Spread of `0.3%` instead of `3%` r=da-kami a=da-kami
Co-authored-by: Daniel Karzel <daniel@comit.network>
Co-authored-by: Daniel Karzel <daniel.karzel@coblox.tech>
Block until we are sure that the update was done, because otherwise we might have weird side effects in the UI because there is a dependency on the announcements being available when creating offers.
227: Handle collab settlement response from the maker r=klochowicz a=klochowicz
- store TakerId for proposals to be able to respond to specific taker about
settlement proposal when the user takes action
- send the collab settlement response (accept or reject) from the maker
- handle rejection (remove from the map), CFD state in the UI returns to "Open"
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
- store TakerId for proposals to be able to respond to specific taker about
settlement proposal when the user takes action
- send the collab settlement response (accept or reject) from the maker
- handle rejection (remove from the map), CFD state in the UI returns to "Open"
222: Prevent zero-priced CFD offers r=klochowicz a=klochowicz
Simplify the UI code and disable the button for posting a new offer if there is
no price set.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
223: Publish cet r=da-kami a=da-kami
- Handles the Oracle's attestation in the cfd actor, transition according to the knowledge we have about the timelock expiry already.
- Tries to publish the CET if we are in `CetStatus::Ready`, i.e. both the attestation and timelock expiry happened. We try publishing if either event happened, and just print a log in case it's not ready yet.
- Tries to re-publish CET if we are in `PendingCet` upon restart.
- Re-triggers CET monitoring upon startup.
- Extends any state after `ContractSetup` to be able to store the attestation. (see below for ideas to change that)
Things that could be done different:
Currently we are carrying on the attestation through a lot of states - because we cannot just transition the user to `OpenCommitted` because it is a user decision to go for commit, but we have to keep the attestation around once it happened.
To reduce the state complexity, we could store the attestation independent of the state, but associated with the cfd.
This would make things a lot simpler, but we would then always have to go to the database to check if the attestation is already around (which might make other parts more complex).
---
TODO:
- [ ] Test it 😬
Co-authored-by: Daniel Karzel <daniel@comit.network>
- Handles the Oracle's attestation in the cfd actor, transition according to the knowledge we have about the timelock expiry already.
- Tries to publish the CET if we are in `CetStatus::Ready`, i.e. both the attestation and timelock expiry happened. We try publishing if either event happened, and just print a log in case it's not ready yet.
- Tries to re-publish CET if we are in `PendingCet` upon restart.
- Re-triggers CET monitoring upon startup.
- Extends any state after `ContractSetup` to be able to store the attestation. (see below for ideas to change that)
Things that could be done different:
Currently we are carrying on the attestation through a lot of states - because we cannot just transition the user to `OpenCommitted` because it is a user decision to go for commit, but we have to keep the attestation around once it happened.
To reduce the state complexity, we could store the attestation independent of the state, but associated with the cfd.
This would make things a lot simpler, but we would then always have to go to the database to check if the attestation is already around (which might make other parts more complex).