Commit Graph

28 Commits

Author SHA1 Message Date
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.
2021-01-21 19:10:51 +11:00
bors[bot]
ca6ba78862
Merge #123
123: Small fixes after testnet usage r=da-kami a=D4nte



Co-authored-by: Franck Royer <franck@coblox.tech>
2021-01-11 04:25:26 +00:00
Daniel Karzel
0a21040e08 Deterministic peer id from seed for alice
This includes the introduction of the --data-dir parameter instead of the --database.
Both the seed file and the database are stored in the data-dir, the database in sub-folder `database`.
2021-01-11 12:00:48 +11:00
Franck Royer
9d8f8b0a1f
P2p socket should be listening for external connections 2021-01-11 11:35:51 +11:00
rishflab
e7c00d742e Re-export bitcoin and monero types 2021-01-08 12:34:36 +11:00
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
2021-01-08 12:34:33 +11:00
Daniel Karzel
8a2128e93a Correct monero-wallet-rpc parameter name 2021-01-05 11:00:15 +11:00
Franck Royer
1fa812b727
Separate Buy/Sell for resume command
To avoid confusing the user on whether person should enter a listen addr
or a connect peer id and address
2020-12-23 09:17:39 +11:00
Daniel Karzel
a692cf9299 Remove all short-codes because they don't add value at the moment 2020-12-22 18:10:13 +11:00
Franck Royer
1a4bd0e2b4
Bob refunds swap after restart that requires communication
As Bob is dialing Alice, we now ensure that we are connected to Alice
at each step that needs communication.
If we are not connected, we proceed with dialing.

In an attempt to improve libp2p usage, we also add known address of
Alice first and only use peer_id to dial.
This ensures that we use the expected peer id.
2020-12-21 08:31:21 +11:00
Daniel Karzel
e9681b6e2b Work in review comments 2020-12-17 19:10:24 +11:00
Daniel Karzel
6d03d1bbff Resume command and global database cl-parameter 2020-12-15 21:40:52 +11:00
Franck Royer
5ba830f3bf
Replace swap recover terminology with resume 2020-12-15 11:52:00 +11:00
Franck Royer
4ce8695dfc
Align with origin/database 2020-12-15 11:29:38 +11:00
Daniel Karzel
03b8e5f52e Upgrade CLI for mainnet test 2020-12-11 14:46:29 +11:00
rishflab
fcec465bdb Revert "No need to send Monero transfer proof from Alice to Bob" 2020-12-01 14:52:05 +11:00
rishflab
379aff50cf Fix rebase conflicts 2020-11-13 13:33:36 +11:00
Lucas Soriano del Pino
620216a596 Remove need to send Monero transfer proof from Alice to Bob 2020-11-13 13:15:02 +11:00
Lucas Soriano del Pino
bea99185ed Use correct default values for monerod_url*
*`monerod_url` is an incorrect name as it's actually a
`monero_wallet_rpc_url`. This is fixed in another branch.
2020-11-12 13:49:07 +11:00
Lucas Soriano del Pino
f0d90130ad Add recovery command 2020-11-12 13:49:07 +11:00
Lucas Soriano del Pino
09773dd15b Re-introduce history command 2020-11-12 13:49:07 +11:00
rishflab
a44303f839 Add monerod to config
Fixed rebase issues
2020-11-03 16:08:46 +11:00
rishflab
7afd316210 Construct tor transport for Bob 2020-11-03 15:13:25 +11:00
rishflab
3b008c38a6 Remove redundant code and stale comments 2020-11-03 15:13:25 +11:00
rishflab
796d0b3439 Extract transport creation and remove tor conditional compile
The numerous tor conditional compile flags were removed by
extracting transport creation to the main statement. A tor
transport is created if Alice specifies a tor port using the CLI.
2020-11-03 15:12:52 +11:00
rishflab
0ca511bf8a Remove hardcoded configuration
The hardcoded configuration was replaced with CLI
configuration options. CLI based config was chosen
over a config file as it does not access and clutter
the user's file system. By CLI options depend on whether
the program is run in Alice or Bob mode.
2020-11-03 15:08:10 +11:00
Philipp Hoenisch
8811a0a205
Add Tor to main 2020-10-27 15:03:59 +11:00
Tobin C. Harding
05766d3146 Add swap/
Add a binary crate `swap` that implements two nodes (Alice and Bob). With this
applied we can start up a node for each role and do:

- Bob: Requests current amounts using BTC is input
- Alice: Responds with amounts
- Bob: (mock) get user input to Ok the amounts

... continue with swap (TODO)
2020-10-16 10:05:06 +11:00