Testing Deep Reorg Protection in Zclassic

Testing Deep Reorg Protection in Zclassic

Blockchain
September 16, 2019 by admin
96
zclassic protection

 In this blog post, I’ll outline the steps to setup Zclassic full node with deep reorg protection enabled. I have also included checks to ensure deep reorg protection is in operation.

 

Setting up a full node

~$ sudo apt-get install 
build-essential pkg-config libc6-dev m4 g++-multilib 
autoconf libtool ncurses-dev unzip git python python-zmq 
zlib1g-dev wget curl bsdmainutils automake# Clone the repo
git clone https://github.com/cryptoprofutonium/zclassic-1.git 
zclassic
# Change directory
~$ cd zclassic
# Build
~/zclassic$ ./zcutil/build.sh -j$(nproc)
# fetch key
~/zclassic$ ./zcutil/fetch-params.sh
# Create the data directory
~/zclassic$ mkdir -p ~/.zclassic
# Create the configuration file
~/zclassic$ touch ~/.zclassic/zclassic.conf
gen=0
equihashsolver=tromp
listenonion=0
addnode=93.123.65.11
addnode=54.37.81.148
addnode=95.216.116.61
addnode=45.32.154.141
addnode=193.70.35.149
addnode=18.197.48.53
addnode=51.254.44.210
addnode=101.201.239.90
addnode=151.106.63.210
addnode=137.74.4.198
addnode=66.70.180.144
addnode=99.96.205.201
addnode=52.128.54.234
addnode=198.13.37.95
addnode=198.13.37.95
addnode=217.35.130.43
addnode=67.164.76.238
addnode=148.251.20.113
addnode=122.175.62.197
addnode=149.56.135.165
addnode=121.1.182.227
addnode=157.230.86.233
addnode=185.28.100.174
addnode=91.227.197.0
addnode=54.37.81.148
addnode=137.74.4.198
addnode=167.114.159.30
addnode=198.13.37.95
addnode=206.189.210.19
addnode=45.32.154.141
addnode=144.217.39.155
addnode=149.56.20.178
~/zclassic$ ./src/zclassicd

Testing Deep Reorg Protection

~/zclassic$ ./src/zclassic-cli getfinalizedblockhash
~/zclassic$ 
~/zclassic$ ./src/zclassic-cli getbestblockhash
000000008ba774e688e494443711f43f9b9a0018fa7d1649b3e87d88e39a48d0~/zclassic$ ./src/zclassic-cli getblockheader 
000000008ba774e688e494443711f43f9b9a0018fa7d1649b3e87d88e39a48d0 
| grep height
  "height": 569258,~/zclassic$ ./src/zclassic-cli getfinalizedblockhash
000000007d00f76448c54e81e491ab938c89c6ac07ebebb9a2cc58727035b834~/zclassic$ ./src/zclassic-cli getblockheader 
000000007d00f76448c54e81e491ab938c89c6ac07ebebb9a2cc58727035b834 
| grep height
  "height": 569237,
~/zclassic$ ./src/zclassic-cli getfinalizedblockhash
000000002cb23d914087171a13e8286d7caf5a83418d7228a56e01533b75bcf0~/zclassic$ ./src/zclassic-cli getblockheader 
000000002cb23d914087171a13e8286d7caf5a83418d7228a56e01533b75bcf0 
| grep height
  "height": 569238,
2019-08-04 18:37:14 UpdateTip: new best=0000000081708e5a7865b759780ce04ad8ee2c050d5237ab745bbd2a73d83f71 height=567755 log2_work=51.445643 tx=1621850 date=2019-08-04 17:31:36 progress=0.999853 cache=6.6MiB(7123tx)2019-08-04 18:37:14 Park block 00000000d5b980bbf26563dcdcf35d9ca73a5d731f26bbbf85f36b46e0b173f1 as it would cause a deep reorg.2019-08-04 18:37:14 Park block 00000000a7a27042d82d8ac0a53af14e24fc48cf6b11cab129fd3c51894fc467 as it would cause a deep reorg.2019-08-04 18:37:14 Park block 0000000025c16db20bce542b73efcedb898c454ff6f39a79eb9a34bb216ace18 as it would cause a deep reorg.2019-08-04 18:37:14 Park block 000000009424fd1e1a5615179eede1728e11a63a802250cb94e06d3a6ac167e6 as it would cause a deep reorg.2019-08-04 18:37:14 Park block 00000000ab6fb333bc75b663145297c84db471058faf267d62830b4e1038a0c7 as it would cause a deep reorg.2019-08-04 18:37:14 UpdateTip: new best=0000000094392f2806df7309c6e84b8411e72003621e14d99b7bb971e0f4a561 height=567756 log2_work=51.445644 tx=1621853 date=2019-08-04 17:32:10 progress=0.999854 cache=6.6MiB(7126tx)2019-08-04 18:37:14 UpdateTip: new best=000000003e1f1063593feea58e7da4ed57c4e7ef69e2b4b4830f9301ee418ef9 height=567757 log2_work=51.445647 tx=1621856 date=2019-08-04 17:33:34 progress=0.999857 cache=6.6MiB(7125tx)2019-08-04 18:37:14 UpdateTip: new best=00000000678352845f1712dc5a1c90e642c1dd07d170c46c013d10a0a9c2f9a9 height=567758 log2_work=51.445648 tx=1621857 date=2019-08-04 17:34:33 progress=0.999860 cache=6.6MiB(7126tx)2019-08-04 18:37:14 Unpark block 00000000de6e3360462dc6bac043b32586309369ffce7130db5c062231e856ed as its chain has accumulated enough PoW.2019-08-04 18:37:15 UpdateTip: new best=000000006b7007ec54a74a36719119f5edd62fdbf9947dd89266e0ab628b4d36 height=567759 log2_work=51.445651 tx=1621858 date=2019-08-04 17:34:36 progress=0.999860 cache=6.6MiB(7127tx)2019-08-04 18:37:15 UpdateTip: new best=00000000c292a8bc7f2a27d0dcca93ada3be2c620b93a5536d493b817d3ca9ea height=567760 log2_work=51.445653 tx=1621859 date=2019-08-04 17:35:22 progress=0.999861 cache=6.6MiB(7128tx)2019-08-04 18:37:15 UpdateTip: new best=000000000b3340bf4f60e0592a5b0c84536d574307f304dca827a10d7995e201 height=567761 log2_work=51.445655 tx=1621866 date=2019-08-04 17:38:37 progress=0.999869 cache=6.6MiB(7127tx)2019-08-04 18:37:15 UpdateTip: new best=0000000071fd9daa42dcf515b9f591e44acd70f300c696c457d72e0bbac5a82c height=567762 log2_work=51.445657 tx=1621867 date=2019-08-04 17:39:25 progress=0.999870 cache=6.6MiB(7128tx)2019-08-04 18:37:15 UpdateTip: new best=0000000061c8fb94999340170880738b6281e2ffc79811d0b7bd3c8a3befe96e height=567763 log2_work=51.445659 tx=1621868 date=2019-08-04 17:41:10 progress=0.999874 cache=6.6MiB(7129tx)2019-08-04 18:37:15 UpdateTip: new best=00000000de6e3360462dc6bac043b32586309369ffce7130db5c062231e856ed height=567764 log2_work=51.445661 tx=1621872 date=2019-08-04 17:42:45 progress=0.999878 cache=6.6MiB(7129tx)2019-08-04 18:37:15 UpdateTip: new best=00000000cbc95a98bd8ff0de4626d1fd62e94fbaa248115086710078cfe79a7e height=567765 log2_work=51.445663 tx=1621873 date=2019-08-04 17:43:18 progress=0.999879 cache=6.6MiB(7130tx)2019-08-04 18:37:15 UpdateTip: new best=00000000681ad193b7beb94c8aed4122eb4feacf4a36e094231ab5f9a9c25135 height=567766 log2_work=51.445666 tx=1621879 date=2019-08-04 17:49:53 progress=0.999894 cache=6.6MiB(7136tx)2019-08-04 18:37:15 UpdateTip: new best=000000008e410dc7342792914796ff8e8b6125ca7e9e5e9fb7ae7598f8125562 height=567767 log2_work=51.445668 tx=1621882 date=2019-08-04 17:58:41 progress=0.999914 cache=6.6MiB(7137tx)2019-08-04 18:37:15 Unpark block 00000000ab6fb333bc75b663145297c84db471058faf267d62830b4e1038a0c7 as its chain has accumulated enough PoW.2019-08-04 18:37:15 UpdateTip: new best=0000000003bfe199be365f9947a1d038e52616ada474b1d8c6924f4bdc1a21c6 height=567768 log2_work=51.44567 tx=1621883 date=2019-08-04 18:00:42 progress=0.999918 cache=6.6MiB(7138tx)2019-08-04 18:37:15 UpdateTip: new best=00000000d5b980bbf26563dcdcf35d9ca73a5d731f26bbbf85f36b46e0b173f1 height=567769 log2_work=51.445672 tx=1621886 date=2019-08-04 18:01:45 progress=0.999920 cache=6.6MiB(7139tx)2019-08-04 18:37:15 UpdateTip: new best=00000000a7a27042d82d8ac0a53af14e24fc48cf6b11cab129fd3c51894fc467 height=567770 log2_work=51.445675 tx=1621887 date=2019-08-04 18:02:35 progress=0.999922 cache=6.6MiB(7140tx)2019-08-04 18:37:15 UpdateTip: new best=0000000025c16db20bce542b73efcedb898c454ff6f39a79eb9a34bb216ace18 height=567771 log2_work=51.445677 tx=1621891 date=2019-08-04 18:08:45 progress=0.999936 cache=6.6MiB(7143tx)2019-08-04 18:37:15 UpdateTip: new best=000000009424fd1e1a5615179eede1728e11a63a802250cb94e06d3a6ac167e6 height=567772 log2_work=51.44568 tx=1621898 date=2019-08-04 18:18:31 progress=0.999958 cache=6.6MiB(7139tx)2019-08-04 18:37:15 UpdateTip: new best=00000000ab6fb333bc75b663145297c84db471058faf267d62830b4e1038a0c7 height=567773 log2_work=51.445682 tx=1621900 date=2019-08-04 18:20:38 progress=0.999963 cache=6.6MiB(7143tx)
  • zelcashZelCash (ZEL) $ 0.051271 2.56%
  • ycashYcash (YEC) $ 0.294269 3.04%
  • bitcoinzBitcoinZ (BTCZ) $ 0.000114 10.57%
  • hushHush (HUSH) $ 0.087638 11.74%
  • bitcoin-privateBitcoin Private (BTCP) $ 0.144497 7.33%
  • bithereumBithereum (BTH) $ 0.016830 57.86%
  • snowgemSnowGem (XSG) $ 0.019142 5.63%