Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Znode #150

Merged
merged 40 commits into from
Dec 13, 2017
Merged

Znode #150

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f34ec86
Reformat the code. Set constants. Implemented RPC listpubcoins (retur…
sn-ntu Oct 25, 2017
8e4aebe
Initial work for znode
aizensou Nov 3, 2017
0b15c5c
Fix constants at GetNextWork and reset diff at testnet. Fix missing h…
sn-ntu Nov 13, 2017
1f53e32
Correct znodeConfig. Update check conditions
sn-ntu Nov 17, 2017
481ab04
Fix exception for unknown znode command. Add mnsync rpc status. Add s…
sn-ntu Nov 21, 2017
db8769f
Added Znode Build Instructions
sn-ntu Nov 21, 2017
e70b478
znode instruction sec. 4.2 reformat
Nov 22, 2017
5be6cb4
Update README.md
Nov 23, 2017
128ccff
Merge pull request #141 from rainbowstain/znode
Nov 23, 2017
fa8ca56
Private testnet for better debugging. Fix ZnodePaymentStartBlock, fix…
aizensou Nov 25, 2017
1b7b8e9
Fixed LOCAL znode mode. Fix invType for ProcessMessage() MSG_DSTX. Up…
sn-ntu Nov 27, 2017
99e9b11
Update ZNODE.md
Nov 28, 2017
171b2b1
Update ZNODE.md
Nov 28, 2017
245cc6d
Add missing znode inventory. Fix payment and add check coinbase TX
sn-ntu Nov 28, 2017
29255c3
Merge branch 'znode'
psolstice Nov 28, 2017
e0cf157
Add missing znode inventory. Fix payment and add check coinbase TX
sn-ntu Nov 28, 2017
9bf88a0
Added MSG_ZNODE_PAYMENT_BLOCK. Added HasPayeeWithVotes. Added Updated…
sn-ntu Nov 29, 2017
fdd9bdd
Added MSG_ZNODE_PAYMENT_BLOCK. Added HasPayeeWithVotes. Added Updated…
sn-ntu Nov 29, 2017
c9e3ad4
Fixed compilation crash/freeze
psolstice Nov 29, 2017
af59180
Clean debug log and set znode constants
sn-ntu Nov 29, 2017
4737770
Fix conflicts
sn-ntu Nov 29, 2017
839f7be
Updated params for public testnet
sn-ntu Nov 29, 2017
9925cc6
Set ZnodePaymentsStartBlock to 200 for testnet
sn-ntu Nov 30, 2017
a420a23
Changed parallel optimization in libzerocoin from openmp to manual
psolstice Nov 30, 2017
304b90b
change bounty reward to correct address
insomp Nov 30, 2017
8eea376
Cleaned parallel task code for libzerocode
psolstice Dec 1, 2017
16aa2b8
Update getblocktemplate. Refactor mnsync to znsync
sn-ntu Dec 1, 2017
060f590
Removed IDE config files
sn-ntu Dec 1, 2017
776bed2
Final update for public testing
sn-ntu Dec 2, 2017
3d2cc76
Disabled znodeSync condition in RPC getblocktemplate
sn-ntu Dec 2, 2017
7ceec07
Updated params for public testnet
sn-ntu Dec 2, 2017
02bc303
Fix check PayeeValid when Znode payment still isn't active
Dec 2, 2017
27aadcb
Fix founders rewards and znode payment in testnet. Add Znode GUI.
Dec 6, 2017
9114101
Upgrade version to 0.13.4.1. Fixed znode payment checking. Added miss…
sn-ntu Dec 6, 2017
5f1bf4c
Updated znode sync status (GUI). Set default txindex=1
sn-ntu Dec 11, 2017
66ec543
Changed number of mint confirmations to 6
psolstice Dec 12, 2017
357de91
[Mainnet] Introduced HF_ZNODE_HEIGHT=66550 and HF_ZNODE_PAYMENT_START…
sn-ntu Dec 12, 2017
228e927
Merge branch 'znode-6-confirmations' into znode
psolstice Dec 13, 2017
c671f87
Fixed missing lock acquisition
psolstice Dec 13, 2017
4636f14
Updated REJECT message when the peer version is less than MIN_PEER_PR…
sn-ntu Dec 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions ZNODE.md
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
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 13)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_BUILD, 3)
define(_CLIENT_VERSION_REVISION, 4)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2017)
define(_COPYRIGHT_HOLDERS,[The %s developers])
Expand Down
1 change: 1 addition & 0 deletions contrib/bitcoin-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ FORMS += \
../src/qt/forms/sendcoinsentry.ui \
../src/qt/forms/signverifymessagedialog.ui \
../src/qt/forms/transactiondescdialog.ui \
../src/qt/forms/znodelist.ui \
../src/qt/forms/zerocoinpage.ui \

RESOURCES += \
Expand Down
4 changes: 2 additions & 2 deletions contrib/seeds/generate-seeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
static SeedSpec6 pnSeed6_test[]={
...
}
}i

These should be pasted into `src/chainparamsseeds.h`.
'''
Expand Down Expand Up @@ -130,7 +130,7 @@ def main():
process_nodes(g, f, 'pnSeed6_main', 8168)
g.write('\n')
with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
process_nodes(g, f, 'pnSeed6_test', 28168)
process_nodes(g, f, 'pnSeed6_test', 18168)
g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')

if __name__ == '__main__':
Expand Down
14 changes: 9 additions & 5 deletions contrib/seeds/nodes_main.txt
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
4 changes: 3 additions & 1 deletion contrib/seeds/nodes_test.txt
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

11 changes: 8 additions & 3 deletions depends/packages/libevent.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
package=libevent
$(package)_version=2.1.8
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.1.8-stable
$(package)_version=2.0.22
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.0.22-stable
$(package)_file_name=$(package)-$($(package)_version)-stable.tar.gz
$(package)_sha256_hash=965cc5a8bb46ce4199a47e9b2c9e1cae3b137e8356ffdad6d94d3b9069b71dc2
$(package)_sha256_hash=71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3
$(package)_patches=reuseaddr.patch

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/reuseaddr.patch
endef

define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress
Expand Down
21 changes: 21 additions & 0 deletions depends/patches/libevent/reuseaddr.patch
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
}

86 changes: 0 additions & 86 deletions git.diff

This file was deleted.

10 changes: 0 additions & 10 deletions prepare.sh

This file was deleted.

Loading