Commit Graph

741 Commits (0c616c74379d572a343dead39cb5dfd5b38d03b7)

Author SHA1 Message Date
Daniel Karzel f70e2aa8d6
Listen on tcp and websocket transports
3 years ago
Thomas Eizinger b417950f99
Improve error reporting of failed protocols
3 years ago
Thomas Eizinger f0f7288bb6
Introduce a `redial::Behaviour`
3 years ago
Thomas Eizinger d4c10a1292
Introduce swarm::{alice,bob} function to construct a Swarm instance
3 years ago
bors[bot] 19766b9759
Merge #405
3 years ago
Daniel Karzel c976358c37
Multiple swaps with the same peer
3 years ago
bors[bot] 2f19222948
Merge #397
3 years ago
Daniel Karzel 489696ee08
Swap-id as file name for generated Monero wallet
3 years ago
Daniel Karzel 548f057726
Try to open wallet in case generate_from_keys fails
3 years ago
Daniel Karzel b60790a32c
Allow buffering multiple transfer proofs per peer
3 years ago
rishflab 8805002f96 Remove redundant noun from tracing initialiser functions
3 years ago
rishflab 9745d150e7 Log at debug level to file
3 years ago
rishflab e517c5934e Move asb tracing initializer to asb module
3 years ago
bors[bot] 32912ebd4a
Merge #394
3 years ago
bors[bot] f0a8be6835
Merge #396
3 years ago
rishflab 9b0467d43a Remove default connection details from CLI
3 years ago
bors[bot] e0b859bb1e
Merge #387
3 years ago
Thomas Eizinger a99d12b9df
Add a configurable spread to the ASB
3 years ago
Thomas Eizinger 3e0301a9d4
Move `FixedRate` into event_loop module
3 years ago
Thomas Eizinger 654cfff2a8
Make `kraken` module emit `PriceUpdate`s instead of `Rate`s
3 years ago
Thomas Eizinger cfc530e8ab
Make `ask` field of `Rate` private
3 years ago
Thomas Eizinger bc46d95985
Remove unnecessary `Serialize` implementations
3 years ago
Daniel Karzel 0341e7c9fc
Point BDK to commit that fixes overflow error
3 years ago
rishflab 7df93faa4b Remove unnecessary wrapper struct
3 years ago
Daniel Karzel 04b49d7117 Add command to print Bitcoin and Monero balance
3 years ago
Daniel Karzel 96008ec130 Add command to withdraw BTC
3 years ago
Daniel Karzel f5e81bb0ee Move seed and env_config outside Start command
3 years ago
Daniel Karzel d9d697821e Separate bitcoin and monero wallet initialization
3 years ago
Thomas Eizinger 1b2f476cae
Have `--force` flag only override the timelock check
3 years ago
Thomas Eizinger 24f444b9f7
Race sending transfer proof against cancel timelock
3 years ago
Thomas Eizinger c0785ab05a
"Buffer" all requests to Alice until we are connected
3 years ago
Thomas Eizinger 1b0c29b424
Use bmrng to model communicaton of Alice's EventLoop with the handle
3 years ago
Thomas Eizinger 1c47b32681
Use bmrng to model communicaton of Bob's EventLoop with the handle
3 years ago
Thomas Eizinger 958e5b12bc
Don't match on expired_timelocks and race it in a select in parallel
3 years ago
Thomas Eizinger dbe03ba1cf
Timeout Bob's execution-setup after 10 seconds
3 years ago
Thomas Eizinger 5d75f1adba
Remove import line in favor of FQ macro usage
3 years ago
Thomas Eizinger 4c2e254543
Don't log subscription
3 years ago
Thomas Eizinger 5b230bc75f
Don't import tracing macros
3 years ago
Thomas Eizinger 90a7760124
Add some log statements to bob::cancel
3 years ago
Thomas Eizinger 3f54b39281
Make all error messages start with an uppercase letter
3 years ago
Thomas Eizinger 0ef9d97679
Remove delegation functions in favor of public fields
3 years ago
Thomas Eizinger b1d0ae8db7
Remove dead code
3 years ago
Daniel Karzel 2135a6e53e
Alice resumes swaps
3 years ago
Daniel Karzel d233e9914e
Avoid problems when re-ordering / changing Bob's states
3 years ago
Daniel Karzel e6dd194f77
next_state loop always exits in final state
3 years ago
Daniel Karzel d90496931b
Save Alice's peer-id in the db for Bob
3 years ago
Daniel Karzel bc442bcad3
Await 10 confirmations of lock tx in refund
3 years ago
Daniel Karzel 1c129d58c4
Distinguish loading all swaps for alice or bob on db level
3 years ago
Daniel Karzel 183e8f02de
Wait for lock tx and send transfer proof in separate state
3 years ago
Daniel Karzel dfd69c9c80
Alice aborts if any timelock expired before locking XMR
3 years ago
Thomas Eizinger 52b9a78de2
Alice to validate Bob's PSBT for correctness
3 years ago
Thomas Eizinger 8576894c10
Split bitcoin::Wallet functions into various impl blocks
3 years ago
Thomas Eizinger 11b45cd8c0
Move messages into `protocol` module
3 years ago
Thomas Eizinger e130448200
Make as many fields of Alice's states private as possible
3 years ago
Thomas Eizinger 7f5715e147
Remove unnecessary serde implementations
3 years ago
Thomas Eizinger c539465925
Make it possible to create random public keys
3 years ago
rishflab 86f312e143 Safely abort swap if TxLock is not confirmed in a reasonable time
3 years ago
Thomas Eizinger 01739eddb1
Introduce a more flexible transaction subscription system
3 years ago
bors[bot] 6fb495b6ab
Merge #383 #385 #386
3 years ago
bors[bot] a18c071559
Merge #384
3 years ago
Thomas Eizinger c01cccb288
Use `tracing-log` feature flag instead of manual initialization
3 years ago
Thomas Eizinger c5827f84ca
Refactor recursive function to loop
3 years ago
Thomas Eizinger fc175a3f53
De-couple state from Monero wallet
3 years ago
Thomas Eizinger 42b6368298
Use full-qualified path for tracing macros
3 years ago
Thomas Eizinger 5616683d7d
Monero confirmations are a u64
3 years ago
Thomas Eizinger 1b63d5486d
Move tick to the beginning of the loop
3 years ago
Thomas Eizinger 393ed45b9e
Say who we are in the `--help` message
3 years ago
Thomas Eizinger 39b27e37d8
Delete empty file
3 years ago
rishflab a3e85526c6 Specify LANG env variable for monero wallet rpc for unix systems
3 years ago
rishflab bc902ea63a Use language agnostic heuristic to check if monero_wallet_rpc is ready
3 years ago
bors[bot] 7397cb5990
Merge #359
3 years ago
bors[bot] 9c9b1e4f0c
Merge #370
3 years ago
Thomas Eizinger 1057d115d1
Re-order bob::event_loop based on importance
3 years ago
Thomas Eizinger 638a169a04
Buffer transfer proof if we are not connected to Bob
3 years ago
Thomas Eizinger cde3f0f74a
Remove connection handling from swap execution
3 years ago
Daniel Karzel 1e2a3c2d32 No Bitcoin deposit for Alice
3 years ago
Thomas Eizinger 804b34f6b0
Listen on all swarm events instead of just behaviour events
3 years ago
Thomas Eizinger 2200fce3f3
Pass Swarm into EventLoop
3 years ago
Thomas Eizinger 2c9ab4f6eb
Improve code structure and error messages for running swaps
3 years ago
Thomas Eizinger 0c0a322a8f
Rename module to better represent what it contains
3 years ago
Thomas Eizinger 1de0b39b32
Unify encrypted-signature protocol to a single one
3 years ago
Thomas Eizinger 9979cc9f1f
Unify transfer-proof protocol to a single one
3 years ago
Thomas Eizinger 9d0b9abde0
Introduce helper function for mapping RequestResponseEvent
3 years ago
Thomas Eizinger 73f30320a6
Seed should neither be Clone nor Copy
3 years ago
Thomas Eizinger 96b2a76971
Take advantage of upgraded electrum-client dependency
3 years ago
bors[bot] 968502827a
Merge #339
3 years ago
bors[bot] 097197783c
Merge #351
3 years ago
bors[bot] 189a13c063
Merge #319
3 years ago
Daniel Karzel 62079fc342 Punish scenario falls back to refund or fails
3 years ago
Thomas Eizinger a228349d8b
Bump dependency versions
3 years ago
Daniel Karzel 668d34080d Show the actual BTC amount and fee to be swapped
3 years ago
Thomas Eizinger f49f8977d3
Remove dead code
3 years ago
Daniel Karzel 396c4177a6 Alice sweeps refunded funds into default wallet
3 years ago
Thomas Eizinger 16dfea035b
Simplify code within BobState::XmrLockProofReceived
3 years ago
Thomas Eizinger 338f4b82e5
Introduce dedicated bob::State6 for cancelling
3 years ago
Thomas Eizinger c32ef92cf5
Simplify code within BobState::EncSigSent
3 years ago
Thomas Eizinger 09e2d5b5d7
Simplify code within BobState::XmrLocked
3 years ago
Thomas Eizinger 776a50137d
Use tokio::select macro instead of function
3 years ago
Thomas Eizinger b1affe3ecf
Insert latest state and call run_until only once
3 years ago
Thomas Eizinger 0d8962762a
Use early return to reduce one level of indentation
3 years ago