diff --git a/README.md b/README.md index 44cb4e3..40b95a5 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,11 @@ Major releases features: - v2.1.0-1.10.x Fix the 51% attack on SXC, bitcoin 2 hours rule to 2 minutes, cheetah diff drop 8x, spike diff cut in half - v2.2.0-1.11.x Reverse 51% attack on SXC. cheetah diff rise 5% - v2.3.0-1.12.x Future timestamp 30 seconds rule, cheetah diff drop 5%, 3 CSV BIPs enabled, Segwit BIPs Disabled + - v2.4.0-P13x Rolling 96 Blocks Deep Reorg Protection, cheetah diff drop 20x, spike diff rise 2x -Current full version name: "v2.3.0_randomSpike-1.12.x" -Note: All users/miners are recommended to use v2.3.0. Solo miners on USB ASIC/ASIC are no longer recommended to use v1.12.1 because of soft forks enforcement. -Because now v2.3.0 are built with static linked wallet, macOS are fully supported (x86_64 wallet, but should work too for M1 chip) +Current full version name: "v2.4.0_randomSpike-P13x" +Note: All users/miners are recommended to use v2.4.0. Solo miners on USB ASIC/ASIC are no longer recommended to use v1.13.1 because of soft forks enforcement. +Because now v2.4.0 are built with static linked wallet, macOS are fully supported (x86_64 wallet, but should work too for M1 chip) Community Whitepaper: https://nengcoin.org/knowledgebase/whitepaper-nengcoin/ diff --git a/configure.ac b/configure.ac index 5c5273d..05b3182 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 2) -define(_CLIENT_VERSION_MINOR, 3) +define(_CLIENT_VERSION_MINOR, 4) define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) diff --git a/doc/Android_Userland_App/NENG_Android_Mining_Wallet_Upgrade_Guide_without_Putty.txt b/doc/Android_Userland_App/NENG_Android_Mining_Wallet_Upgrade_Guide_without_Putty.txt index cb43038..7ce2830 100755 --- a/doc/Android_Userland_App/NENG_Android_Mining_Wallet_Upgrade_Guide_without_Putty.txt +++ b/doc/Android_Userland_App/NENG_Android_Mining_Wallet_Upgrade_Guide_without_Putty.txt @@ -2,21 +2,21 @@ NENG Android 64bit Wallet Upgrade Guide without Putty 1. Open Userland App and select Ubuntu or Debian 2. Log in Ubuntu 3. cd Android_Userland_App/arm64/ - 4. wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.3.0/nengcoin_2.3.0_arm64_linux-gnu.tgz - 5. tar xvfz nengcoin_2.3.0_arm64_linux-gnu.tgz + 4. wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.4.0/nengcoin_2.4.0_arm64_linux-gnu.tgz + 5. tar xvfz nengcoin_2.4.0_arm64_linux-gnu.tgz 6. rm -rf nengcoin_2.2.0_arm64_linux-gnu (remove previous nengcoin qt folder) 7. rm nengcoin_2.2.0_arm64_linux-gnu.tgz (remove previous nengcoin tgz file if exist) - 8. rm nengcoin_2.3.0_arm64_linux-gnu.tgz (remove current nengcoin tgz file) + 8. rm nengcoin_2.4.0_arm64_linux-gnu.tgz (remove current nengcoin tgz file) NENG Android 32bit Wallet Upgrade Guide without Putty 1. Open Userland App and select Ubuntu or Debian 2. Log in Ubuntu 3. cd Android_Userland_App/armhf/ - 4. wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.3.0/nengcoin_2.3.0_armhf_linux-gnu.tgz - 5. tar xvfz nengcoin_2.3.0_armhf_linux-gnu.tgz + 4. wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.4.0/nengcoin_2.4.0_armhf_linux-gnu.tgz + 5. tar xvfz nengcoin_2.4.0_armhf_linux-gnu.tgz 6. rm -rf nengcoin_2.2.0_armhf_linux-gnu (remove previous nengcoin qt folder) 7. rm nengcoin_2.2.0_armhf_linux-gnu.tgz (remove previous nengcoin tgz file if exist) - 8. rm nengcoin_2.3.0_armhf_linux-gnu.tgz (remove current nengcoin tgz file) + 8. rm nengcoin_2.4.0_armhf_linux-gnu.tgz (remove current nengcoin tgz file) diff --git a/doc/Android_Userland_App/NENG_Android_arm64_Mining_Guide_without_Putty.txt b/doc/Android_Userland_App/NENG_Android_arm64_Mining_Guide_without_Putty.txt index 4222404..14559af 100755 --- a/doc/Android_Userland_App/NENG_Android_arm64_Mining_Guide_without_Putty.txt +++ b/doc/Android_Userland_App/NENG_Android_arm64_Mining_Guide_without_Putty.txt @@ -9,15 +9,15 @@ NENG Android Mining Guide without Putty a. uname -a (or uname -m : to determine whether your phone is 64bit or 32bit. This guide is using arm64 / 64bit folder. For 32bit please install the files in armhf folder instead of arm64 folder) b. sudo apt update c. sudo apt install wget ssh - d. wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.3.0/nengcoin_v2.3.0_android_userland_arm.tgz - e. tar xvfz nengcoin_v2.3.0_android_userland_arm.tgz + d. wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.4.0/nengcoin_v2.4.0_android_userland_arm.tgz + e. tar xvfz nengcoin_v2.4.0_android_userland_arm.tgz f. cd Android_Userland_App/arm64/ g. bash prepare_userland.sh 8. Relogin Userland Ubuntu or Debian 9. Enter command line a. cd Android_Userland_App/arm64/ b. bash prepare_neng.sh - c. cd nengcoin_2.3.0_arm64_linux-gnu/ + c. cd nengcoin_2.4.0_arm64_linux-gnu/ d. ./nengcoind (create wallet folder & files) e. screen (creates another screen so you can check your wallet and mining at the same time using one ssh) f. cd diff --git a/doc/Android_Userland_App/NENG_Android_armhf_Mining_Guide_without_Putty.txt b/doc/Android_Userland_App/NENG_Android_armhf_Mining_Guide_without_Putty.txt index bea97b6..5726eb3 100755 --- a/doc/Android_Userland_App/NENG_Android_armhf_Mining_Guide_without_Putty.txt +++ b/doc/Android_Userland_App/NENG_Android_armhf_Mining_Guide_without_Putty.txt @@ -9,15 +9,15 @@ NENG Android Mining Guide without Putty a. uname -a (or uname -m : to determine whether your phone is 64bit or 32bit. This guide is using armhf / 32bit folder. For 64bit please install the files in arm64 folder instead of armhf folder) b. sudo apt update c. sudo apt install wget ssh - d. wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.3.0/nengcoin_v2.3.0_android_userland_arm.tgz - e. tar xvfz nengcoin_v2.3.0_android_userland_arm.tgz + d. wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.4.0/nengcoin_v2.4.0_android_userland_arm.tgz + e. tar xvfz nengcoin_v2.4.0_android_userland_arm.tgz f. cd Android_Userland_App/armhf/ g. bash prepare_userland.sh 8. Relogin Userland Ubuntu or Debian 9. Enter command line a. cd Android_Userland_App/armhf/ b. bash prepare_neng.sh - c. cd nengcoin_2.3.0_armhf_linux-gnu/ + c. cd nengcoin_2.4.0_armhf_linux-gnu/ d. ./nengcoind (create wallet folder & files) e. screen (creates another screen so you can check your wallet and mining at the same time using one ssh) f. cd diff --git a/doc/Android_Userland_App/README.md b/doc/Android_Userland_App/README.md index 1cacbdd..94c00e1 100644 --- a/doc/Android_Userland_App/README.md +++ b/doc/Android_Userland_App/README.md @@ -60,7 +60,7 @@ See attached picture in this folder "tab.gif". Tab key in android is the charac Here is easier way with tab: ``` - cd nengcoin_2.3.0_arm64_linux-gnu + cd nengcoin_2.4.0_arm64_linux-gnu ``` Typing above long word in android phone is close to impossible. An easier way to do is: @@ -68,7 +68,7 @@ Here is easier way with tab: ``` cd neng-finger push TAB key ``` -After you push TAB afer word "neng" , the android UserLand linux terminal should behave like linux in server/desktop with the full file/folder name "nengcoin_2.3.0_arm64_linux-gnu" auto populated for you. +After you push TAB afer word "neng" , the android UserLand linux terminal should behave like linux in server/desktop with the full file/folder name "nengcoin_2.4.0_arm64_linux-gnu" auto populated for you. #### Arrow up or down key for history @@ -107,16 +107,16 @@ Now you can let the cheetah cpuminer running with the phone cord connected to ch "Enable X11 forwarding" for the userland login setting. Save the login session with X11 enabled, start VcXsrv in windows, re-login into phone with putty and type below command lines: ``` - hlu@localhost:~$ cd nengcoin_2.3.0_arm64_linux-gnu - hlu@localhost:~/nengcoin_2.3.0_arm64_linux-gnu$ ./nengcoin-qt & + hlu@localhost:~$ cd nengcoin_2.4.0_arm64_linux-gnu + hlu@localhost:~/nengcoin_2.4.0_arm64_linux-gnu$ ./nengcoin-qt & ``` Above command inside putty will pop the QT GUI wallet in windows 10 with VcXsrv running. Wait for a while for the QT wallet to fully show up in windows, and then you can control the wallet inside phone from windows 10. - macOS with XQuartz. Download, install free software "XQuartz". Log out and re-login. Open up mac terminal: ``` $ ssh -XY hlu@192.168.1.98 -p 2022 -----login in phone---- - hlu@localhost:~$ cd nengcoin_2.3.0_arm64_linux-gnu - hlu@localhost:~/nengcoin_2.3.0_arm64_linux-gnu$ ./nengcoin-qt & + hlu@localhost:~$ cd nengcoin_2.4.0_arm64_linux-gnu + hlu@localhost:~/nengcoin_2.4.0_arm64_linux-gnu$ ./nengcoin-qt & ``` Above in mac terminal will pop up android phone NENG QT GUI wallet in macOS desktop. @@ -124,8 +124,8 @@ Above in mac terminal will pop up android phone NENG QT GUI wallet in macOS desk ``` honglu@MX $ ssh -XY hlu@192.168.1.98 -p 2022 -----login in phone---- - hlu@localhost:~$ cd nengcoin_2.3.0_arm64_linux-gnu - hlu@localhost:~/nengcoin_2.3.0_arm64_linux-gnu$ ./nengcoin-qt & + hlu@localhost:~$ cd nengcoin_2.4.0_arm64_linux-gnu + hlu@localhost:~/nengcoin_2.4.0_arm64_linux-gnu$ ./nengcoin-qt & ``` Above in linux desktop terminal will pop android phone NENG QT wallet in linux desktop remotely. diff --git a/doc/Android_Userland_App/arm64/README.md b/doc/Android_Userland_App/arm64/README.md index d81890c..07533db 100644 --- a/doc/Android_Userland_App/arm64/README.md +++ b/doc/Android_Userland_App/arm64/README.md @@ -41,8 +41,8 @@ IP = 192.168.1.98 with user "hlu" like below First login into UserLand app linux terminal remotely, you should find that common linux command like "top", "uptime" does not work. Please run below for workaround for those issues: ``` - wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.3.0/nengcoin_v2.3.0_android_userland_arm.tgz - tar xvfz nengcoin_v2.3.0_android_userland_arm.tgz + wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.4.0/nengcoin_v2.4.0_android_userland_arm.tgz + tar xvfz nengcoin_v2.4.0_android_userland_arm.tgz cd Android_Userland_App/arm64/ bash prepare_userland.sh diff --git a/doc/Android_Userland_App/arm64/prepare_neng.sh b/doc/Android_Userland_App/arm64/prepare_neng.sh index bb80725..d045033 100755 --- a/doc/Android_Userland_App/arm64/prepare_neng.sh +++ b/doc/Android_Userland_App/arm64/prepare_neng.sh @@ -14,6 +14,6 @@ sudo python2 get-pip.py git clone https://github.com/ShorelineCrypto/cheetah_cpuminer.git -wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.3.0/nengcoin_2.3.0_arm64_linux-gnu.tgz -tar xvfz nengcoin_2.3.0_arm64_linux-gnu.tgz +wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.4.0/nengcoin_2.4.0_arm64_linux-gnu.tgz +tar xvfz nengcoin_2.4.0_arm64_linux-gnu.tgz diff --git a/doc/Android_Userland_App/armhf/README.md b/doc/Android_Userland_App/armhf/README.md index 7fa5457..5f4924b 100644 --- a/doc/Android_Userland_App/armhf/README.md +++ b/doc/Android_Userland_App/armhf/README.md @@ -41,8 +41,8 @@ IP = 192.168.1.98 with user "hlu" like below First login into UserLand app linux terminal remotely, you should find that common linux command like "top", "uptime" does not work. Please run below for workaround for those issues: ``` - wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.3.0/nengcoin_v2.3.0_android_userland_arm.tgz - tar xvfz nengcoin_v2.3.0_android_userland_arm.tgz + wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.4.0/nengcoin_v2.4.0_android_userland_arm.tgz + tar xvfz nengcoin_v2.4.0_android_userland_arm.tgz cd Android_Userland_App/armhf/ bash prepare_userland.sh diff --git a/doc/Android_Userland_App/armhf/prepare_neng.sh b/doc/Android_Userland_App/armhf/prepare_neng.sh index 146d035..bfb2f62 100755 --- a/doc/Android_Userland_App/armhf/prepare_neng.sh +++ b/doc/Android_Userland_App/armhf/prepare_neng.sh @@ -14,6 +14,6 @@ sudo python2 get-pip.py git clone https://github.com/ShorelineCrypto/cheetah_cpuminer.git -wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.3.0/nengcoin_2.3.0_armhf_linux-gnu.tgz -tar xvfz nengcoin_2.3.0_armhf_linux-gnu.tgz +wget https://github.com/ShorelineCrypto/nengcoin/releases/download/v2.4.0/nengcoin_2.4.0_armhf_linux-gnu.tgz +tar xvfz nengcoin_2.4.0_armhf_linux-gnu.tgz diff --git a/doc/Android_Userland_App/nengcoin.conf b/doc/Android_Userland_App/nengcoin.conf index ad4254b..90b7cab 100755 --- a/doc/Android_Userland_App/nengcoin.conf +++ b/doc/Android_Userland_App/nengcoin.conf @@ -5,41 +5,23 @@ rpcallowip=127.0.0.1 server=1 daemon=1 upnp=1 -addnode=107.12.227.200:53021 -addnode=108.254.26.173:39738 -addnode=108.254.26.173:43308 -addnode=108.254.26.173:43348 -addnode=108.254.26.173:56004 -addnode=108.254.26.173:62956 -addnode=108.254.26.173:62957 -addnode=108.254.26.173:63554 -addnode=185.182.8.67:6377 -addnode=194.60.86.120:52336 -addnode=194.60.86.120:52412 -addnode=194.60.86.120:52542 -addnode=209.145.50.223:56726 -addnode=209.145.50.223:6377 -addnode=209.182.239.169:33512 -addnode=213.93.140.69:52808 -addnode=68.151.207.8:51281 -addnode=68.151.207.8:51299 -addnode=68.151.207.8:51310 -addnode=71.234.69.93:38294 -addnode=71.234.69.93:39066 -addnode=71.234.69.93:49936 -addnode=71.234.69.93:63722 -addnode=73.239.183.184:47751 -addnode=73.239.183.184:6377 -addnode=80.229.151.154:41682 -addnode=80.229.151.154:48722 -addnode=80.229.151.154:52016 -addnode=83.99.51.137:51788 -addnode=85.202.228.70:54276 -addnode=85.202.228.70:54282 -addnode=85.202.228.70:54290 -addnode=86.19.127.88:50860 -addnode=86.19.127.88:52496 -addnode=86.19.127.88:59228 -addnode=86.19.127.88:59246 -addnode=86.19.127.88:59269 -addnode=89.233.108.211:56008 +addnode=206.0.20.176 +addnode=144.91.111.8 +addnode=184.91.80.85 +addnode=146.19.215.49 +addnode=99.68.177.108 +addnode=85.202.231.41 +addnode=87.240.193.233 +addnode=194.34.232.192 +addnode=86.125.209.111 +addnode=1.156.5.90 +addnode=89.84.195.176 +addnode=95.25.75.223 +addnode=5.196.91.67 +addnode=85.202.228.70 +addnode=76.152.60.70 +addnode=142.112.238.161 +addnode=209.145.50.223 +addnode=130.162.40.152 +addnode=69.124.8.44 +addnode=95.98.26.178 diff --git a/doc/Chromebook/arm/README.md b/doc/Chromebook/arm/README.md index 2f00ab7..c89e230 100644 --- a/doc/Chromebook/arm/README.md +++ b/doc/Chromebook/arm/README.md @@ -34,7 +34,7 @@ In the rare cases, your chromebook may have 64 bits CPU, but the linux runs on 3 ``` Above information from terminal should give you clear idea whether you have arm64 (aarch64) or armhf platform in linux. -By default, Linux (Beta) or Crostini runs a container for Debian 11. Below has been tested to be working in both Debian 11 and Debian 10. Because v2.3.0 wallet is static linked, it should work directly in linux beta with proper hardware versions. +By default, Linux (Beta) or Crostini runs a container for Debian 11. Below has been tested to be working in both Debian 11 and Debian 10. Because v2.4.0 wallet is static linked, it should work directly in linux beta with proper hardware versions. After successfully downloading NENG wallet file at your current folder. You can move these files to whatever best location inside your "Linux files" folder by using either linux command line or Chromebook GUI drag and drop. @@ -49,14 +49,14 @@ to run a full node and for the purpose of CPU mining. ### arm64 ``` - hlu@penguin:~$ cd nengcoin_2.3.0_arm64_linux-gnu - hlu@penguin:~/nengcoin_2.3.0_arm64_linux-gnu$ ./nengcoin-qt & + hlu@penguin:~$ cd nengcoin_2.4.0_arm64_linux-gnu + hlu@penguin:~/nengcoin_2.4.0_arm64_linux-gnu$ ./nengcoin-qt & ``` ### armhf ``` - hlu@penguin:~$ cd nengcoin_2.3.0_armhf_linux-gnu - hlu@penguin:~/nengcoin_2.3.0_armhf_linux-gnu$ ./nengcoin-qt & + hlu@penguin:~$ cd nengcoin_2.4.0_armhf_linux-gnu + hlu@penguin:~/nengcoin_2.4.0_armhf_linux-gnu$ ./nengcoin-qt & ``` Above in linux terminal will pop NENG QT wallet in chromebook desktop. @@ -81,7 +81,7 @@ TAB key is powerful in linux command line. Typing full word of file or folder n Here is easier way with tab: ``` - cd nengcoin_2.3.0_arm64_linux-gnu + cd nengcoin_2.4.0_arm64_linux-gnu ``` Typing above long word in Chromebook is close to impossible. An easier way to do is: @@ -89,7 +89,7 @@ Here is easier way with tab: ``` cd nengc-finger push TAB key ``` -After you push TAB afer word "nengc" , the chromebook linux terminal should behave like linux in server/desktop with the full file/folder name "nengcoin_2.3.0_arm64_linux-gnu" auto populated for you. +After you push TAB afer word "nengc" , the chromebook linux terminal should behave like linux in server/desktop with the full file/folder name "nengcoin_2.4.0_arm64_linux-gnu" auto populated for you. #### Arrow up or down key for history diff --git a/doc/Chromebook/arm/nengcoin.conf b/doc/Chromebook/arm/nengcoin.conf index b115aff..90b7cab 100755 --- a/doc/Chromebook/arm/nengcoin.conf +++ b/doc/Chromebook/arm/nengcoin.conf @@ -5,23 +5,23 @@ rpcallowip=127.0.0.1 server=1 daemon=1 upnp=1 -addnode=184.59.34.45:50401 -addnode=209.145.50.223:6377 -addnode=71.234.69.93:6377 -addnode=173.70.249.155:52164 -addnode=173.70.249.155:36190 -addnode=70.113.108.236:6377 -addnode=213.93.140.69:56292 -addnode=108.254.26.173:42850 -addnode=206.0.21.52:9469 -addnode=108.254.26.173:57576 -addnode=83.99.51.137:34019 -addnode=208.87.135.124:48040 -addnode=181.44.131.88:31591 -addnode=87.240.225.0:6377 -addnode=173.17.162.125:59386 -addnode=71.234.69.93:38158 -addnode=178.84.56.51:38842 -addnode=207.244.243.35:38350 -addnode=172.58.230.235:49440 -addnode=173.17.162.125:49755 +addnode=206.0.20.176 +addnode=144.91.111.8 +addnode=184.91.80.85 +addnode=146.19.215.49 +addnode=99.68.177.108 +addnode=85.202.231.41 +addnode=87.240.193.233 +addnode=194.34.232.192 +addnode=86.125.209.111 +addnode=1.156.5.90 +addnode=89.84.195.176 +addnode=95.25.75.223 +addnode=5.196.91.67 +addnode=85.202.228.70 +addnode=76.152.60.70 +addnode=142.112.238.161 +addnode=209.145.50.223 +addnode=130.162.40.152 +addnode=69.124.8.44 +addnode=95.98.26.178 diff --git a/doc/Chromebook/x64/README.md b/doc/Chromebook/x64/README.md index 304a95c..e2b238d 100644 --- a/doc/Chromebook/x64/README.md +++ b/doc/Chromebook/x64/README.md @@ -23,7 +23,7 @@ For disk size in Linux Beta, we recommend to add 3G on top of recommended 5G by You can pin linux "Terminal" at menu bar. Download this tgz file to chromebook, drag the file from "Downloads" to "Linux files" folder in chromebook. Inside terminal, this file will be at your home directory. -By default, Linux (Beta) or Crostini runs a container for Debian 10. Below has been tested to be working in both Debian 11 and Debian 10. Because the latest v2.3.0 is static linked wallet file, you can simply download x86_64 linux-gnu version wallet binary and run in either GUI (QT) or command line CLI wallet. +By default, Linux (Beta) or Crostini runs a container for Debian 10. Below has been tested to be working in both Debian 11 and Debian 10. Because the latest v2.4.0 is static linked wallet file, you can simply download x86_64 linux-gnu version wallet binary and run in either GUI (QT) or command line CLI wallet. After successfully downloading NENG wallet file at your current folder. You can move these files to whatever best location inside your "Linux files" folder by using either linux command line or Chromebook GUI drag and drop. @@ -39,8 +39,8 @@ to run a full node and for the purpose of CPU mining. ## run GUI QT wallet in Chromebook ``` - hlu@penguin:~$ cd nengcoin_2.3.0_x86_64_linux-gnu - hlu@penguin:~/nengcoin_2.3.0_x86_64_linux-gnu$ ./nengcoin-qt & + hlu@penguin:~$ cd nengcoin_2.4.0_x86_64_linux-gnu + hlu@penguin:~/nengcoin_2.4.0_x86_64_linux-gnu$ ./nengcoin-qt & ``` Above in linux terminal will pop NENG QT wallet in chromebook desktop. @@ -64,7 +64,7 @@ TAB key is powerful in linux command line. Typing full word of file or folder n Here is easier way with tab: ``` - cd nengcoin_2.3.0_x86_64_linux-gnu + cd nengcoin_2.4.0_x86_64_linux-gnu ``` Typing above long word in Chromebook is close to impossible. An easier way to do is: @@ -72,7 +72,7 @@ Here is easier way with tab: ``` cd nengc-finger push TAB key ``` -After you push TAB afer word "nengc" , the chromebook linux terminal should behave like linux in server/desktop with the full file/folder name "nengcoin_2.3.0_x86_64_linux-gnu" auto populated for you. +After you push TAB afer word "nengc" , the chromebook linux terminal should behave like linux in server/desktop with the full file/folder name "nengcoin_2.4.0_x86_64_linux-gnu" auto populated for you. #### Arrow up or down key for history diff --git a/doc/Chromebook/x64/nengcoin.conf b/doc/Chromebook/x64/nengcoin.conf index b115aff..90b7cab 100755 --- a/doc/Chromebook/x64/nengcoin.conf +++ b/doc/Chromebook/x64/nengcoin.conf @@ -5,23 +5,23 @@ rpcallowip=127.0.0.1 server=1 daemon=1 upnp=1 -addnode=184.59.34.45:50401 -addnode=209.145.50.223:6377 -addnode=71.234.69.93:6377 -addnode=173.70.249.155:52164 -addnode=173.70.249.155:36190 -addnode=70.113.108.236:6377 -addnode=213.93.140.69:56292 -addnode=108.254.26.173:42850 -addnode=206.0.21.52:9469 -addnode=108.254.26.173:57576 -addnode=83.99.51.137:34019 -addnode=208.87.135.124:48040 -addnode=181.44.131.88:31591 -addnode=87.240.225.0:6377 -addnode=173.17.162.125:59386 -addnode=71.234.69.93:38158 -addnode=178.84.56.51:38842 -addnode=207.244.243.35:38350 -addnode=172.58.230.235:49440 -addnode=173.17.162.125:49755 +addnode=206.0.20.176 +addnode=144.91.111.8 +addnode=184.91.80.85 +addnode=146.19.215.49 +addnode=99.68.177.108 +addnode=85.202.231.41 +addnode=87.240.193.233 +addnode=194.34.232.192 +addnode=86.125.209.111 +addnode=1.156.5.90 +addnode=89.84.195.176 +addnode=95.25.75.223 +addnode=5.196.91.67 +addnode=85.202.228.70 +addnode=76.152.60.70 +addnode=142.112.238.161 +addnode=209.145.50.223 +addnode=130.162.40.152 +addnode=69.124.8.44 +addnode=95.98.26.178 diff --git a/doc/MacOS_install/nengcoin.conf b/doc/MacOS_install/nengcoin.conf index ad4254b..90b7cab 100755 --- a/doc/MacOS_install/nengcoin.conf +++ b/doc/MacOS_install/nengcoin.conf @@ -5,41 +5,23 @@ rpcallowip=127.0.0.1 server=1 daemon=1 upnp=1 -addnode=107.12.227.200:53021 -addnode=108.254.26.173:39738 -addnode=108.254.26.173:43308 -addnode=108.254.26.173:43348 -addnode=108.254.26.173:56004 -addnode=108.254.26.173:62956 -addnode=108.254.26.173:62957 -addnode=108.254.26.173:63554 -addnode=185.182.8.67:6377 -addnode=194.60.86.120:52336 -addnode=194.60.86.120:52412 -addnode=194.60.86.120:52542 -addnode=209.145.50.223:56726 -addnode=209.145.50.223:6377 -addnode=209.182.239.169:33512 -addnode=213.93.140.69:52808 -addnode=68.151.207.8:51281 -addnode=68.151.207.8:51299 -addnode=68.151.207.8:51310 -addnode=71.234.69.93:38294 -addnode=71.234.69.93:39066 -addnode=71.234.69.93:49936 -addnode=71.234.69.93:63722 -addnode=73.239.183.184:47751 -addnode=73.239.183.184:6377 -addnode=80.229.151.154:41682 -addnode=80.229.151.154:48722 -addnode=80.229.151.154:52016 -addnode=83.99.51.137:51788 -addnode=85.202.228.70:54276 -addnode=85.202.228.70:54282 -addnode=85.202.228.70:54290 -addnode=86.19.127.88:50860 -addnode=86.19.127.88:52496 -addnode=86.19.127.88:59228 -addnode=86.19.127.88:59246 -addnode=86.19.127.88:59269 -addnode=89.233.108.211:56008 +addnode=206.0.20.176 +addnode=144.91.111.8 +addnode=184.91.80.85 +addnode=146.19.215.49 +addnode=99.68.177.108 +addnode=85.202.231.41 +addnode=87.240.193.233 +addnode=194.34.232.192 +addnode=86.125.209.111 +addnode=1.156.5.90 +addnode=89.84.195.176 +addnode=95.25.75.223 +addnode=5.196.91.67 +addnode=85.202.228.70 +addnode=76.152.60.70 +addnode=142.112.238.161 +addnode=209.145.50.223 +addnode=130.162.40.152 +addnode=69.124.8.44 +addnode=95.98.26.178 diff --git a/doc/README.md b/doc/README.md index 694f9da..fa46e50 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -Nengcoin Core 2.3.0 +Nengcoin Core 2.4.0 ===================== Setup diff --git a/doc/Win_install/nengcoin.conf b/doc/Win_install/nengcoin.conf index ad4254b..90b7cab 100755 --- a/doc/Win_install/nengcoin.conf +++ b/doc/Win_install/nengcoin.conf @@ -5,41 +5,23 @@ rpcallowip=127.0.0.1 server=1 daemon=1 upnp=1 -addnode=107.12.227.200:53021 -addnode=108.254.26.173:39738 -addnode=108.254.26.173:43308 -addnode=108.254.26.173:43348 -addnode=108.254.26.173:56004 -addnode=108.254.26.173:62956 -addnode=108.254.26.173:62957 -addnode=108.254.26.173:63554 -addnode=185.182.8.67:6377 -addnode=194.60.86.120:52336 -addnode=194.60.86.120:52412 -addnode=194.60.86.120:52542 -addnode=209.145.50.223:56726 -addnode=209.145.50.223:6377 -addnode=209.182.239.169:33512 -addnode=213.93.140.69:52808 -addnode=68.151.207.8:51281 -addnode=68.151.207.8:51299 -addnode=68.151.207.8:51310 -addnode=71.234.69.93:38294 -addnode=71.234.69.93:39066 -addnode=71.234.69.93:49936 -addnode=71.234.69.93:63722 -addnode=73.239.183.184:47751 -addnode=73.239.183.184:6377 -addnode=80.229.151.154:41682 -addnode=80.229.151.154:48722 -addnode=80.229.151.154:52016 -addnode=83.99.51.137:51788 -addnode=85.202.228.70:54276 -addnode=85.202.228.70:54282 -addnode=85.202.228.70:54290 -addnode=86.19.127.88:50860 -addnode=86.19.127.88:52496 -addnode=86.19.127.88:59228 -addnode=86.19.127.88:59246 -addnode=86.19.127.88:59269 -addnode=89.233.108.211:56008 +addnode=206.0.20.176 +addnode=144.91.111.8 +addnode=184.91.80.85 +addnode=146.19.215.49 +addnode=99.68.177.108 +addnode=85.202.231.41 +addnode=87.240.193.233 +addnode=194.34.232.192 +addnode=86.125.209.111 +addnode=1.156.5.90 +addnode=89.84.195.176 +addnode=95.25.75.223 +addnode=5.196.91.67 +addnode=85.202.228.70 +addnode=76.152.60.70 +addnode=142.112.238.161 +addnode=209.145.50.223 +addnode=130.162.40.152 +addnode=69.124.8.44 +addnode=95.98.26.178 diff --git a/doc/release-notes/release-notes-2.3.0.md b/doc/release-notes/release-notes-2.3.0.md index 7a11308..0ed878b 100644 --- a/doc/release-notes/release-notes-2.3.0.md +++ b/doc/release-notes/release-notes-2.3.0.md @@ -1,4 +1,4 @@ -Nengcoin core 2.3.0 is rebased off bitcoin/litecoin core 0.13.3 +Nengcoin core 2.4.0 is rebased off bitcoin/litecoin core 0.13.3 This is a new major version release, including new features, various bugfixes and performance improvements, as well as updated translations. It is recommended to upgrade to this version. @@ -333,11 +333,11 @@ and are affected by this change: For example, the `scriptSig.asm` property of a transaction input that previously showed an assembly representation of: - 304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a02.3.0c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c509001 400000 OP_NOP2 + 304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a02.4.0c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c509001 400000 OP_NOP2 now shows as: - 304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a02.3.0c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c5090[ALL] 400000 OP_CHECKLOCKTIMEVERIFY + 304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a02.4.0c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c5090[ALL] 400000 OP_CHECKLOCKTIMEVERIFY Note that the output of the RPC `decodescript` did not change because it is configured specifically to process scriptPubKey and not scriptSig scripts. diff --git a/src/chain.cpp b/src/chain.cpp index 77e924e..074a9ce 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -143,3 +143,32 @@ int64_t GetBlockProofEquivalentTime(const CBlockIndex& to, const CBlockIndex& fr } return sign * r.GetLow64(); } + +/** + * Find the last common ancestor two blocks have. + * Both pa and pb must be non null. + */ +const CBlockIndex *LastCommonAncestor(const CBlockIndex *pa, + const CBlockIndex *pb) { + if (pa->nHeight > pb->nHeight) { + pa = pa->GetAncestor(pb->nHeight); + } else if (pb->nHeight > pa->nHeight) { + pb = pb->GetAncestor(pa->nHeight); + } + + while (pa != pb && pa && pb) { + pa = pa->pprev; + pb = pb->pprev; + } + + // Eventually all chain branches meet at the genesis block. + assert(pa == pb); + return pa; +} + +bool AreOnTheSameFork(const CBlockIndex *pa, const CBlockIndex *pb) { + // The common ancestor needs to be either pa (pb is a child of pa) or pb (pa + // is a child of pb). + const CBlockIndex *pindexCommon = LastCommonAncestor(pa, pb); + return pindexCommon == pa || pindexCommon == pb; +} \ No newline at end of file diff --git a/src/chain.h b/src/chain.h index 0c90f89..bcc57d3 100644 --- a/src/chain.h +++ b/src/chain.h @@ -345,6 +345,17 @@ arith_uint256 GetBlockProof(const CBlockIndex& block); /** Return the time it would take to redo the work difference between from and to, assuming the current hashrate corresponds to the difficulty at tip, in seconds. */ int64_t GetBlockProofEquivalentTime(const CBlockIndex& to, const CBlockIndex& from, const CBlockIndex& tip, const Consensus::Params&); +/** + * Find the forking point between two chain tips. + */ +const CBlockIndex *LastCommonAncestor(const CBlockIndex *pa, + const CBlockIndex *pb); + +/** + * Check if two block index are on the same fork. + */ +bool AreOnTheSameFork(const CBlockIndex *pa, const CBlockIndex *pb); + /** Used to marshal pointers into hashes for db storage. */ class CDiskBlockIndex : public CBlockIndex { diff --git a/src/clientversion.cpp b/src/clientversion.cpp index de2afc1..7bd5c7d 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -19,7 +19,7 @@ const std::string CLIENT_NAME("Nengster"); * Client version number */ -#define CLIENT_VERSION_SUFFIX "-1.12.x" +#define CLIENT_VERSION_SUFFIX "-P13x" diff --git a/src/clientversion.h b/src/clientversion.h index 22316f5..9ccb94d 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -15,7 +15,7 @@ //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 2 -#define CLIENT_VERSION_MINOR 3 +#define CLIENT_VERSION_MINOR 4 #define CLIENT_VERSION_REVISION 0 #define CLIENT_VERSION_BUILD 0 diff --git a/src/main.cpp b/src/main.cpp index 1c9cb3d..64e4a17 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -144,6 +144,12 @@ namespace { CBlockIndex *pindexBestInvalid; +/** + * The best finalized block. + * This block cannot be reorged in any way, shape or form. + */ +CBlockIndex const *pindexFinalized; + /** * The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS (for itself and all ancestors) and * as good as our current tip or better. Entries may be failed, though, and pruning nodes may be @@ -2816,6 +2822,11 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara mempool.UpdateTransactionsFromBlock(vHashUpdate); } + // If the tip is finalized, then undo it. + if (pindexFinalized == pindexDelete) { + pindexFinalized = pindexDelete->pprev; + } + // Update chainActive and related variables. UpdateTip(pindexDelete->pprev, chainparams); // Let wallets know transactions went from 1-confirmed to @@ -2832,6 +2843,32 @@ static int64_t nTimeFlush = 0; static int64_t nTimeChainState = 0; static int64_t nTimePostConnect = 0; +static bool FinalizeBlockInternal(CValidationState &state, + CBlockIndex *pindex) { + + AssertLockHeld(cs_main); + if (pindex->nStatus & BLOCK_FAILED_MASK) { + // We try to finalize an invalid block. + return state.DoS(100, + error("%s: Trying to finalize invalid block %s", + __func__, pindex->GetBlockHash().ToString()), + REJECT_INVALID, "finalize-invalid-block"); + } + + // Check that the request is consistent with current finalization. + if (pindexFinalized && !AreOnTheSameFork(pindex, pindexFinalized)) { + return state.DoS( + 20, error("%s: Trying to finalize block %s which conflicts " + "with already finalized block", + __func__, pindex->GetBlockHash().ToString()), + REJECT_AGAINST_FINALIZED, "bad-fork-prior-finalized"); + } + + // Our candidate is valid, finalize it. + pindexFinalized = pindex; + return true; +} + /** * Connect a new block to chainActive. pblock is either NULL or a pointer to a CBlock * corresponding to pindexNew, to bypass loading it again from disk. @@ -2861,6 +2898,20 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams, return error("ConnectTip(): ConnectBlock %s failed", pindexNew->GetBlockHash().ToString()); } mapBlockSource.erase(pindexNew->GetBlockHash()); + + // Update the finalized block. + int32_t nHeightToFinalize = + pindexNew->nHeight - DEFAULT_MAX_REORG_DEPTH; + CBlockIndex *pindexToFinalize = + pindexNew->GetAncestor(nHeightToFinalize); + if (pindexToFinalize && + !FinalizeBlockInternal(state, pindexToFinalize)) { + state.SetCorruptionPossible(); + return error("ConnectTip(): FinalizeBlock %s failed (%s)", + pindexNew->GetBlockHash().ToString(), + FormatStateMessage(state)); + } + nTime3 = GetTimeMicros(); nTimeConnectTotal += nTime3 - nTime2; LogPrint("bench", " - Connect total: %.2fms [%.2fs]\n", (nTime3 - nTime2) * 0.001, nTimeConnectTotal * 0.000001); assert(view.Flush()); @@ -2909,6 +2960,16 @@ static CBlockIndex* FindMostWorkChain() { pindexNew = *it; } + // If this block will cause a finalized block to be reorged, then we + // mark it as invalid. + if (pindexFinalized && !AreOnTheSameFork(pindexNew, pindexFinalized)) { + LogPrintf("Mark block %s invalid because it forks prior to the " + "finalization point %d.\n", + pindexNew->GetBlockHash().ToString(), + pindexFinalized->nHeight); + pindexNew->nStatus |= BLOCK_FAILED_VALID; + } + // Check whether all blocks on the path between the currently active chain and the candidate are valid. // Just going until the active chain is an optimization, as we know all blocks in it are valid already. CBlockIndex *pindexTest = pindexNew; @@ -4348,6 +4409,7 @@ void UnloadBlockIndex() LOCK(cs_main); setBlockIndexCandidates.clear(); chainActive.SetTip(NULL); + pindexFinalized = NULL; pindexBestInvalid = NULL; pindexBestHeader = NULL; mempool.clear(); diff --git a/src/main.h b/src/main.h index 518e700..0b966db 100644 --- a/src/main.h +++ b/src/main.h @@ -153,6 +153,9 @@ struct BlockHasher size_t operator()(const uint256& hash) const { return hash.GetCheapHash(); } }; +/** Default for -maxreorgdepth */ +static const int DEFAULT_MAX_REORG_DEPTH = 96; + extern CScript COINBASE_FLAGS; extern CCriticalSection cs_main; extern CTxMemPool mempool; @@ -534,5 +537,8 @@ static const unsigned int REJECT_HIGHFEE = 0x100; static const unsigned int REJECT_ALREADY_KNOWN = 0x101; /** Transaction conflicts with a transaction already known */ static const unsigned int REJECT_CONFLICT = 0x102; +/** Block conflicts with a transaction already known */ +static const unsigned int REJECT_AGAINST_FINALIZED = 0x103; + #endif // BITCOIN_MAIN_H diff --git a/src/pow.cpp b/src/pow.cpp index 4ffda2d..43035a1 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -31,8 +31,95 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead const int64_t nInterval = params.DifficultyAdjustmentInterval(); const int64_t nTargetSpacing = params.nPowTargetSpacing; + // v1.13.x hard fork after block 5438386 + if (pindex->nHeight > 5438386) { + arith_uint256 bnCheetah; + bnCheetah = bnPowLimit; + bnCheetah /= 1; + unsigned int nCheetah = bnCheetah.GetCompact(); + + arith_uint256 bnSpike; + bnSpike = bnPowLimit; + bnSpike /= 1000000000; + unsigned int nSpike = bnSpike.GetCompact(); + + if (pblock->nTime > pindexLast->nTime + nTargetSpacing*2) + return nCheetah; + else if ((pblock->nTime > pindexLast->nTime + 40) || (pblock->nTime < pindexLast->nTime - 40)) + { + // Return the last non-special-min-difficulty-rules-block + + while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nCheetah) + pindex = pindex->pprev; + return pindex->nBits; + } + else if ((pblock->nTime > pindexLast->nTime + 30) || (pblock->nTime < pindexLast->nTime - 30)) + { + // 50% random chance on Spike difficulty between +- 30 to 40 seconds + + const CBlockIndex* tmpindex = pindexLast; + tmpindex = tmpindex->pprev; + tmpindex = tmpindex->pprev; + if ((tmpindex->nTime + pblock->nTime + pindex->nHeight) % 2 != 0) + return nSpike; + else + { + while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nCheetah) + pindex = pindex->pprev; + return pindex->nBits; + } + } + else if ((pblock->nTime > pindexLast->nTime + 10) || (pblock->nTime < pindexLast->nTime - 10)) + { + // 75% random chance on Spike difficulty between +- 10 to 30 seconds + + const CBlockIndex* tmpindex = pindexLast; + tmpindex = tmpindex->pprev; + tmpindex = tmpindex->pprev; + if ((tmpindex->nTime + pblock->nTime + pindex->nHeight) % 4 != 0) + return nSpike; + else + { + while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nCheetah) + pindex = pindex->pprev; + return pindex->nBits; + } + } + else if ((pblock->nTime > pindexLast->nTime + 1) || (pblock->nTime < pindexLast->nTime - 1)) + { + // 87.5% random chance on Spike difficulty between +- 2 to 10 seconds + + const CBlockIndex* tmpindex = pindexLast; + tmpindex = tmpindex->pprev; + tmpindex = tmpindex->pprev; + if ((tmpindex->nTime + pblock->nTime + pindex->nHeight) % 8 != 0) + return nSpike; + else + { + while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nCheetah) + pindex = pindex->pprev; + return pindex->nBits; + } + } + else + { + // 98% random chance on Spike difficulty between +- 1 seconds + + const CBlockIndex* tmpindex = pindexLast; + tmpindex = tmpindex->pprev; + tmpindex = tmpindex->pprev; + if ((tmpindex->nTime + pblock->nTime + pindex->nHeight) % 50 != 0) + return nSpike; + else + { + while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nCheetah) + pindex = pindex->pprev; + return pindex->nBits; + } + } + } // v1.12.x hard fork after block 3800810 - if (pindex->nHeight > 3800810) { + else if (pindex->nHeight > 3800810) { arith_uint256 bnCheetah; bnCheetah = bnPowLimit; bnCheetah /= 20;