Commit Graph

32 Commits (64ba8d6a871e3d431e53878e14200cd57f4736d9)

Author SHA1 Message Date
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
4 years ago
Franck Royer 69e1c2bb27
Align Alice DB states with swap states 4 years ago
Franck Royer 638143a10d
Replace hard coded port by dynamic available one
Fixes #84.
4 years ago
Daniel Karzel 43d05935e7 Remove tor module 4 years ago
Franck Royer 78674818c2
Upgrade bitcoin-harness 4 years ago
Franck Royer cfcd1e7170
Clean-up dep versions
- Use bitcoin-harness 0.2
- Use cross-curve-dleq latest master commit
4 years ago
Franck Royer 624716d8a7
Upgrade rust-bitcoin to 0.25 4 years ago
Franck Royer c3e43f50aa
Update bitcoin-harness to specific revision 4 years ago
Franck Royer 765482b0aa
Implement `wait_for_transaction_finality` 4 years ago
rishflab 1c401aad31 Fix clippy warnings and formatting 4 years ago
Franck Royer 9e13034e54 Extract execution details from driving loop 4 years ago
rishflab dd07e2f882 Add Alice execution path
Consolidate and simplify swap execution. Generators are no longer
needed. Consolidate recovery and swap data structures. The
recursive calls can be replaced with a loop if returning prior to
completion is desired for testing purposes.

Fill out alice abort path

Move state machine executors into seperate files

Not compiling due to recursion/async issues

Fix async recursion compilation errors

Fix Bob swap execution

Remove check for ack message from Alice. Seems like a bad idea to
rely on an acknowledgement message instead of looking at the
blockchain.

Fix Bob abort

Fix warnings

Xmr lock complete

Add TxCancel submit to XmrLocked

Bob swap completed

Remove alice
4 years ago
Lucas Soriano del Pino 6db40dce2a Implement swap recover function for Bob 4 years ago
Lucas Soriano del Pino 28225f8643 Implement swap recover function for Alice
This introduces a lot of duplication between the binary and the
library, but it's okay because this module should only be a temporary
measure until we allow recovery to be handled by the original state
machine.

Also, fix a bug in `xmr_btc::alice::action_generator` caused by the
incorrect assumption that Alice's ability to punish Bob could be
determined before the cancel transaction hits the blockchain.
4 years ago
Lucas Soriano del Pino ac2cfd7f65 Print swap history on --history flag 4 years ago
Lucas Soriano del Pino 02075c2a1d Support saving multiple swaps
By replacing `LAST_STATE_KEY` with a swap ID passed as an argument to
inserting and reading from the database.
4 years ago
rishflab ea08778b2f Save state for Bob at specific points in the swap 4 years ago
Philipp Hoenisch 70d64f74ae
Testcontainers upgrade 4 years ago
Philipp Hoenisch 0b9e8c145e
Update xmr-btc lib to use new monero-harness 4 years ago
rishflab 606c48c752 Format swap crate Cargo.toml 4 years ago
rishflab 796d0b3439 Extract transport creation and remove tor conditional compile
The numerous tor conditional compile flags were removed by
extracting transport creation to the main statement. A tor
transport is created if Alice specifies a tor port using the CLI.
4 years ago
Lucas Soriano del Pino 792fa351c8 Upgrade bitcoin-harness dependency
From dev-branch to master.
4 years ago
Tobin C. Harding b8ab4b4eee wip: add env filter 4 years ago
Lucas Soriano del Pino 9384b0cf3c [WIP] Swap app e2e test 4 years ago
Lucas Soriano del Pino 4ee82a5a2a Execute Alice's on-chain protocol after handshake
Co-authored-by: Tobin C. Harding <tobin@coblox.tech>
4 years ago
rishflab c781ee949d Move storage into application crate 4 years ago
Philipp Hoenisch 17b32fed90
Moving tor into swap 4 years ago
Tobin C. Harding 2059158dad Bump to libp2p v29 4 years ago
Tobin C. Harding bb94643943 Remove data from message until Message0 impl serde 4 years ago
Tobin C. Harding e7504de76c Add state0 -> state1 messages 4 years ago
Tobin C. Harding 08ec776daa Move monero/bitcoin modules to files 4 years ago
Tobin C. Harding 05766d3146 Add swap/
Add a binary crate `swap` that implements two nodes (Alice and Bob). With this
applied we can start up a node for each role and do:

- Bob: Requests current amounts using BTC is input
- Alice: Responds with amounts
- Bob: (mock) get user input to Ok the amounts

... continue with swap (TODO)
4 years ago