mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
add instructions to join shared testnet
This commit is contained in:
parent
b89c0d720b
commit
8a7d08e04d
40
Makefile
40
Makefile
@ -28,8 +28,8 @@ deploy:
|
||||
# deploy each node in its own named screen window
|
||||
for target in \
|
||||
seednode-local \
|
||||
alice-desktop-local \
|
||||
bob-desktop-local \
|
||||
user1-desktop-local \
|
||||
user2-desktop-local \
|
||||
arbitrator-desktop-local; do \
|
||||
screen -S localnet -X screen -t $$target; \
|
||||
screen -S localnet -p $$target -X stuff "make $$target\n"; \
|
||||
@ -135,47 +135,47 @@ arbitrator-desktop2-local:
|
||||
--apiPassword=apitest \
|
||||
--apiPort=10001
|
||||
|
||||
alice-daemon-local:
|
||||
user1-daemon-local:
|
||||
./haveno-daemon \
|
||||
--baseCurrencyNetwork=XMR_LOCAL \
|
||||
--useLocalhostForP2P=true \
|
||||
--useDevPrivilegeKeys=true \
|
||||
--nodePort=5555 \
|
||||
--appName=haveno-XMR_LOCAL_Alice \
|
||||
--appName=haveno-XMR_LOCAL_user1 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=9999 \
|
||||
--walletRpcBindPort=38091 \
|
||||
--passwordRequired=false
|
||||
|
||||
alice-desktop-local:
|
||||
user1-desktop-local:
|
||||
./haveno-desktop \
|
||||
--baseCurrencyNetwork=XMR_LOCAL \
|
||||
--useLocalhostForP2P=true \
|
||||
--useDevPrivilegeKeys=true \
|
||||
--nodePort=5555 \
|
||||
--appName=haveno-XMR_LOCAL_Alice \
|
||||
--appName=haveno-XMR_LOCAL_user1 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=9999 \
|
||||
--walletRpcBindPort=38091
|
||||
|
||||
bob-desktop-local:
|
||||
user2-desktop-local:
|
||||
./haveno-desktop \
|
||||
--baseCurrencyNetwork=XMR_LOCAL \
|
||||
--useLocalhostForP2P=true \
|
||||
--useDevPrivilegeKeys=true \
|
||||
--nodePort=6666 \
|
||||
--appName=haveno-XMR_LOCAL_Bob \
|
||||
--appName=haveno-XMR_LOCAL_user2 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=10000 \
|
||||
--walletRpcBindPort=38092
|
||||
|
||||
bob-daemon-local:
|
||||
user2-daemon-local:
|
||||
./haveno-daemon \
|
||||
--baseCurrencyNetwork=XMR_LOCAL \
|
||||
--useLocalhostForP2P=true \
|
||||
--useDevPrivilegeKeys=true \
|
||||
--nodePort=6666 \
|
||||
--appName=haveno-XMR_LOCAL_Bob \
|
||||
--appName=haveno-XMR_LOCAL_user2 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=10000 \
|
||||
--walletRpcBindPort=38092 \
|
||||
@ -220,59 +220,59 @@ arbitrator-desktop-stagenet:
|
||||
--apiPassword=apitest \
|
||||
--apiPort=9998
|
||||
|
||||
alice-daemon-stagenet:
|
||||
user1-daemon-stagenet:
|
||||
./haveno-daemon \
|
||||
--baseCurrencyNetwork=XMR_STAGENET \
|
||||
--useLocalhostForP2P=false \
|
||||
--useDevPrivilegeKeys=false \
|
||||
--nodePort=5555 \
|
||||
--appName=haveno-XMR_STAGENET_Alice \
|
||||
--appName=haveno-XMR_STAGENET_user1 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=9999 \
|
||||
--walletRpcBindPort=38091 \
|
||||
--passwordRequired=false
|
||||
|
||||
alice-desktop-stagenet:
|
||||
user1-desktop-stagenet:
|
||||
./haveno-desktop \
|
||||
--baseCurrencyNetwork=XMR_STAGENET \
|
||||
--useLocalhostForP2P=false \
|
||||
--useDevPrivilegeKeys=false \
|
||||
--nodePort=5555 \
|
||||
--appName=haveno-XMR_STAGENET_Alice \
|
||||
--appName=haveno-XMR_STAGENET_user1 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=9999 \
|
||||
--walletRpcBindPort=38091
|
||||
|
||||
bob-daemon-stagenet:
|
||||
user2-daemon-stagenet:
|
||||
./haveno-daemon \
|
||||
--baseCurrencyNetwork=XMR_STAGENET \
|
||||
--useLocalhostForP2P=false \
|
||||
--useDevPrivilegeKeys=false \
|
||||
--nodePort=6666 \
|
||||
--appName=haveno-XMR_STAGENET_Bob \
|
||||
--appName=haveno-XMR_STAGENET_user2 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=10000 \
|
||||
--walletRpcBindPort=38092 \
|
||||
--passwordRequired=false
|
||||
|
||||
bob-desktop-stagenet:
|
||||
user2-desktop-stagenet:
|
||||
./haveno-desktop \
|
||||
--baseCurrencyNetwork=XMR_STAGENET \
|
||||
--useLocalhostForP2P=false \
|
||||
--useDevPrivilegeKeys=false \
|
||||
--nodePort=6666 \
|
||||
--appName=haveno-XMR_STAGENET_Bob \
|
||||
--appName=haveno-XMR_STAGENET_user2 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=10000 \
|
||||
--walletRpcBindPort=38092
|
||||
|
||||
charlie-desktop-stagenet:
|
||||
user3-desktop-stagenet:
|
||||
./haveno-desktop \
|
||||
--baseCurrencyNetwork=XMR_STAGENET \
|
||||
--useLocalhostForP2P=false \
|
||||
--useDevPrivilegeKeys=false \
|
||||
--nodePort=8888 \
|
||||
--appName=haveno-XMR_STAGENET_Charlie \
|
||||
--appName=haveno-XMR_STAGENET_user3 \
|
||||
--apiPassword=apitest \
|
||||
--apiPort=10002 \
|
||||
--walletRpcBindPort=38093
|
@ -1,17 +1,42 @@
|
||||
# Running a local Haveno test network
|
||||
# Set up environment
|
||||
|
||||
These are the steps needed to set up Haveno test instances.
|
||||
These are the steps needed to build Haveno and test it on our test network or locally.
|
||||
|
||||
## 1. Install dependencies
|
||||
## Install dependencies
|
||||
|
||||
On Ubuntu: `sudo apt install make wget git git-lfs openjdk-11-jdk`. The Bitcoin and Monero binaries will be downloaded and verified automatically in the next step.
|
||||
On Ubuntu: `sudo apt install make wget git git-lfs openjdk-11-jdk`. The Monero binaries will be downloaded and verified automatically in the next step.
|
||||
|
||||
## 2. Build Haveno
|
||||
## Build Haveno
|
||||
|
||||
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).
|
||||
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 binaries).
|
||||
|
||||
## 3. Run a local XMR testnet
|
||||
## 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'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.
|
||||
|
||||
Steps:
|
||||
|
||||
1. Run `make user1-desktop-stagenet`
|
||||
2. A monero address will be printed in the terminal, the string will look like this:
|
||||
|
||||
```
|
||||
Monero wallet primary address: 58GBfHgSvji6SU9gV4deERTRWsx2hFgXBDEFpSXdwhyADCU6VB7Nexb7JNzFyiBdKhX71aCFtyhN9fXBA9F8VtGRGZpSrYe
|
||||
```
|
||||
|
||||
Copy this address.
|
||||
|
||||
3. Go to the [stagenet faucet](https://community.rino.io/faucet/stagenet/) and paste the address above in the "Get XMR" field. Submit and see the stagenet coins being sent to your Haveno instance.
|
||||
4. While you wait the 10 confirmations (20 minutes) needed for your funds to be spendable, create a fiat account by clicking on "Account" in the top menu, select the "National currency accounts" tab, then add a new account. For simplicity, we suggest to test using a Revolut account with a random ID.
|
||||
5. Now pick up an existing offer or open a new one. Fund your trade and wait 10 blocks for your deposit to be unlocked.
|
||||
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.
|
||||
|
||||
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 test network
|
||||
|
||||
## Run a local XMR testnet
|
||||
|
||||
1. In a new terminal window run `make monerod-local1`
|
||||
1. In a new terminal window run `make monerod-local2`
|
||||
@ -19,26 +44,26 @@ On Ubuntu: `sudo apt install make wget git git-lfs openjdk-11-jdk`. The Bitcoin
|
||||
|
||||
`start_mining 9tsUiG9bwcU7oTbAdBwBk2PzxFtysge5qcEsHEpetmEKgerHQa1fDqH7a4FiquZmms7yM22jdifVAD7jAb2e63GSJMuhY75 1`
|
||||
|
||||
## 4. Deploy
|
||||
## 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 as explained in step 3 below.
|
||||
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 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-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`
|
||||
2. `make user1-desktop-local` or if you want to run user1 as a daemon: `make user1-daemon-local`
|
||||
3. `make user2-desktop-local` or if you want to run user2 as a daemon: `make user2-daemon-local`
|
||||
|
||||
## 5. Fund your wallets
|
||||
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.
|
||||
|
||||
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.
|
||||
## Fund your wallets
|
||||
|
||||
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`.
|
||||
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.
|
||||
|
||||
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.
|
||||
You can fund the two wallets by mining some test XMR coins to those addresses. To do so, open a terminal where you ran monerod and run: `start_mining ADDRESS 1`.
|
||||
|
||||
## 6. Start testing
|
||||
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.
|
||||
|
||||
You are all set. Now that everything is running and your wallets are funded, you can create test trades between Alice and Bob. Remember to mine a few blocks after opening and accepting the test trade so the transaction will be confirmed.
|
||||
## 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.
|
||||
|
Loading…
Reference in New Issue
Block a user