These are the steps needed to set up a local Haveno test network.
## 1. Download dependencies
1. Install git, git-lfs, and Java. On Ubuntu: `sudo apt install git git-lfs openjdk-11-jdk`
2. Download the Monero binaries. To make things easier, we provide two custom Monero binaries: `monerod` and `monero-wallet-rpc`. You can directly [download the software (Linux and Mac)](https://github.com/haveno-dex/monero/releases/tag/testing) or build the binaries yourself by cloning and building the `release-v0.17` branch of this repository: https://github.com/haveno-dex/monero
3. Download and install [Bitcoin-Qt](https://bitcoin.org/en/download).
## 2. Build Haveno
1. Download this repository. Run `git clone https://github.com/haveno-dex/haveno.git`
2. Navigate inside the repository (`cd haveno`) and start the build: `./gradlew build`. It will take some minutes. If you know what you are doing you can modify [WalletConfig.java](core/src/main/java/bisq/core/btc/setup/WalletConfig.java) with custom settings before building.
## 3. Run Monero
1. Unpack the downloaded or built archives from step 1.2 and copy `monero-wallet-rpc` to the root of this repository. Make sure it has the right permissions (if you are in doubt, just run `chmod 777 monero-wallet-rpc`).
2. Now join our shared stagenet (skip this command and see the next section if you prefer to test Haveno using a local private stagenet). Navigate into the folder containing `monerod` and run:
Haveno still relies on Bitcoin for its infrastructure. We will remove it soon. In the meantime, to run Haveno locally, you'll need to download Bitcoin QT and run it in regtest mode. Which means you won't need to download the Bitcoin blockchain.
1. Download and install [Bitcoin-Qt](https://bitcoin.org/en/download)
2. Run Bitcoin-Qt in regtest mode, e.g.: `./Bitcoin-Qt -regtest -peerbloomfilters=1`
3. Click on the *Console* tab and mine regtest blocks all at once. Run: `generatetoaddress 101 bcrt1q6j90vywv8x7eyevcnn2tn2wrlg3vsjlsvt46qz`
## 5. Run Haveno
Now that you have both Bitcoin and Monero running, it's time to spin up your testing instances. You'll need to open 4 terminal windows: 1 for the seed node, 1 for the arbitrator, 1 for Alice (trader 1) and 1 for Bob (trader 2).
Mining is the recommended method to receive new stagenet coins. The difficulty is locked to 10 so mining will be very fast. Go to your monerod instance and run `start_mining ADDRESS 1`. Monerod will start mining stagenet coins on your device using one thread. Replace `ADDRESS` with the address of Alice first, and then Bob's.