Commit Graph

79 Commits (3a5395d7a568aeee89343529a60ec1dc6b8bc52d)

Author SHA1 Message Date
Thomas Eizinger 101483118a
Always display log output in CI 3 years ago
Thomas Eizinger 8d76607343
Refactor monero-harness containers
1. Split up image::Monero into Monerod and MoneroWalletRpc
2. Don't use `bash` to run the internal command. Instead we disable
the entrypoint script as per https://github.com/XMRto/monero#raw-commands
3. Remove the start up delay by listening for the correct log message.
To make this more resilient, we make the log level NOT configurable and
instead always log verbosely.
3 years ago
dependabot[bot] df8bca54d9
Bump dprint/check from v1.2 to v1.3
Bumps [dprint/check](https://github.com/dprint/check) from v1.2 to v1.3.
- [Release notes](https://github.com/dprint/check/releases)
- [Commits](https://github.com/dprint/check/compare/v1.2...73e06d86562a052a5fa32b01e1350a7b8de99966)

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
bors[bot] 2c13a90073
Merge #412
412: Bump actions/setup-python from v2.2.1 to v2.2.2 r=thomaseizinger a=dependabot[bot]

Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.2.1 to v2.2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/setup-python/releases">actions/setup-python's releases</a>.</em></p>
<blockquote>
<h2>v2.2.2</h2>
<p>Address PyPy installation issues on Windows: <a href="https://github-redirect.dependabot.com/actions/setup-python/issues/196">actions/setup-python#196</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="dc73133d4d"><code>dc73133</code></a> Fix PyPy installation on Windows to adopt new parameters format (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/201">#201</a>)</li>
<li><a href="a1121449a2"><code>a112144</code></a> Add on: pull_request trigger to CodeQL workflow (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/180">#180</a>)</li>
<li><a href="66319ca9fa"><code>66319ca</code></a> Use quotes around Python versions in README (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/175">#175</a>)</li>
<li>See full diff in <a href="https://github.com/actions/setup-python/compare/v2.2.1...dc73133d4da04e56a135ae2246682783cc7c7cb6">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
Daniel Karzel c976358c37
Multiple swaps with the same peer
- Swap-id is exchanged during execution setup. CLI (Bob) sends the swap-id to be used in his first message.
- Transfer poof and encryption signature messages include the swap-id so it can be properly associated with the correct swap.
- ASB: Encryption signatures are associated with swaps by swap-id, not peer-id.
- ASB: Transfer proofs are still associated to peer-ids (because they have to be sent to the respective peer), but the ASB can buffer multiple
- CLI: Incoming transfer proofs are checked for matching swap-id. If a transfer proof with a different swap-id than the current executing swap is received it will be ignored. We can change this to saving into the database.

Includes concurrent swap tests with the same Bob.

- One test that pauses and starts an additional swap after the transfer proof was received. Results in both swaps being redeemed after resuming the first swap.
- One test that pauses and starts an additional swap before the transfer proof is sent (just after BTC locked). Results in the second swap redeeming and the first swap being refunded (because the transfer proof on Bob's side is lost). Once we store transfer proofs that we receive during executing a different swap into the database both swaps should redeem.

Note that the monero harness was adapted to allow creating wallets with multiple outputs, which is needed for Alice.
3 years ago
dependabot[bot] 443e698a41
Bump actions/setup-python from v2.2.1 to v2.2.2
Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.2.1 to v2.2.2.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2.2.1...dc73133d4da04e56a135ae2246682783cc7c7cb6)

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot] e730590085
Bump dprint/check from v1 to v1.2
Bumps [dprint/check](https://github.com/dprint/check) from v1 to v1.2.
- [Release notes](https://github.com/dprint/check/releases)
- [Commits](https://github.com/dprint/check/compare/v1...58765d19636462e70cd83fe4de8dfc16e7d6f5d2)

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Daniel Karzel 084fc618b4 Test Alice refunds if restarted and Bob refunded 3 years ago
Daniel Karzel 2135a6e53e
Alice resumes swaps 3 years ago
Thomas Eizinger c5827f84ca
Refactor recursive function to loop
This should get rid of the ever-growing stack size issue.
3 years ago
bors[bot] 36b92c9f1f
Merge #380
380: Simplify CI workflow r=thomaseizinger a=thomaseizinger

Some patches extracted out of https://github.com/comit-network/xmr-btc-swap/pull/371.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
3 years ago
Thomas Eizinger 453b8e3ae7
Remove unnecessary TARGET env variable
unknown-linux-gnu is the default for ubuntu, we don't need to
specify this.
3 years ago
Thomas Eizinger 1d3c780912
Allow more than two concurrent tests
There is no reason to limit this, all the docker tests are outside
of the lib.
3 years ago
Thomas Eizinger 8767af8dd3
Simplify matrix for test job 3 years ago
Thomas Eizinger b84a1626bd
Add workflow documentation 3 years ago
Thomas Eizinger d8e2e7beeb
Add workflow for creating new releases
Whenever a release branch - that is a branch starting with `release/` -
is merged into master, we create a new GitHub release based on the
version number in the branch name.

Similarly to the preview release, we extract the relevant section of
the changelog and make it the release body.
3 years ago
Thomas Eizinger 5e81555b85
Add workflow for drafting a new release
Drafting a new release can be quite involved. One has to update the
changelog correctly, bump the versions in the manifest files, commit
everything and raise a PR.

This workflow does all of that for you at the click of a button!
3 years ago
Thomas Eizinger 497a531102
Add CHANGELOG section to preview release
Whenever we create a preview release, we extract the `unreleased`
section of the CHANGELOG and make it the body of the Github release.
3 years ago
Thomas Eizinger 8bc41ecff4
Improve docs of CI workflow 3 years ago
Thomas Eizinger febc68c780
Enforce consistent formatting of Markdown files 3 years ago
Thomas Eizinger 638a169a04
Buffer transfer proof if we are not connected to Bob
The request-response behaviour that is used for sending the transfer
proof actually has a functionality for buffering a message if we
are currently not connected. However, the request-response behaviour
also emits a dial attempt and **drops** all buffered messages if this
dial attempt fails. For us, the dial attempt will very likely always
fail because Bob is very likely behind NAT and we have to wait for
him to reconnect to us.

To mitigate this, we build our own buffer within the EventLoop and
send transfer proofs as soon as we are connected again.

Resolves #348.
3 years ago
Thomas Eizinger 1b8f807288
Update the preview release text
By default, GitHub uses the last commit message as the body text.
This can be a lot of text if the last commit was from dependabot.

Make the preview release more pleasant to look at by adding a
dedicated body.
3 years ago
dependabot[bot] d8c29f1026
Bump actions/setup-python from v1 to v2.2.1
Bumps [actions/setup-python](https://github.com/actions/setup-python) from v1 to v2.2.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v1...3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df)

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Thomas Eizinger 4ea8068d6f
Create dependabot.yml 3 years ago
Daniel Karzel d85c0ce57c Re-introduce punish test 3 years ago
Daniel Karzel f8360fe853 .cargo/config.toml for specifying linker
To avoid code duplication we specify the linker for the specific
target armv7-unknown-linux-gnueabihf in the config.toml file as
specified here:
https://doc.rust-lang.org/cargo/reference/config.html#targettriplelinker
3 years ago
Daniel Karzel 6e09653d3f Remove target section from CI
matrix.include does not require the target section to be present because it
specifies the specific matrix combinations to be run.
3 years ago
Daniel Karzel 58c33f8468 Add asb to release including ARM build 3 years ago
Daniel Karzel 196557b377 Rename binary to swap 3 years ago
Thomas Eizinger 3e6e746852
Rename `latest` release to `preview`
The latest release should refer to the latest non-pre release.
What we are doing here is actually publishing a preview release.

Fixes #281.
3 years ago
Thomas Eizinger 52433f7412
Use Rust cache action 3 years ago
Thomas Eizinger ab68b28fd8
Reduce workflow duplication 3 years ago
rishflab 95b1558c8e Add create release archive action for ubuntu
gtar is not installed on ubuntu so tar has to be used
3 years ago
rishflab 13764161a3 Add create release archive action for windows
Windows users may not have a tar extractor installed by default so 7z
was used to create a zip archive. I attempted to add the action names to
 the strategy matrix so we dont need if statements to choose the
 appropriate create release archive action but github did not like when
 I passed a field under strategy.matrix.include into steps.uses.
3 years ago
rishflab d88a235883 Use gtar to create release archive
tar was producing an archived that binary that was failing to execute on
 developer machines. Since gtar is not available on windows or ubuntu,
 the windows and ubuntu releases was removed.
3 years ago
bors[bot] 3f12c6f58a
Merge #256
256: Give GitHub some time to process the deletion of the release  r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
3 years ago
Thomas Eizinger 75cec57e9d
Give GitHub some time to process the deletion of the release
If we immediately chain the two actions, `create-release` only creates
a draft for some reason.
3 years ago
rishflab e9b56934e8 Add windows to release and build workflow 3 years ago
Thomas Eizinger 73bbec1bc0
Create a 'latest' release on pushes to master
Fixes #241.
3 years ago
Thomas Eizinger d0ee873a92
Smoke test the binary in the release workflow
Fixes #251.
3 years ago
Daniel Karzel 06be66700e Remove windows from the release
At the moment windows fails to build. This has to be fixed before it is re-added to the release.
3 years ago
rishflab 9a4c5df368 Create github workflow to build swap_cli binary on release 3 years ago
Daniel Karzel fe3d6f1fef Rename nectar to asb (automated swap backend) 3 years ago
Thomas Eizinger fb45ff66eb
Update rust-toolchain to new toml syntax
This allows us to completely skip the "Install Rust" step in CI
because the rust-toolchain file completely describes what we need.
The first invocation of cargo will simply install all the required
components.

Additionally, we make all caches dependant on the version of Rust
that we require.
3 years ago
Thomas Eizinger 8072f4d7ee
Only install tomlfmt if we don't have ~/.cargo/bin cached 3 years ago
Thomas Eizinger a3b5c13b52
Upgrade to actions/cache@v2.1.4
Usually, we can follow the rolling major tag (@v2) of actions.
However the recent release (2.1.4) is not yet included. See
https://github.com/actions/cache/issues/528 for more details.

We do want to depend on 2.1.4 because it contains a fix that allows
us to use the cache action MacOS. v2 also features better compression
and allows for multiple paths to be specified.
3 years ago
Thomas Eizinger f1b097877b
Split `build_test` into `build` and `test`
Building binaries and building tests results in different artifacts
inside the `target` directory. If we use distinct caches for these
commands, the caches are more useful because less code has to be
re-built.
3 years ago
Thomas Eizinger e57c005920
Remove unused matrix entry 3 years ago
Thomas Eizinger acbc0f5551
Upload nectar binary in addition to swap_cli 3 years ago
Thomas Eizinger 3c7880f771
Fix path to CLI for artifact upload
The name was recently changed but the workflow wasn't adapted.
3 years ago