update build instructions for mainnet

This commit is contained in:
woodser 2024-08-24 13:45:42 -04:00
parent caebd58303
commit d74b0995d0

View File

@ -1,18 +1,19 @@
# Set up environment # Build and run Haveno
These are the steps needed to build Haveno and test it on our test network or locally. These are the steps needed to build and run Haveno. You can test it locally or on our test network using the official Haveno repository.
> [!note]
> Trying to use Haveno on mainnet?
>
> The official Haveno repository does not operate or endorse any mainnet network.
>
> Find a third party network and use their installer or build their repository. Alternatively [create your own mainnet network](create-mainnet.md).
## Install dependencies ## Install dependencies
On Linux and macOS, install Java JDK 21: On Ubuntu: `sudo apt install make wget git`
```
curl -s "https://get.sdkman.io" | bash
sdk install java 21.0.2.fx-librca
```
On Windows, install MSYS2 and Java JDK 21:
On Windows, first install MSYS2:
1. Install [MSYS2](https://www.msys2.org/). 1. Install [MSYS2](https://www.msys2.org/).
2. Start MSYS2 MINGW64 or MSYS MINGW32 depending on your system. Use MSYS2 for all commands throughout this document. 2. Start MSYS2 MINGW64 or MSYS MINGW32 depending on your system. Use MSYS2 for all commands throughout this document.
4. Update pacman: `pacman -Syy` 4. Update pacman: `pacman -Syy`
@ -21,12 +22,17 @@ On Windows, install MSYS2 and Java JDK 21:
64-bit: `pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake git` 64-bit: `pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake git`
32-bit: `pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake git` 32-bit: `pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake git`
6. `curl -s "https://get.sdkman.io" | bash`
7. `sdk install java 21.0.2.fx-librca` On all platforms, install Java JDK 21:
```
curl -s "https://get.sdkman.io" | bash
sdk install java 21.0.2.fx-librca
```
## Build Haveno ## Build Haveno
If it's the first time you are building Haveno, run the following commands to download the repository, the needed dependencies, and build the latest release: If it's the first time you are building Haveno, run the following commands to download the repository, the needed dependencies, and build the latest release. If using a third party network, replace the repository URL with theirs:
``` ```
git clone https://github.com/haveno-dex/haveno.git git clone https://github.com/haveno-dex/haveno.git
@ -45,15 +51,23 @@ git pull
make clean && make make clean && make
``` ```
Make sure to delete the folder with the local settings, as there are breaking changes between releases: ## Run Haveno
On **Linux**: remove everything inside `~/.local/share/haveno-*/xmr_stagenet/`, except the `wallet` folder. > [!note]
> When you run Haveno, your application folder will be installed to:
> * Linux: `~/.local/share/Haveno/`
> * macOS: `~/Library/Application\ Support/Haveno/`
> * Windows: `~\AppData\Roaming\Haveno\`
On **Mac**: remove everything inside `~/Library/Application\ Support/haveno-*/xmr_stagenet/`, except the `wallet` folder. ### Mainnet
On **Windows**: remove everything inside `~\AppData\Roaming\haveno-*/xmr_stagenet/`, except the `wallet` folder. If you are building a third party repository which supports mainnet, you can start Haveno with:
## Join the public test network ```
make haveno-desktop-mainnet
```
### Join the public test network
If you want to try Haveno in a live setup, launch a Haveno instance that will connect to other peers on our public test environment, which runs on Monero's stagenet (you won't need to download the blockchain locally). You'll be able to make test trades with other users and have a preview of Haveno's trade protocol in action. Note that development is very much ongoing. Things are slow and might break. If you want to try Haveno in a live setup, launch a Haveno instance that will connect to other peers on our public test environment, which runs on Monero's stagenet (you won't need to download the blockchain locally). You'll be able to make test trades with other users and have a preview of Haveno's trade protocol in action. Note that development is very much ongoing. Things are slow and might break.
@ -67,11 +81,11 @@ Steps:
6. Now if you are taking a trade you'll be asked to confirm you have sent the payment outside Haveno. Confirm in the app and wait for the confirmation of received payment from the other trader. 6. Now if you are taking a trade you'll be asked to confirm you have sent the payment outside Haveno. Confirm in the app and wait for the confirmation of received payment from the other trader.
7. Once the other trader confirms, deposits are sent back to the owners and the trade is complete. 7. Once the other trader confirms, deposits are sent back to the owners and the trade is complete.
# Run a local test network ### Run a local test network
If you are a developer who wants to test Haveno in a more controlled way, follow the next steps to build a local test environment. If you are a developer who wants to test Haveno in a more controlled way, follow the next steps to build a local test environment.
## Run a local XMR testnet #### Run a local XMR testnet
1. In a new terminal window run `make monerod1-local` 1. In a new terminal window run `make monerod1-local`
1. In a new terminal window run `make monerod2-local` 1. In a new terminal window run `make monerod2-local`
@ -79,7 +93,7 @@ If you are a developer who wants to test Haveno in a more controlled way, follow
`start_mining 9tsUiG9bwcU7oTbAdBwBk2PzxFtysge5qcEsHEpetmEKgerHQa1fDqH7a4FiquZmms7yM22jdifVAD7jAb2e63GSJMuhY75 1` `start_mining 9tsUiG9bwcU7oTbAdBwBk2PzxFtysge5qcEsHEpetmEKgerHQa1fDqH7a4FiquZmms7yM22jdifVAD7jAb2e63GSJMuhY75 1`
## Deploy #### Deploy
If you are a *screen* user, simply run `make deploy`. This command will open all needed Haveno instances (seednode, user1, user2, arbitrator) using *screen*. If you are a *screen* user, simply run `make deploy`. This command will open all needed Haveno instances (seednode, user1, user2, arbitrator) using *screen*.
@ -93,7 +107,7 @@ If you don't use *screen*, open 4 terminal windows and run in each one of them:
If this is the first time launching the arbitrator desktop application, register the arbitrator after the interface opens. Go to the *Account* tab and press `cmd+r`. Confirm the registration of the arbitrator. If this is the first time launching the arbitrator desktop application, register the arbitrator after the interface opens. Go to the *Account* tab and press `cmd+r`. Confirm the registration of the arbitrator.
## Fund your wallets #### Fund your wallets
When running user1 and user2, you'll see a Monero address prompted in the terminal. Send test XMR to the addresses of both user1 and user2 to be able to initiate a trade. When running user1 and user2, you'll see a Monero address prompted in the terminal. Send test XMR to the addresses of both user1 and user2 to be able to initiate a trade.
@ -101,6 +115,6 @@ You can fund the two wallets by mining some test XMR coins to those addresses. T
monerod will start mining local testnet coins on your device using one thread. Replace `ADDRESS` with the address of user1 first, and then user2's. Run `stop_mining` to stop mining. monerod will start mining local testnet coins on your device using one thread. Replace `ADDRESS` with the address of user1 first, and then user2's. Run `stop_mining` to stop mining.
## Start testing #### Start testing
You are all set. Now that everything is running and your wallets are funded, you can create test trades between user1 and user2. Remember to mine a few blocks after opening and accepting the test trade so the transaction will be confirmed. You are all set. Now that everything is running and your wallets are funded, you can create test trades between user1 and user2. Remember to mine a few blocks after opening and accepting the test trade so the transaction will be confirmed.