decred.org/dcrdex@v1.0.5/dex/testing/eth/README.md (about) 1 # Ethereum Test Harness 2 3 The harness is a collection of tmux scripts that collectively creates a 4 sandboxed environment for testing dex swap transactions. 5 6 ## Dependencies 7 8 The harness depends on [geth](https://github.com/ethereum/go-ethereum/tree/master/cmd/geth) 9 to run. geth v1.13.4+ is recommended. 10 11 It also requires tmux and bc. 12 13 ## Using 14 15 You must have `geth` in `PATH` to use the harness. 16 17 The harness script will create four connected private nodes. Two, alpha and 18 beta, have mining abilities and pre-funded addresses with syncmode set to 19 "fast". They are meant to be used with server functions. Two more, gamma and 20 delta, are "light" nodes without mining abilites and with addresses that have 21 been sent funds. They are intenended to be used with client functions. 22 23 ## Harness control scripts 24 25 The `./harness.sh` script will drop you into a tmux window in a directory 26 called `harness-ctl`. Inside of this directory are a number of scripts to 27 allow you to perform RPC calls against each wallet. 28 29 `./alpha`, `./beta`, `./gamma`, and `./delta` are just `geth` configured for 30 their respective data directories. 31 32 Try `./alpha attach`, for example. This will put you in an interactive console 33 with the alpha node. 34 35 `./quit` shuts down the nodes and closes the tmux session. 36 37 `./mine-alpha n` and `./mine-beta n` will mine n blocks on the respective node. 38 39 ## Dev Stuff 40 41 If things aren't looking right, you may need to look at the node windows to 42 see errors. In tmux, you can navigate between windows by typing `Ctrl+b` and 43 then the window number. The window numbers are listed at the bottom 44 of the tmux window. `Ctrl+b` followed by the number `1`, for example, will 45 change to the alpha node window. Examining the node output to look for errors 46 is usually a good first debugging step. 47 48 If you encouter a problem, the harness can be killed from another terminal with 49 `tmux kill-session -t eth-harness`.