-
-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from zcoinofficial/znode
Znode
- Loading branch information
Showing
113 changed files
with
16,660 additions
and
1,744 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
Znode Build Instructions and Notes | ||
============================= | ||
- Version 0.1.5 | ||
- Date: 28 November 2017 | ||
|
||
Prerequisites | ||
------------- | ||
- Ubuntu 16.04+ | ||
- Libraries to build from zcoin source | ||
- Port **18618** is open | ||
|
||
Step 1. Build | ||
---------------------- | ||
**1.1.** Check out from source: | ||
|
||
git clone -b znode https://github.com/zcoinofficial/zcoin | ||
|
||
**1.2.** See [README.md](README.md) for instructions on building. | ||
|
||
Step 2. (Optional - only if firewall is running). Open port 18618 | ||
---------------------- | ||
**2.1.** Run: | ||
|
||
sudo ufw allow 18618 | ||
sudo ufw default allow outgoing | ||
sudo ufw enable | ||
|
||
Step 3. First run on your Local Wallet | ||
---------------------- | ||
**3.0.** Go to the checked out folder | ||
|
||
cd zcoin | ||
|
||
**3.1.** Start daemon in testnet mode: | ||
|
||
./src/zcoind -daemon -server -testnet | ||
|
||
**3.2.** Generate znodeprivkey: | ||
|
||
./src/zcoin-cli znode genkey | ||
|
||
(Store this key) | ||
|
||
**3.3.** Get wallet address: | ||
|
||
./src/zcoin-cli getaccountaddress 0 | ||
|
||
**3.4.** Send to received address **exactly 1000 XZC** in **1 transaction**. Wait for 15 confirmations. | ||
|
||
**3.5.** Stop daemon: | ||
|
||
./src/zcoin-cli stop | ||
|
||
Step 4. In your VPS where you are hosting your Znode. Update config files | ||
---------------------- | ||
**4.1.** Create file **zcoin.conf** (in folder **~/.zcoin**) | ||
|
||
rpcuser=username | ||
rpcpassword=password | ||
rpcallowip=127.0.0.1 | ||
testnet=1 | ||
debug=1 | ||
txindex=1 | ||
daemon=1 | ||
server=1 | ||
listen=1 | ||
maxconnections=24 | ||
znode=1 | ||
znodeprivkey=XXXXXXXXXXXXXXXXX ## Replace with your znode private key | ||
externalIP=XXX.XXX.XXX.XXX ## Replace with your node external IP | ||
|
||
**4.2.** Create file **znode.conf** (in 2 folders **~/.zcoin** and **~/.zcoin/testnet3**) contains the following info: | ||
- LABEL: A one word name you make up to call your node (ex. ZN1) | ||
- IP:PORT: Your znode VPS's IP, and the port is always 18168. | ||
- ZNODEPRIVKEY: This is the result of your "znode genkey" from earlier. | ||
- TRANSACTION HASH: The collateral tx. hash from the 1000 XZC deposit. | ||
- INDEX: The Index is always 0 or 1. | ||
|
||
To get TRANSACTION HASH, run: | ||
|
||
./src/zcoin-cli znode outputs | ||
|
||
The output will look like: | ||
|
||
{ "d6fd38868bb8f9958e34d5155437d009b72dfd33fc28874c87fd42e51c0f74fdb" : "0", } | ||
|
||
Sample of znode.conf: | ||
|
||
ZN1 51.52.53.54:18168 XrxSr3fXpX3dZcU7CoiFuFWqeHYw83r28btCFfIHqf6zkMp1PZ4 d6fd38868bb8f9958e34d5155437d009b72dfd33fc28874c87fd42e51c0f74fdb 0 | ||
|
||
Step 5. Run a znode | ||
---------------------- | ||
**5.1.** Start znode: | ||
|
||
./src/zcoin-cli znode start-alias <LABEL> | ||
|
||
For example: | ||
|
||
./src/zcoin-cli znode start-alias ZN1 | ||
|
||
**5.2.** To check node status: | ||
|
||
./src/zcoin-cli znode debug | ||
|
||
If not successfully started, just repeat start command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
52.187.41.88:8168 | ||
52.166.11.108:8168 | ||
40.76.72.210:8168 | ||
47.52.0.193:8168 | ||
52.178.34.114:8168 | ||
45.77.205.5:8168 | ||
45.32.232.195:8168 | ||
104.238.172.164:8168 | ||
45.63.91.151:8168 | ||
45.77.184.187:8168 | ||
45.77.51.98:8168 | ||
45.77.61.203:8168 | ||
45.76.206.15:8168 | ||
45.76.149.126:8168 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# List of fixed seed nodes for testnet | ||
52.175.244.22:28168 | ||
#52.175.244.22:28168 | ||
52.232.105.188:28168 | ||
13.76.210.1:28168 | ||
|
||
# Onion nodes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- old/evutil.c 2015-08-28 19:26:23.488765923 -0400 | ||
+++ new/evutil.c 2015-08-28 19:27:41.392767019 -0400 | ||
@@ -321,15 +321,16 @@ | ||
int | ||
evutil_make_listen_socket_reuseable(evutil_socket_t sock) | ||
{ | ||
-#ifndef WIN32 | ||
int one = 1; | ||
+#ifndef WIN32 | ||
/* REUSEADDR on Unix means, "don't hang on to this address after the | ||
* listener is closed." On Windows, though, it means "don't keep other | ||
* processes from binding to this address while we're using it. */ | ||
return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &one, | ||
(ev_socklen_t)sizeof(one)); | ||
#else | ||
- return 0; | ||
+ return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char*) &one, | ||
+ (ev_socklen_t)sizeof(one)); | ||
#endif | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.