Commit Graph

15 Commits (620ac569f7db4b19c3dc761619e7a4d0ab0841dd)

Author SHA1 Message Date
Daniel Karzel 818147a629
`swap_setup` instead of `spot_price` and `execution_setup`
Having `spot_price` and `execution_setup` as separate protocols did not bring any advantages, but was problematic because we had to ensure that `execution_setup` would be triggered after `spot_price`. Because of this dependency it is better to combine the protocols into one.

Combining the protocols also allows a refactoring to get rid of the `libp2p-async-await` dependency.

Alice always listens for the `swap_setup` protocol. When Bob opens a substream on that protocol the spot price is communicated, and then all execution setup messages (swap-id and signature exchange).
3 years ago
Thomas Eizinger 7120a1f70a
Don't depend on `core::fmt` through `bitcoin_hashes` re-export 3 years ago
Thomas Eizinger 338f4b82e5
Introduce dedicated bob::State6 for cancelling 3 years ago
Thomas Eizinger 6d9b21cb47
Change `imports_granularity` to module
This reduces the overall amount of LoC that imports take up in our
codebase by almost 100.
It also makes merge-conflicts less likely because there is less
grouping together of imports that may lead to layout changes which
in turn can cause merge conflicts.
3 years ago
Thomas Eizinger 03078f328c
Split monero-harness into harness and rpc
This allows us to move `monero-harness` and `bitcoin-harness` into
`[dev-dependencies]` of `swap`.
3 years ago
Franck Royer 2dbd43e2c0
Only pass btc amount to CLI
The CLI requests a quote to nectar to know how much xmr it can get.
Also align terminology with the sequence diagram.
3 years ago
Franck Royer f2a25ee49b
Move definitions out of lib.rs 3 years ago
Daniel Karzel 3593f5323a Bob saves lock proof after received so he can resume swap 3 years ago
Franck Royer ae8134f04e
Replace amounts messages with swap res/req 3 years ago
Franck Royer 9a823dca4c
Do not introduced State6 3 years ago
Daniel Karzel 8615aaed6e Make lock-tx id available in redeem/punish state to be able to assert exact fees 3 years ago
rishflab dcea54dbf1 Move protocol parent states into appropriate module 3 years ago
rishflab e7c00d742e Re-export bitcoin and monero types 3 years ago
rishflab c900d12593 Merge xmr_btc crate
Created network, storage and protocol modules. Organised
files into the modules where the belong.

xmr_btc crate moved into isolated modulein swap crate.

Remove the xmr_btc module and integrate into swap crate.

Consolidate message related code

Reorganise imports

Remove unused parent Message enum

Remove unused parent State enum

Remove unused dependencies from Cargo.toml
3 years ago
Franck Royer 59708c57e6
Move Alice and Bob db states in separate modules 4 years ago