Skip to content

Commit

Permalink
xmrswap: Work on testnet. (#2942)
Browse files Browse the repository at this point in the history
* xmrswap: Make separate clients.

* xmrswap: Work on testnet.
  • Loading branch information
JoeGruffins authored Feb 3, 2025
1 parent 553d2d0 commit 1200fbb
Show file tree
Hide file tree
Showing 4 changed files with 422 additions and 165 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ client/cmd/translationsreport/worksheets
server/cmd/dexadm/dexadm
client/tor/build
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 1200fbb

Please sign in to comment.