Commit Graph

31 Commits (1404057dbe68b60594f1f663d664c659fed6f694)

Author SHA1 Message Date
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`.
4 years ago
Thomas Eizinger b47b06aa23 Import anyhow::Result across the codebase
There is no need to fully qualify this type because it is a type
alias for std::Result. We can mix and match the two as we want.
4 years ago
Thomas Eizinger cabf0efb8c
Only construct proof system once
The proof system is a static element and can be reused several times.
4 years ago
Thomas Eizinger 84bc2c82b7
Upgrade to bdk 4.0
To achieve this we also:

- upgrade rust-bitcoin to 0.26
- upgrade bitcoin-harness to latest version (which also depends bitcoin 0.26)
- upgrade to latest edcsa-fun
- replace cross_curve_dleq proof with sigma_fun (to avoid an upgrade dance over there)
4 years ago
Daniel Karzel babd1d7b60
Wait for refund if insufficient Monero is locked up 4 years ago
rishflab 180e778df9 Allow blockchain calls to fail
Prior to this change, functions could not fail early on permanent errors eg. parsing a url. Merged error enums.
4 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.
4 years ago
Franck Royer b4e2e11dde
Remove unnecessary fields 4 years ago
Franck Royer d6effb7d39
Remove unnecessary pub qualifiers 4 years ago
Franck Royer b8a84aa34b
Avoid possible mix up between timelocks
Introduce new type to ensure no mix up happens when ordering the fields
in function calls.
4 years ago
Franck Royer fc2d8d3861
Rename alice::Message0 to Message0
There is now only one message0
4 years ago
Franck Royer 88bf080dc0
rename alice::Message0 to Message1 4 years ago
Franck Royer 18f326ddd1
Rename bob::Message1 to Message2
As per sequence diagram.
4 years ago
Franck Royer 0d1be52966
Rename alice::Message1 to Message3
As per sequence diagram.
4 years ago
Franck Royer e74efd38b5
Rename bob::Message2 to Message4
As per sequence diagram.
4 years ago
Franck Royer e82383bcf6
Avoid carrying rng 4 years ago
Daniel Karzel 89b3775e05 Rename config to execution_params 4 years ago
Daniel Karzel 802dc61e7e Configuration for RPC urls and Bitcoin wallet name 4 years ago
Franck Royer 8fd2620b83
Improve names for messages 4 and 5 4 years ago
Franck Royer 9a5e35c1bd
Rename `bob::Message2` to `Message5`
As per the proposed changed in the sequence diagram.
The aim is to have a unique terminology per message instead of having
the same name for 2 consequent messages that share the same behaviour.

Note that the aim is to remove the shared `RequestResponse` behaviours.
4 years ago
Franck Royer f2a25ee49b
Move definitions out of lib.rs 4 years ago
Daniel Karzel 3593f5323a Bob saves lock proof after received so he can resume swap 4 years ago
Daniel Karzel 44c4b5dcea Remove newlines from import statements to avoid problems
Rust fmt automatically groups the imports (from top to bottom) as `pub use` `use crate` and `use`.
There is no need to introduce sections which cause annoyance when auto importing using the IDE.
4 years ago
Daniel Karzel 8a7d746e96 Wait for Bob's refund finality
For Alice we ensure to wait for redeem/punish finality, so it should be the same for Bob.
4 years ago
Franck Royer 9a823dca4c
Do not introduced State6 4 years ago
Daniel Karzel 8615aaed6e Make lock-tx id available in redeem/punish state to be able to assert exact fees 4 years ago
Daniel Karzel af45206fde Remember the block-height before XMR lock for generated monero wallet restore height
Speeds up wallet creation, because only the blocks after the recorded height will be scanned.
4 years ago
rishflab dcea54dbf1 Move protocol parent states into appropriate module 4 years ago
rishflab f64eede5d8 Move monero ser/deser to monero module 4 years ago
rishflab e7c00d742e Re-export bitcoin and monero types 4 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
4 years ago