xmr-btc-swap/xmr-btc
rishflab 39afb4196b Save and recover protocol state from disk
NOTE: This implementation saves secrets to disk! It is not
secure.

The storage API allows the caller to atomically record the state
of the protocol. The user can retrieve this recorded state and
re-commence the protocol from that point. The state is recorded
using a hard coded key, causing it to overwrite the previously
recorded state. This limitation means that this recovery
mechanism should not be used in a program that simultaneously
manages the execution of multiple swaps.

An e2e test was added to show how to save, recover and resume
protocol execution. This logic could also be integrated into the
run_until functions to automate saving but was not included at
this stage as protocol execution is currently under development.

Serialisation and deserialisation was implemented on the states
to allow the to be stored using the database. Currently the
secret's are also being stored to disk but should be recovered
from a seed or wallets.
2020-10-21 18:39:45 +11:00
..
src Save and recover protocol state from disk 2020-10-21 18:39:45 +11:00
tests Save and recover protocol state from disk 2020-10-21 18:39:45 +11:00
Cargo.toml Save and recover protocol state from disk 2020-10-21 18:39:45 +11:00