301: Login as the repository r=bonomat a=bonomat
This allows us to publish to {orgname}/{reponame} i.e. comit-network/hermes/packages
Worked on my fork: https://github.com/bonomat/hermes/pkgs/container/hermes%2Fmaker
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
300: Fix docker image build r=bonomat a=bonomat
The new task does a few things:
1. Having an extra build target makes the workflow file cleaner
2. it downloads the release targets which we want to build docker images for
3. it extracts the tar files into sub folders. We need to extract into sub folders to so that our image can fine the binaries. By providing `platform` to `docker buildx` the variable `TARGETPLATFORM` will be available when building the image. This variable is either `linux/amd64/`, `linux/arm64/` or `linux/arm/v7`. Hence we need to extract into subfolders.
4. We create 2 images, one for the maker and one for the taker. The images are then pushed to our organisation's docker registry.
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
The new task does a few things:
1. Having an extra build target makes the workflow file cleaner
2. it downloads the release targets which we want to build docker images for
3. it extracts the tar files into sub folders. We need to extract into sub folders to so that our image can fine the binaries. By providing `platform` to `docker buildx` the variable `TARGETPLATFORM` will be available when building the image. This variable is either `linux/amd64/`, `linux/arm64/` or `linux/arm/v7`. Hence we need to extract into subfolders.
4. We create 2 images, one for the maker and one for the taker. The images are then pushed to our organisation's docker registry.
299: Only process CFDs where we have a DLC r=thomaseizinger a=thomaseizinger
If we just `.context` on the Option, we break out of the loop early
and don't process the remaining items.
Fixes#298.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Converting from f64 to u64 can make us lose precision.
Create a new Fee type that encapsulates calculating fees, includding splitting
it between two parties.
287: Fetch attestations only when it is time r=thomaseizinger a=thomaseizinger
- Rename `OracleEventId`
- Refer to types within `fmt` module via module qualifier
- fixup! Refer to types within `fmt` module via module qualifier
- Prefer `.parse` over `FromStr` to avoid an import
- Properly model event IDs
- Fix typo
- Only fetch attestation that are likely to have occured
- Introduce drop-in replacement for tokio::spawn that logs errors
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
288: Rename order price to offer price r=bonomat a=bonomat
I want to trigger a new `preview` build and wasn't sure if there is another way. Looks like a last release build failed: https://github.com/comit-network/hermes/runs/3868563726?check_suite_focus=true
And I want to see if this was a glitch or if something else went wrong.
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
273: Build for aarch64 which is needed for RPi4 r=bonomat a=bonomat
Adds more build targets and publishes docker containers.
This was tested on my personal fork and resulted in the following container which can run on an RPi4:
```
docker run ghcr.io/bonomat/hermes-maker-aarch64-unknown-linux-gnu:latest
```
A few notes which might come up:
- The naming of the containers can be improved, please someone with sed knowledge give it a try :)
- I was not able to use the github action `docker/build-push-action`. This moves the image build into a tmp folder which I was not able to escape. Hence, I was not able to copy the binaries into the image
- I was not able to combine the containers into a single one because we have parallel builds. Apparently this should be possible though (reference: [manifest](https://www.docker.com/blog/multi-platform-docker-builds/)).
- I was also not able to use alpine because of the different libc6 version
282: Only fetch announcements when needed r=luckysori a=luckysori
Fixes#275.
I think this is what you meant with #275, `@thomaseizinger.` It does result in immediately deleting some code you wrote in #279. I do think we'll end up reintroducing it once we actually use more than one oracle event per CFD, but it seems unnecessary to keep it around until then. Let me know if you disagree.
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
The daemon adds `CfdDetails` that contains:
* `Vec<TxUrl>` - relevant transaction-id URLs to block explorer based on the state and bitcoin network
* `Option<bitcoin::Amount>` - The payout if we already have an attestation
* Display tx-urls and payout when unfolding the cfd row in table
The way I see it, an oracle "event" consists of both an "announcement"
and an "attestation". In the case of this message, we want to keep
track of the state of the "attestation", so the rename should make it
unambiguous.
Instead of always keeping track of the next 24 hours of announcements,
we instruct the `oracle::Actor` to fetch (if necessary) announcements
based on new orders.
At the moment this results in removing code which allowed us to fetch
several announcements in parallel, but we will need to reintroduce it
once we let the `daemon`s create CFDs with multiple attestation
events.
281: Monitor CETs based on a script pubkey in the transaction r=luckysori a=luckysori
Fixes#238.
Instead of passing in a script which may or may not be part of a CET (because some CETs only pay to one party), we take the script pubkey from an output of the transaction itself.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
Instead of passing in a script which may or may not be part of a
CET (because some CETs only pay to one party), we take the script
pubkey from an output of the transaction itself.
283: Give each app a different name r=luckysori a=luckysori
This might be stupid, but it makes it easier to know who is who.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
279: More oracle actor fixes r=thomaseizinger a=thomaseizinger
- Re-organize oracle module a bit
- Parallelize fetching of announcements via self messages
- Add error message to JSON deserializer
- Don't fail attestation sync just because it is not attested yet
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>