support local, stagenet, and mainnet xmr network configuration (#335)

remove btc wallet
disable local zmq
This commit is contained in:
woodser 2022-07-07 09:10:59 -04:00 committed by GitHub
parent b4112e50e9
commit e2208355b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 595 additions and 899 deletions

View file

@ -1,6 +1,6 @@
# Running a local Haveno test network
These are the steps needed to set up a local Haveno test network. You'll have the possibility to either connect to our shared Monero stagenet node or to create your own private stagenet.
These are the steps needed to set up Haveno test instances.
## 1. Install dependencies
@ -11,42 +11,33 @@ On Ubuntu: `sudo apt install make wget git git-lfs openjdk-11-jdk`. The Bitcoin
1. Download this repository: `git clone https://github.com/haveno-dex/haveno.git`
2. Navigate to the root of the repository (`cd haveno`) and build the repository: run `make` in the terminal and wait until the process is completed (this will also download and verify the Monero and Bitcoin binaries).
## 3. Connect to Monero stagenet
## 3. Run a local XMR testnet
The easiest way to get a Monero stagenet running is by connecting to our own shared instance (3a) so you won't have to do anything except mine coins for testing (step 5). If you are testing or developing locally, we suggest you create your own local stagenet (3b).
### 3a. Join our shared stagenet
Run `make monero-shared`
### 3b. Run your own private stagenet
1. In a new terminal window run `make monero-private1`;
1. In a new terminal window run `make monero-private2`;
1. In a new terminal window run `make monerod-local1`
1. In a new terminal window run `make monerod-local2`
3. Now mine the first 130 blocks to a random address before using, so wallets only use the latest output type. Run in one of the terminal windows opened above:
`start_mining 56k9Yra1pxwcTYzqKcnLip8mymSQdEfA6V7476W9XhSiHPp1hAboo1F6na7kxTxwvXU6JjDQtu8VJdGj9FEcjkxGJfsyyah 1`
`start_mining 9tsUiG9bwcU7oTbAdBwBk2PzxFtysge5qcEsHEpetmEKgerHQa1fDqH7a4FiquZmms7yM22jdifVAD7jAb2e63GSJMuhY75 1`
## 4. Deploy
If you are a *screen* user, simply run `make deploy`. This command will open all needed Haveno instances (seednode, Alice, Bob, arbitrator) using *screen*. If this is the first time launching the arbitrator desktop application, register the arbitrator and mediator as explained in steps `5.3.1` and `5.3.2`.
If you are a *screen* user, simply run `make deploy`. This command will open all needed Haveno instances (seednode, Alice, Bob, arbitrator) using *screen*. If this is the first time launching the arbitrator desktop application, register the arbitrator as explained in step 3 below.
If you don't use *screen*, open 4 terminal windows and run in each one of them:
1. `make seednode`
2. `make arbitrator-desktop`
3. If this is the first time launching the arbitrator desktop application, register the arbitrator after the interface opens:
1. Go to the *Account* tab and press `cmd+r`. Confirm the registration of the arbitrator.
4. `make alice-desktop` or if you want to run Alice as a daemon: `make alice-daemon`
5. `make bob-desktop` or if you want to run Bob as a daemon: `make bob-daemon`
1. `make seednode-local`
2. `make arbitrator-desktop-local`
3. 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.
4. `make alice-desktop-local` or if you want to run Alice as a daemon: `make alice-daemon-local`
5. `make bob-desktop-local` or if you want to run Bob as a daemon: `make bob-daemon-local`
## 5. Fund your wallets
When running Alice and Bob, you'll see a Monero address prompted in the terminal. Send stagenet XMR to the addresses of both Alice and Bob to be able to initiate a trade.
When running Alice and Bob, you'll see a Monero address prompted in the terminal. Send local testnet XMR to the addresses of both Alice and Bob to be able to initiate a trade.
You can fund the two wallets by mining some stagenet XMR coins to those addresses. To do so, open a terminal where you ran monerod and run: `start_mining ADDRESS 1`.
You can fund the two wallets by mining some testnet XMR coins to those addresses. To do so, open a terminal where you ran monerod 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. 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 Alice first, and then Bob's. Run `stop_mining` to stop mining.
## 6. Start testing