Commit Graph

224 Commits (8576894c1074751c96be277de7f5092aeaddad15)

Author SHA1 Message Date
Franck Royer 92b3df4158 Introduce dynamic rates
3 years ago
bors[bot] 0359f8fbc0
Merge #216
3 years ago
Daniel Karzel bdb35c310d To avoid CI failure wait for the balance instead of sleep
3 years ago
Thomas Eizinger 84bc2c82b7
Upgrade to bdk 4.0
3 years ago
Thomas Eizinger 8c83f7e2e1
Upgrade to testcontainers v0.12
3 years ago
rishflab 4768c79070 Derive bitcoin private key from seed
3 years ago
rishflab 180e778df9 Allow blockchain calls to fail
3 years ago
rishflab a0ef1f96ec Replace bitcoind wallet with bdk wallet
3 years ago
Franck Royer 2dbd43e2c0
Only pass btc amount to CLI
3 years ago
Franck Royer b8a84aa34b
Avoid possible mix up between timelocks
3 years ago
Franck Royer 65e0e5b731
Use Remote handle to access ongoing swaps on Alice
3 years ago
Franck Royer 8fada42074
Make `config` argument global
3 years ago
Franck Royer eb39add5ff
Fix typo
3 years ago
Franck Royer 6e6dc320b4
Alice event loop now handles the creation of new swaps
3 years ago
Franck Royer 15eb9a2fe4
Remove punish test
3 years ago
Franck Royer 3bc8b58b6a
Remove Bob restart tests after communication
3 years ago
Franck Royer fd9f633a77
Remove Alice restarts tests
3 years ago
Daniel Karzel 86290649e7 work in review comments
3 years ago
Daniel Karzel c930ad84a4 Add --force flag for cancel and refund
3 years ago
Daniel Karzel 02f8eb7f18 Add test for cancel/refund before timelock expired
3 years ago
Daniel Karzel 2d5d70d856 Timeout for Alice waiting for ack for sending transfer proof
3 years ago
Daniel Karzel c9adbde5d5 Add test for Bob's manual cancel and refund
3 years ago
Franck Royer c316ea5244
Upgrade toolchain
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 108cc1e6cc
Use trait instead of passing struct
3 years ago
Franck Royer b8a9356d1b
Change expiries depending on the test goal
3 years ago
Franck Royer 49b8d19e41
test: Log state on failure
3 years ago
rishflab 1597f5336b
Restart event loop in tests
3 years ago
rishflab 77fc5743a2
Upgrade tokio to 1.0
3 years ago
Franck Royer f2a25ee49b
Move definitions out of lib.rs
4 years ago
Daniel Karzel 33a9057b1f Move run_until is_target_state comparison functions into testutils
4 years ago
Daniel Karzel 3593f5323a Bob saves lock proof after received so he can resume swap
4 years ago
Daniel Karzel 433704e48c Top to bottom `pub mod` then `mod` then `pub use` then `use` (incl. `use crate` and `use self`)
4 years ago
Daniel Karzel 6a75c840b5 Fix Alice redeem scenario
4 years ago
Daniel Karzel 8a7d746e96 Wait for Bob's refund finality
4 years ago
Franck Royer 94045b9a69
Use builder in tests
4 years ago
Franck Royer c11042ff0d
Use `builder` terminology instead of `factory`
4 years ago
Franck Royer 9148af2dbe
`bob::SwapFactory` should be consumed once a swap is returned
4 years ago
Franck Royer b21dc03ed0
`alice::SwapFactory` should be consumed once a swap is returned
4 years ago
Franck Royer 9e3ef7ea24
Remove `StartingBalances` from release code
4 years ago
Franck Royer 181999e04f
Remove unnecessary `alice` qualifiers in `alice::SwapFactor`
4 years ago
Franck Royer f0e6e45d56
Remove unecessary `bob` qualifier
4 years ago
Franck Royer e26629b593
Remove unecessary fields from `bob::SwapFactory`
4 years ago
Franck Royer 96b1b18037
Keep terminology consistent
4 years ago
Daniel Karzel 37f619dbfc Move StartingBalances into protocol module
4 years ago
Daniel Karzel acfd43ee79 Rename Test to TestContext and argument to ctx
4 years ago
Daniel Karzel 82974412b2 Remove roles from SwapFactory name as implied by module and cleanup
4 years ago
Daniel Karzel 75f89f3b25 Use Bob swap factory in production
4 years ago
Daniel Karzel 3398ef8236 Use Alice swap factory in production
4 years ago
Daniel Karzel 67e925fe1f Refactor Bob's peer-id and identity to be handled on the outside
4 years ago
Daniel Karzel 0c19af9090 Refactor Alice's peer-id and identity to be handled on the outside
4 years ago
Daniel Karzel 8bf467b550 Make the factory code usable in production
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 317b251302 Re-arrange order of structs/functions in testutils
4 years ago
Daniel Karzel 7832ee94f3 Remove unused code and only expose necessary functionality
4 years ago
Daniel Karzel 8ef8240771 Refactor refund test
4 years ago
Daniel Karzel 55024572ae Refactor punish test and punish assertions
4 years ago
Daniel Karzel 73a2841ec5 Refactor happy path bob restart tests
4 years ago
Daniel Karzel 8a2eb07928 Harmonize names and structure
4 years ago
Daniel Karzel bede1c13dd Refactor Bob's side (happy path + alice restart)
4 years ago
Daniel Karzel 59f9a1c286 Fix usage of StartingBalance in Alice and Bob
4 years ago
Daniel Karzel 87edec0d50 Rename Alice's factory to harness and include redeem assertions
4 years ago
Daniel Karzel 152c8d7eba Refactor Alice restart test by introducing factory for creating Alices
4 years ago
rishflab 537d05e01e Add reusable test function
4 years ago
rishflab f5cfe014be Fix imports
4 years ago
Daniel Karzel 664958939d Create network::Seed from swap::Seed instead of abstracting over byte array
4 years ago
Daniel Karzel f18d01dfaf Deterministic peer id from seed for bob
4 years ago
Daniel Karzel 0a21040e08 Deterministic peer id from seed for alice
4 years ago
rishflab dcea54dbf1 Move protocol parent states into appropriate module
4 years ago
rishflab c900d12593 Merge xmr_btc crate
4 years ago
Daniel Karzel 487b880371 Cleanup unused config param that was accidentally introduced
4 years ago
Daniel Karzel e031681369 Add minimum monero confirmations to config use it for Bob
4 years ago
Daniel Karzel 4d9559fc2e Monero network settings and testnet
4 years ago
Franck Royer e1e8533862
Embed state mod in database mod
4 years ago
Franck Royer 59708c57e6
Move Alice and Bob db states in separate modules
4 years ago
Franck Royer b410de01df
Move state.rs under database module
4 years ago
Franck Royer 8c7964bfee
Rename storage.rs to database.rs to reduce terminology variants
4 years ago
Franck Royer 4150e75488
Replace `Try_From` state conversion with `From` for Bob
4 years ago
Franck Royer e541f7b83d
Replace `TryFrom` with `From` for Alice states
4 years ago
Franck Royer a31db63e54
Improve state names and display
4 years ago
Franck Royer f0736d0906
Remove Refund timelock and T0/T1/T2
4 years ago
Franck Royer 405e377f79
Rename `EncSign` to `EncSig`
4 years ago
Franck Royer 297b15e3ce
Remove async block when it is not needed
4 years ago
Franck Royer e079b84500
Ensure we wait for other party to complete
4 years ago
Daniel Karzel 8296490764
Merge pull request #111 from comit-network/trace-xmr-btc
4 years ago
Daniel Karzel 5f8b7f2624 Fix tracing subscribe filter for xmr-btc`
4 years ago
Franck Royer 49b84d84b9
Add address at the start
4 years ago
Franck Royer 1e4b115556
Separate Bob restart tests
4 years ago
Franck Royer e366d3a73b
Join all futures to avoid hanging tests
4 years ago
Franck Royer 1a4bd0e2b4
Bob refunds swap after restart that requires communication
4 years ago
Franck Royer d9ea7ab605
Only carry the tx_lock_id instead of the full state
4 years ago
Franck Royer edfab58246
Scope alice db
4 years ago
Franck Royer dc96b3d1e9
Stop running first event loop after Alice restarts
4 years ago
Franck Royer 638143a10d
Replace hard coded port by dynamic available one
4 years ago
Franck Royer 2212758d17
Rename refund test as it is alice specific
4 years ago
bors[bot] 3db71997d3
Merge #99
4 years ago
Daniel Karzel 773eebc723 Cleanup resume_from_database functions only used in tests
4 years ago
Daniel Karzel 43d05935e7 Remove tor module
4 years ago