Commit Graph

1200 Commits

Author SHA1 Message Date
rishflab
815a752c88 WIP: onchain refund 2021-05-18 14:51:20 +10:00
rishflab
0c9caef60f WIP: onchain refund 2021-05-17 15:46:15 +10:00
rishflab
4a99b89df4 WIP: onchain happy path 2021-05-17 14:47:30 +10:00
rishflab
acb243a0a2 Add protocol state machine 2021-05-17 14:47:30 +10:00
Lucas Soriano del Pino
ccb808bdf7
Use hash_point_to_point from external repo 2021-04-22 14:05:25 +10:00
rishflab
cfed03083c Use keccak instead of of sha512 2021-04-21 15:25:02 +10:00
Lucas Soriano del Pino
bc6a7fb6ff
[WIP] Port to EdwardsPoint and hash_point_to_point
TODO: Use keccak instead of sha512 when hashing scalars.
2021-04-20 17:42:57 +10:00
Lucas Soriano del Pino
ff68a1c1b5
Define hash_point_to_point function 2021-04-20 16:48:53 +10:00
rishflab
b2ff7eff73 hash_to_p3 working 2021-04-20 16:34:44 +10:00
rishflab
ade9e3eabf Initialise constants: I think hash_to_p3() working 2021-04-20 16:22:25 +10:00
rishflab
181d16156d Got boost compiling 2021-04-20 15:01:34 +10:00
rishflab
64b97d42b7 hash_to_p3 builds, links and can be called from rust code
Assertion failed: ((fe_add(y, w, x), !fe_isnonzero(y))), function ge_fromfe_frombytes_vartime, file depend/hash/crypto-ops.c, line 2656.
2021-04-20 09:36:31 +10:00
rishflab
00648d2747 hash_to_p3 builds using cmake but fails to link with cc-rs 2021-04-19 22:07:47 +10:00
Lucas Soriano del Pino
a93396d9a6
Test hash_to_scalar 2021-04-19 16:37:40 +10:00
rishflab
d6f610ae17 WIP: Add test 2021-04-19 15:58:26 +10:00
rishflab
c8b6a4d3c6 hash_to_scalar working with c bindings 2021-04-19 15:51:10 +10:00
Lucas Soriano del Pino
954e121641
[WIP] Copying over hash_to_scalar etc 2021-04-19 11:00:07 +10:00
rishflab
2d2803cb87 Add c bindings example 2021-04-16 14:52:35 +10:00
rishflab
74b2e0447e Sig verification passing 2021-04-16 11:23:22 +10:00
Lucas Soriano del Pino
5c7f4c8c42
Final challenge fixes 2021-04-15 17:08:48 +10:00
Lucas Soriano del Pino
085d95d07b
Compute h_0 correctly on Bob's side 2021-04-15 16:35:13 +10:00
Lucas Soriano del Pino
4a5f32fe74
Avoid recomputing wherever possible 2021-04-15 16:25:59 +10:00
Lucas Soriano del Pino
752cf85ae3
Almost finish Adaptor CLSAG 2021-04-15 15:50:38 +10:00
Lucas Soriano del Pino
52f30a6637
Fixing some stuff 2021-04-15 12:39:11 +10:00
rishflab
a64a114bec Confused about how the ring part works 2021-04-15 09:20:06 +10:00
Lucas Soriano del Pino
c0884e9864
WIP2 2021-04-13 15:19:37 +10:00
Thomas Eizinger
c3b8c7fbdb
WIP 2021-04-13 08:55:38 +10:00
bors[bot]
2f19222948
Merge #397
397: Always log at debug level to file r=rishflab a=rishflab

WILL SQUASH DOWN TO 3 COMMITS WHEN APPROVED!

Log at debug level to file

EnvFilter is applied globally. This means you cannot log at INFO level 
to the terminal and at DEBUG level to log files. To get a around this 
limitation I had to implement the layer trait on a new type and filter 
in the on_event() trait method. Each swap has its own log file denoted 
by its swap_id. The logger appends to the existing file when resuming a 
swap.

Closes #278 


I think the `DebugTerminalPritner` and `InfoTerminalPrinter` could be consolidated with some effort with some generics wizardry. It works for now and I think it can be done later. I wish in general there was a cleaner way to do this.
 

Co-authored-by: rishflab <rishflab@hotmail.com>
2021-04-09 00:19:56 +00:00
bors[bot]
688364cb41
Merge #404
404: Generate from keys can fall back to opening wallet if already generated r=da-kami a=da-kami



Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-08 09:25:09 +00:00
Daniel Karzel
489696ee08
Swap-id as file name for generated Monero wallet
Instead of using the private view-key as wallet filename we use the swap-id, to be able to identify which wallet is associated with which swap.
2021-04-08 19:23:54 +10:00
Daniel Karzel
548f057726
Try to open wallet in case generate_from_keys fails 2021-04-08 19:15:30 +10:00
rishflab
8805002f96 Remove redundant noun from tracing initialiser functions 2021-04-08 16:14:32 +10:00
rishflab
9745d150e7 Log at debug level to file
EnvFilter is applied globally. This means you cannot log at INFO level
to the terminal and at DEBUG level to log files. To get a around this
limitation I had to implement the layer trait on a new type and filter
in the on_event() trait method. Each swap has its own log file denoted
by its swap_id. The logger appends to the existing file when resuming a
swap.

Closes #278
2021-04-08 16:10:35 +10:00
rishflab
e517c5934e Move asb tracing initializer to asb module 2021-04-08 10:51:54 +10:00
bors[bot]
bad6ca95e0
Merge #402
402: Update ASB docs r=thomaseizinger a=da-kami

- remove outdated known limitations
- link to latest release
- mention of resuming swap upon restart and Bitcoin commands

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-07 02:08:21 +00:00
Daniel Karzel
14baba0529
Update ASB docs
- remove outdated known limitations
- link to latest release
- mention of resuming swap upon restart and Bitcoin commands
2021-04-07 11:58:28 +10:00
bors[bot]
55aae94648
Merge #399
399: Bump bmrng from 0.5.0 to 0.5.1 r=thomaseizinger a=dependabot[bot]

Bumps [bmrng](https://github.com/oguzbilgener/bmrng) from 0.5.0 to 0.5.1.
<details>
<summary>Commits</summary>
<ul>
<li><a href="c2dad4d718"><code>c2dad4d</code></a> (cargo-release) version 0.5.1</li>
<li><a href="9c7b9b5e64"><code>9c7b9b5</code></a> fix: Implement  for ReceiveError</li>
<li><a href="bfe74a5af9"><code>bfe74a5</code></a> docs: Fix inaccuracies around send</li>
<li><a href="d282479172"><code>d282479</code></a> (cargo-release) start next development iteration 0.5.1-alpha.0</li>
<li>See full diff in <a href="https://github.com/oguzbilgener/bmrng/compare/v0.5.0...v0.5.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bmrng&package-manager=cargo&previous-version=0.5.0&new-version=0.5.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>
2021-04-06 14:34:08 +00:00
bors[bot]
22fe24f54d
Merge #400
400: Release version 0.4.0 r=da-kami a=comit-botty-mc-botface

Hi @da-kami!

This PR was created in response to a manual trigger of the release workflow here: https://github.com/comit-network/xmr-btc-swap/actions/runs/721831897.
I've updated the changelog and bumped the versions in the manifest files in this commit: 1687f84aa1.

Merging this PR will create a GitHub release and upload any assets that are created as part of the release build.

Co-authored-by: COMIT Botty McBotface <botty@coblox.tech>
Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-06 10:18:40 +00:00
Daniel Karzel
cf4d369b9c
Replace commit hash with old versioning scheme v0.3 2021-04-06 20:09:42 +10:00
COMIT Botty McBotface
1687f84aa1 Prepare release 0.4.0 2021-04-06 08:20:31 +00:00
dependabot[bot]
8decb67252
Bump bmrng from 0.5.0 to 0.5.1
Bumps [bmrng](https://github.com/oguzbilgener/bmrng) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/oguzbilgener/bmrng/releases)
- [Commits](https://github.com/oguzbilgener/bmrng/compare/v0.5.0...v0.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-06 07:48:27 +00:00
bors[bot]
32912ebd4a
Merge #394
394: Add a configurable spread to the ASB r=thomaseizinger a=thomaseizinger

Fixes #381.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-04-06 07:39:11 +00:00
bors[bot]
f0a8be6835
Merge #396
396: Remove default connection details from CLI r=thomaseizinger a=rishflab

Connecting buyers to us by default is not consistent with our vision of
a decentralised network of sellers.

Closes #395

Co-authored-by: rishflab <rishflab@hotmail.com>
2021-04-06 07:26:24 +00:00
rishflab
9b0467d43a Remove default connection details from CLI
Connecting buyers to us by default is not consistent with our vision of
a decentralised network of sellers.

Closes #395
2021-04-06 16:59:11 +10:00
bors[bot]
ce1cecb17f
Merge #398
398: Bump dprint/check from v1 to v1.2 r=thomaseizinger a=dependabot[bot]

Bumps [dprint/check](https://github.com/dprint/check) from v1 to v1.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dprint/check/releases">dprint/check's releases</a>.</em></p>
<blockquote>
<h2>v1.2</h2>
<p>Upgrade to support new <em>dprint.json</em> configuration file name.</p>
<h2>v1.1</h2>
<p>Upgrades to dprint 0.12.0 for support for the new <em>dprint.json</em> configuration file.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="58765d1963"><code>58765d1</code></a> fix: Fix version in README.md</li>
<li><a href="3951ef3848"><code>3951ef3</code></a> feat: Upgrade to dprint 0.12.0</li>
<li><a href="5a6244b61d"><code>5a6244b</code></a> chore: Update instructions.</li>
<li>See full diff in <a href="https://github.com/dprint/check/compare/v1...58765d19636462e70cd83fe4de8dfc16e7d6f5d2">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>
2021-04-06 06:51:48 +00:00
bors[bot]
e0b859bb1e
Merge #387
387: Improve the resilience of the network layer r=thomaseizinger a=thomaseizinger

We improve the resilience in two ways:

1. Use a timeout on Bob's side for the execution-setup.
2. Use the `bmrng` library to model the communication between Alice and Bob.

See commit messages for details.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-04-06 06:20:30 +00:00
Thomas Eizinger
a99d12b9df
Add a configurable spread to the ASB
Fixes #381.
2021-04-06 16:16:58 +10:00
Thomas Eizinger
3e0301a9d4
Move FixedRate into event_loop module
This is where these types are used, they can be defined in there.
2021-04-06 16:16:57 +10:00
Thomas Eizinger
654cfff2a8
Make kraken module emit PriceUpdates instead of Rates 2021-04-06 16:16:56 +10:00
Thomas Eizinger
cfc530e8ab
Make ask field of Rate private 2021-04-06 16:16:53 +10:00