Commit Graph

21 Commits (5a3675a06fcafe2dcc2ab9ff2c0096423362431c)

Author SHA1 Message Date
rishflab 4ea5f347cc Remove flaky test
This test only passes sometimes and needs to have. It fails regularly
on a94c320021, a commit which just
shuffles modules around.
3 years ago
rishflab f511ff093c Make --force the default behaviour for manual recovery
Remove the force flag. There is a resume command that tries to
gracefully restarts the protocol and tries to execute the happy path.
Remove e2e tests which test the --force flag.
3 years ago
Daniel Karzel daa572e5bf
Move recovery commands in dedicated module
Less clutter in the folder structure.
3 years ago
Daniel Karzel 4deb96a3c5
ASB manual recovery commands
Adds `cancel`, `refund`, `punish`, `redeem` and `safely-abort` commands to the ASB that can be used to trigger the specific scenario for the swap by ID.
3 years ago
Daniel Karzel c976358c37
Multiple swaps with the same peer
- Swap-id is exchanged during execution setup. CLI (Bob) sends the swap-id to be used in his first message.
- Transfer poof and encryption signature messages include the swap-id so it can be properly associated with the correct swap.
- ASB: Encryption signatures are associated with swaps by swap-id, not peer-id.
- ASB: Transfer proofs are still associated to peer-ids (because they have to be sent to the respective peer), but the ASB can buffer multiple
- CLI: Incoming transfer proofs are checked for matching swap-id. If a transfer proof with a different swap-id than the current executing swap is received it will be ignored. We can change this to saving into the database.

Includes concurrent swap tests with the same Bob.

- One test that pauses and starts an additional swap after the transfer proof was received. Results in both swaps being redeemed after resuming the first swap.
- One test that pauses and starts an additional swap before the transfer proof is sent (just after BTC locked). Results in the second swap redeeming and the first swap being refunded (because the transfer proof on Bob's side is lost). Once we store transfer proofs that we receive during executing a different swap into the database both swaps should redeem.

Note that the monero harness was adapted to allow creating wallets with multiple outputs, which is needed for Alice.
3 years ago
Daniel Karzel 084fc618b4 Test Alice refunds if restarted and Bob refunded 3 years ago
Daniel Karzel 2135a6e53e
Alice resumes swaps 3 years ago
Thomas Eizinger 8767af8dd3
Simplify matrix for test job 3 years ago
Thomas Eizinger cde3f0f74a
Remove connection handling from swap execution
The swap should not be concerned with connection handling. This is
the responsibility of the overall application.

All but the execution-setup NetworkBehaviour are `request-response`
behaviours. These have built-in functionality to automatically emit
a dial attempt in case we are not connected at the time we want to
send a message. We remove all of the manual dialling code from the
swap in favor of this behaviour.

Additionally, we make sure to establish a connection as soon as the
EventLoop gets started. In case we ever loose the connection to Alice,
we try to re-establish it.
3 years ago
Daniel Karzel d85c0ce57c Re-introduce punish test 3 years ago
Daniel Karzel 222724b59a Update bors config
Add armv build check to bors.
Update build and test names due to matix configuration changes.
3 years ago
rishflab e9b56934e8 Add windows to release and build workflow 3 years ago
Thomas Eizinger f1b097877b
Split `build_test` into `build` and `test`
Building binaries and building tests results in different artifacts
inside the `target` directory. If we use distinct caches for these
commands, the caches are more useful because less code has to be
re-built.
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
The punish test needs re-work due to the fact that Alice runs continuously

Currently focusing on the CLI (Bob), so we can re-introduce this test
once we want to ensure that nectar (Alice) punishes.
3 years ago
Franck Royer 3bc8b58b6a
Remove Bob restart tests after communication
The test do not work without acks as we stop the event loop as soon
as a message is considered as "sent" when actually the event loop
and swarm may not have yet sent the message.

The ack allow to avoid this issue as the message was considered "sent"
only once the other party sent a response. However, the ack brings
other issue so a review needs to be done to select the appropriate
solution.
3 years ago
Franck Royer fd9f633a77
Remove Alice restarts tests
Current focus is on CLI UX. Fair amount of change needs to happen to
cater for Alice (nectar) restart scenarios.
3 years ago
Franck Royer 80810e3605
Updates bors to include all docker tests 3 years ago
Franck Royer 1d806b9661
Update bors with the current jobs 4 years ago
Lucas Soriano del Pino 1f99cf001c Swap Monero for Bitcoin
Co-authored-by: rishflab <rishflab@hotmail.com>
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
Co-authored-by: Tobin C. Harding <tobin@coblox.tech>
4 years ago