Commit Graph

178 Commits (ac0b0150e6a33f4213920c036e70f642f666ed8b)

Author SHA1 Message Date
Thomas Eizinger 1057d115d1
Re-order bob::event_loop based on importance
3 years ago
Thomas Eizinger cde3f0f74a
Remove connection handling from swap execution
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 f49f8977d3
Remove dead code
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 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
Thomas Eizinger c92f2dbc77
Move more domain knowledge onto the `TxCancel` type
3 years ago
bors[bot] 113f2fa385
Merge #322
3 years ago
Thomas Eizinger 09c41f89c4
Rename ExecutionParams to EnvironmentConfig
3 years ago
Thomas Eizinger bc43ed6ebd
Pass execution params directly into wallet for initialization
3 years ago
rishflab 8675d88727 Don't wait for tx lock confirmed after broadcast
3 years ago
Thomas Eizinger 273cf15631
Introduce `Watchable` abstraction for Bitcoin wallet
3 years ago
Thomas Eizinger a0830f099f
Pass relevant execution params into wallet instead of via functions
3 years ago
rishflab e5c0158597
Greatly reduce load onto the Electrum backend
3 years ago
Thomas Eizinger e17cbadccb
Don't add signatures to transaction unless necessary
3 years ago
Thomas Eizinger c2329b19a2
Tell the user more about the monero lock transaction
3 years ago
Thomas Eizinger 4138039ea0
Make sure all error messages start with an uppercase letter
3 years ago
Thomas Eizinger 5953037b81
Don't repeat the module name within the type
3 years ago
bors[bot] 20f2e56e2d
Merge #271
3 years ago
Daniel Karzel 47a31760c0 Bob can verify the Monero txs by tx-hash
3 years ago
Thomas Eizinger 601bf07255
Introduce `quote` protocol and display it to the user before they fund
3 years ago
Thomas Eizinger 3da01ea44a
Rename local variables according to new protocol name
3 years ago
Thomas Eizinger ead5db3f45
Re-order fields to group them semantically
3 years ago
Thomas Eizinger bc176bc4fb
Minor import optimizations
3 years ago
Thomas Eizinger 6d9b21cb47
Change `imports_granularity` to module
3 years ago
bors[bot] d1363d130c
Merge #265
3 years ago
Daniel Karzel d63790c2a6 Remove unnecessary monero wallet trait abstractions
3 years ago
Daniel Karzel 1041212a60 Work in review comments
3 years ago
Daniel Karzel 66c8401c95 Sweep all from generated wallet to user wallet
3 years ago
Thomas Eizinger 7042ed9441
Replace quote with spot-price protocol
3 years ago
Thomas Eizinger 089ac0806e
Simplify constructor of Bob's EventLoop
3 years ago
Thomas Eizinger 3ad9516188
Reduce logging when signing transactions
3 years ago
Thomas Eizinger 8c9b087e39
Unify logging of broadcasted transactions
3 years ago
Thomas Eizinger 3a503bf95f
Shorten function name
3 years ago
Thomas Eizinger 45cff81ea5
Remove traits in favor of using the wallet struct directly
3 years ago
Thomas Eizinger 06e3bccaa6
Don't print PeerId when requesting quote
3 years ago
Thomas Eizinger b7c3524b4f
Abort the eventloop if the dialling fails
3 years ago
Thomas Eizinger 6b74761e34
Remove tracing context
3 years ago
Thomas Eizinger bbbe5f7ae8
Demote / promote log messages to their appropriate level
3 years ago
Thomas Eizinger 7387884e6d
Move log messages to the appropriate abstraction layer
3 years ago
bors[bot] 5ddf41721e
Merge #238
3 years ago
Daniel Karzel bb1537d6f2 Error feedback for the user upon communication errors
3 years ago
Daniel Karzel e66e84085b Rename Bob's Behavior Failure to CommunicationError
3 years ago
Thomas Eizinger 67fe01a2ef
Remove `BuildTxLockPsbt` and `GetNetwork` traits
3 years ago
Thomas Eizinger 6c38d66864
Remove `Tx` arguments from `add_signatures` functions
3 years ago
Daniel Karzel 0945cee459 Remove traits in favour of public functions
3 years ago
Daniel Karzel 684cbe4d0b Remember monero wallet-height for Alice's refund scenario
3 years ago
Daniel Karzel fa04775188 Rename function explicit to cancellation to cancel
3 years ago
Daniel Karzel 1404057dbe Remove misleading TODO
3 years ago
Daniel Karzel 9f1deb9fdc Wrap the Monero wallet client in a Mutex
3 years ago
Thomas Eizinger 03078f328c
Split monero-harness into harness and rpc
3 years ago
Thomas Eizinger b47b06aa23 Import anyhow::Result across the codebase
3 years ago
Thomas Eizinger cabf0efb8c
Only construct proof system once
3 years ago
Thomas Eizinger 84bc2c82b7
Upgrade to bdk 4.0
3 years ago
Daniel Karzel babd1d7b60
Wait for refund if insufficient Monero is locked up
3 years ago
rishflab 180e778df9 Allow blockchain calls to fail
3 years ago
Franck Royer 2dbd43e2c0
Only pass btc amount to CLI
3 years ago
Franck Royer b4e2e11dde
Remove unnecessary fields
3 years ago
Franck Royer d6effb7d39
Remove unnecessary pub qualifiers
3 years ago
Franck Royer b8a84aa34b
Avoid possible mix up between timelocks
3 years ago
Franck Royer 9ded728879
The first message is actually a quote or rate request
3 years ago
Franck Royer bfc19d5628
Remove acknowledgements processing
3 years ago
Daniel Karzel c930ad84a4 Add --force flag for cancel and refund
3 years ago
Daniel Karzel ad2aefc2a5 Refund Command
3 years ago
Daniel Karzel 0600a7048e Cancel command
3 years ago
Franck Royer dee8c1e335
Remove scopes
3 years ago
Franck Royer eefb1b3b16
Use event_process = false for Bob
3 years ago
Franck Royer 554ae6c00e
Remove Request Response types
3 years ago
Franck Royer 5a5a1c05f7
Set appropriate name to codec
3 years ago
Franck Royer a11e894b31
Prepend all libp2p protocols with "comit"
3 years ago
Franck Royer cfc5cb5206
Remove dead code and combine swap request & one shot codecs
3 years ago
Franck Royer fc2d8d3861
Rename alice::Message0 to Message0
3 years ago
Franck Royer 88bf080dc0
rename alice::Message0 to Message1
3 years ago
Franck Royer 18f326ddd1
Rename bob::Message1 to Message2
3 years ago
Franck Royer 0d1be52966
Rename alice::Message1 to Message3
3 years ago
Franck Royer e74efd38b5
Rename bob::Message2 to Message4
3 years ago
Franck Royer 081237bb6f
Remove unused behaviours
3 years ago
Franck Royer 3fa4ffa82c
Implement new behaviour for execution setup
3 years ago
Franck Royer 9ae050abf8
Use correct variable name
3 years ago
Franck Royer e82383bcf6
Avoid carrying rng
3 years ago
Daniel Karzel 89b3775e05 Rename config to execution_params
3 years ago
Daniel Karzel 802dc61e7e Configuration for RPC urls and Bitcoin wallet name
3 years ago
Franck Royer c25d5ff07e
Improve network logging
3 years ago
Franck Royer cc76b201b5
Do not consider encrypted signature sent until it's ack'd
3 years ago
Franck Royer 704a8e7b01
Add swap id to tracing context
3 years ago
rishflab 77fc5743a2
Upgrade tokio to 1.0
3 years ago
Franck Royer 2929a8f101
Use the correct protocol support
3 years ago
Franck Royer b62ef9c2d9
Harmonizing naming
3 years ago
Franck Royer 8fd2620b83
Improve names for messages 4 and 5
3 years ago
Franck Royer a910bc2046
Box all messages in enum
3 years ago
Franck Royer d2a1937f51
Use `Message4`
3 years ago