Skip to content

Commit

Permalink
xmrswap: Work on testnet.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGruffins committed Oct 4, 2024
1 parent 81d7c47 commit 0e3303a
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 45 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ server/cmd/dexadm/dexadm
server/cmd/geogame/geogame
internal/libsecp256k1/secp256k1
internal/cmd/xmrswap/xmrswap
internal/cmd/xmrswap/config.json
29 changes: 29 additions & 0 deletions internal/cmd/xmrswap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Intro

xmrswap performs adaptor signature swaps between dcr and xmr. There are four
tests; success, Alice bails before xmr init, refund, and Bob bails after xmr init.

## Requirements

dcrd, dcrwallet, dcrctl, monerod, monero-wallet-rpc, and monero-wallet-cli

## Simnet

Simnet requires that the dcr and xmr harnesses in /dcrdex/dex/testing be running.

## Testnet

Testnet requires a synced monerod running on --stagenet. It also requires three
monero-wallet-rpc running. Two of these must have wallets loaded, and
unlocked (--wallet-file). Alice must be funded. The third only needs to be
pointed to a directory (--wallet-dir).

It also requires two dcrd running on --testnet with bob being funded and unlocked.

The file example-config.json must be copied to config.json and correct locations
for your system filled in.

Testnet tests can be run with the --testnet flag.

Testnet tests take a long time to finish as they wait on monero funds being
available and dcr confirmations.
11 changes: 11 additions & 0 deletions internal/cmd/xmrswap/example-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"alice": {
"xmrhost": "http://127.0.0.1:28284/json_rpc",
"dcrconf": "/home/me/dextest/dcr/trading1/trading1.conf"
},
"bob": {
"xmrhost": "http://127.0.0.1:28184/json_rpc",
"dcrconf": "/home/me/dextest/dcr/trading2/trading2.conf"
},
"extraxmrhost": "http://127.0.0.1:28484/json_rpc"
}
Loading

0 comments on commit 0e3303a

Please sign in to comment.