Skip to content

Commit

Permalink
net v3.0.0 update. fixes and upgrades (#26)
Browse files Browse the repository at this point in the history
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* a

dfsg

* full clean push

windows->src

* push of all pushes

changed time swithces

* win mingw32 changes and unix build updated

updated build-unix for deps
changed build.mingw to build windows daemon.
  • Loading branch information
regtable authored and BigJohnson124 committed Mar 18, 2019
1 parent a6548bf commit 6d144a0
Show file tree
Hide file tree
Showing 79 changed files with 33,480 additions and 5,360 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -3,6 +3,7 @@ debug/
release/
*.o
*.exe

object_script.netcoin-qt.*
#################
## Eclipse
Expand Down Expand Up @@ -83,7 +84,7 @@ build/
*.pidb
*.log
*.scc

*.app
# Visual C++ cache files
ipch/
*.aps
Expand Down
74 changes: 52 additions & 22 deletions README.md
Expand Up @@ -5,40 +5,70 @@

![alt text](http://netcoin.io/wp-content/uploads/2013/12/NETCOIN_TRANPARENT_3-INCH_4WEBno-shadow-300x257.png)

[main repo](https://github.com/netcoinfoundation/netcoin)

NetCoin (NET) - Litecoin / PeerCoin Hybrid POW/POSV hybrid with Personal Investment Rate
Before starting ensure you have the correct [dependancys (22/01/2019)](doc/dependancys.txt) installed to compile the netcoin wallet for your platform. These can be found from the links provided in the above file or below during system specific setups. Only use the links and steps outlined above if your system does not carry dependancy packages such as ubuntu and homebrew or if you are familiar with editing the makefiles/.pro to reflect your system paths and building dependencies from scratch. However if you wish to learn this process see [dependancy build instructions](doc/build-deps.txt).

Below you shall find links to the specific build environment instructions. These have been written to aid you in self compiles however you should always seek to use precompiled binaries for your system when available to ensure you are on the latest stable release intended for mainstream consumption.

The default ports: Connection 11310, and RPC 11311
No premine.
[compiling headless daemon on unix platform](doc/build-unix.txt)

[compiling headless daemon on osx platform](doc/build-osx.txt)

[compiling headless daemon on windows platform](doc/build-msw.txt)

[compiling QT on multiple platforms](doc/readme-qt.rst)

Any issues/bugs please see below first to check if your bug/issue was submitted/solved before posting a new issue please try be as clear and concise about the actual issue e.g "wallet crashed" would not be enough detail to do anything and the issue will be closed. However "wallet crashed" I was trying to send coins from (address a) to (address b) both within the same wallet and the wallet reports I have sent 0 coins out but looking at the explorer (insert link with txid) it seems the coins sent but I cannot see they have moved locally, expected outcome was to see funds leave and return. recreatable : yes platform : osx other platforms affected : yes/no/untested build version : 3.0.0.0-stable result : crash/continued to run

If formatted correctly bugs shall be assigned to a member of the team for recreation and resolve. The above bug would receive status closed as an intentional bug(feature) of the wallet.

[bug/issue submission](https://github.com/netcoinfoundation/netcoin/issues)

NetCoin (NET) - Litecoin / PeerCoin POW/POSV hybrid with Personal Investment Rate

The default ports: Connection 11310, and RPC 11311 No premine.

POS Details.

POS activated on block 420,000 - Hard fork.

POSV stake once each month to earn highest possible rewards incentivises running full nodes to increase POS security. Coin age gradually slows after 1 month with an aging half life of 90 days.
POSV stake once each month to earn highest possible rewards incentivises running full nodes to increase POS security.
Coin age gradually slows after 1 month with an aging half life of 90 days.

Personal Investment Rate or PIR is a special reward algorithm unique for a PoS coin. The APR Stake reward increases in line with the value of the coins staked on a sliding scale.In other words the more Netcoin you own and stake the bigger the reward you earn. The last 3 years Netcoin had 3 different levels of PIR and it reached the last and final level end 2016.

The reward rates now are as follows:

NET | APR
------------- | -------------
1-999 | 2%
1000-9999 | 4%
10000-99999 | 6%
100000-999999 | 7%
1000000-9999999 | 8%
10000000+ | 10%



120 seconds block time POS
1 hour minimum age for staking. 30 days max age.
FAIR-WEIGHT protocol replaces the idea of 'block splitting' to prevent very large NET holders signing lots of POS blocks.
The reward rates now are as follows:

NET | APR
------------- | -------------
1-999 | 2%
1000-9999 | 4%
10000-99999 | 6%
100000-999999 | 7%
1000000-9999999 | 8%
10000000+ | 10%

120 seconds block time POS.
1 hour minimum age for staking.
30 days max age. FAIR-WEIGHT protocol replaces the idea of 'block splitting' to prevent very large NET holders signing lots of POS blocks.

70 confirmations for minted blocks


Pow ended on block xxx last official pow block

Q4- 2018 security/chain breach occurs meaning cryptopians funds were stolen, this was an exploit in the workings between central ledgers (exchange) and the chains state all netcoins held at cryptopia were removed from their wallets and or sold into the hands of legitimate users. There is no way to tell if this exploit resulted in real transaction reversals however it is clear that any confirming stakes were wiped out aka stake sniping which is how it was picked up. Large orphan stakes. Once identified cryptopia were asked to up the confirm limits to try and stem the attack in the hopes that the network would bounce back to good standing and the attackers efforts stemmed, unfortunately this made things slightly worse as it seems the attacker had already played out this scenario and hours later attacked again. Markets were paused while we (netcoin) along with cryptopia came to terms with the damages involved. A few months investigating lead us to where we are today (22/1/2019) cryptopias ledgers are down a whopping 265,746,657 netcoins and the chain reports no changes no duplications and no more coins than the expected 10% maximum and 2% minimum inflation through proof of stake rewards, this leaves us in a sticky situation as 2 situations arise:

1. cryptopia is held accountable for all its ledgers its users keys and ultimately the loss of these coins and they have to purchase these back

2. The chain was at fault regardless of it only manipulating centrally held ledgers due to transaction malleability/rewinds/51%/other attack meaning we are responsible for ensuring users funds are replaced.


So with the above, scenario 1 and 2 are equally relevant. It was only ledgers affected which allowed the user/s to extract all funds from the site and thus we can ask that it is reimbursed however as the developers of the coin we have responsibility to ensure the safe keeping of funds also, which has meant the decision to POST MINE (sickens me to say it, an after party premine) designed to release 300,000,000 netcoins at a predefined time to a single address controlled by the foundation to later release into cryptopias custody, to allow them to let users withdraw their funds (at minimum) and allow continued trading hereafter was decided anything left over (change) shall be retained by the foundation within the same wallet address for transparency. It shall be used for staking only! Any stake rewards from this shall be divided up between chain needs (explorers, nodes,advertising,bounties and rewards). The balance shall never be allowed to fall below the amount left after reimbursement.

Every effort is being made to ensure the future success of netcoin as a cryptocurrency of the people. We thank you for your continued support these last 5 years and hope to see us all going from strength to strength onwards 2019


Development process
===================

Expand All @@ -65,4 +95,4 @@ in this manner will have their corresponding issue labeled 'stagnant'.

Issues with no comments will be given a similar warning, and closed after
15 days from their last activity. Issues closed in this manner will be
labeled 'stale'.
labeled 'stale'.
25 changes: 9 additions & 16 deletions doc/build-unix.txt
Expand Up @@ -16,8 +16,8 @@ Dependencies

Library Purpose Description
------- ------- -----------
libssl SSL Support Secure communications
libdb4.8 Berkeley DB Blockchain & wallet storage
libssl.0-dev SSL Support Secure communications
libdb6.2 Berkeley DB Blockchain & wallet storage
libboost Boost C++ Library

# optional
Expand Down Expand Up @@ -50,40 +50,33 @@ Dependency Build Instructions: Ubuntu & Debian

Build requirements:

sudo apt-get install build-essential libssl-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-thread-dev
sudo apt-get install build-essential libssl1.0 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-thread-dev libdb++-dev

If boost fails you can try:
sudo apt-get install libboost-all-dev

BerkeleyDB4.8 is required for the wallet.

For Ubuntu only: db4.8 packages are available here. You can add the repository and install using the following commands:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

#For UPnP support
sudo apt-get install libminiupnpc-dev

# For building Netcoin-Qt
# For building Netcoin-Qt
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qt5-default libprotobuf-dev protobuf-compiler libqrencode-dev

To Build
--------

# Headless Netcoin (netcoind)
cd to build folder /src/
make -f makefile.unix
strip netcoind
make -f makefile.unix
strip netcoind

#Netcoin-Qt (GUI #optional required)
cd to build folder
qmake "USE_QRCODE=1"
make

If leveldb build_detect_platform error do
If leveldb build_detect_platform error do
chmod 755 src/leveldb/build_detect_platform


Expand Down Expand Up @@ -136,8 +129,8 @@ exploit even if a vulnerability is found, you can take the following measures:
such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;"

To build with PIE, use:
make -f makefile.unix ... -e PIE=1
make -f makefile.unix ... -e PIE=1

To test that you have built PIE executable, install scanelf, part of paxutils, and use:
scanelf -e ./netcoin

Expand Down
8 changes: 8 additions & 0 deletions doc/dependancys.txt
@@ -0,0 +1,8 @@
deps used for building netcoin 3.0.0
windows/mac
BOOST=1_68_0
BERKLEY=db-6.2.32.NC
OPENSSL=1.0.2q
MINIUPNPC=1.9.2
QRENCODE=4.0.2
for linux use latest available from distro servers. or install above deps manually. see build-unix instructions
91 changes: 45 additions & 46 deletions netcoin-qt.pro
@@ -1,6 +1,10 @@
TEMPLATE = app
TARGET = netcoin-qt
VERSION = 2.5.2
TARGET = netcoin
VERSION = 3.0.0

CONFIG += qt
QT += gui
QT += widgets
INCLUDEPATH += src src/json src/qt
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
CONFIG += no_include_pwd
Expand Down Expand Up @@ -28,19 +32,17 @@ greaterThan(QT_MAJOR_VERSION, 4) {
# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively

win32 {
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_55
BOOST_INCLUDE_PATH=C:/deps/boost_1_55_0
BOOST_LIB_PATH=C:/deps/boost_1_55_0/stage/lib
BDB_INCLUDE_PATH=C:/deps/db-4.8.30.NC/build_unix
BDB_LIB_PATH=C:/deps/db-4.8.30.NC/build_unix
OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.2l/include
OPENSSL_LIB_PATH=C:/deps/openssl-1.0.2l
MINIUPNPC_INCLUDE_PATH=C:/deps/
MINIUPNPC_LIB_PATH=C:/deps/miniupnpc
QRENCODE_INCLUDE_PATH=C:/deps/qrencode-3.4.4
QRENCODE_LIB_PATH=C:/deps/qrencode-3.4.4/.libs
}
win32:BOOST_LIB_SUFFIX=-mgw74-mt-s-x32-1_68
win32:BOOST_INCLUDE_PATH=C:/deps/32bit/boost_1_68_0
win32:BOOST_LIB_PATH=C:/deps/32bit/boost_1_68_0/stage/lib
win32:BDB_INCLUDE_PATH=C:/deps/32bit/db-6.2.32.NC/build_unix
win32:BDB_LIB_PATH=C:/deps/32bit/db-6.2.32.NC/build_unix
win32:OPENSSL_INCLUDE_PATH=C:/deps/32bit/openssl-1.0.2q/include
win32:OPENSSL_LIB_PATH=C:/deps/32bit/openssl-1.0.2q
win32:MINIUPNPC_INCLUDE_PATH=C:/deps/32bit/
win32:MINIUPNPC_LIB_PATH=C:/deps/32bit/miniupnpc
win32:QRENCODE_INCLUDE_PATH=C:/deps/32bit/qrencode-4.0.2
win32:QRENCODE_LIB_PATH=C:/deps/32bit/qrencode-4.0.2/.libs

OBJECTS_DIR = build
MOC_DIR = build
Expand All @@ -66,7 +68,7 @@ QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
win32:QMAKE_LFLAGS += -static-libgcc -static-libstdc++
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static
win32:QMAKE_LFLAGS *= -static

# use: qmake "USE_QRCODE=1"
# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
Expand All @@ -75,7 +77,18 @@ contains(USE_QRCODE, 1) {
DEFINES += USE_QRCODE
LIBS += -lqrencode
}

# use: qmake "USE_IPV6=1" (enabled by default; default)
# or: qmake "USE_IPV6=0" (disabled by default)
# or: qmake "USE_IPV6=-" (not supported)
contains(USE_IPV6, -) {
message(Building without IPv6 support)
} else {
message(Building with IPv6 support)
count(USE_IPV6, 0) {
USE_IPV6=1
}
DEFINES += USE_IPV6=$$USE_IPV6
}
# use: qmake "USE_UPNP=1" ( enabled by default; default)
# or: qmake "USE_UPNP=0" (disabled by default)
# or: qmake "USE_UPNP=-" (not supported)
Expand Down Expand Up @@ -148,15 +161,16 @@ macx: {
ICON = src/mac/artwork/NetCoin.icns
QMAKE_INFO_PLIST=src/mac/Info.plist
# osx 10.9 has changed the stdlib default to libc++. To prevent some link error, you may need to use libstdc++
QMAKE_CXXFLAGS += -stdlib=libstdc++

!macx:QMAKE_CXXFLAGS += -stdlib=libstdc++
macx:QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_CFLAGS_THREAD += -pthread
QMAKE_CXXFLAGS_THREAD += -pthread
}

INCLUDEPATH += src/leveldb/include src/leveldb/helpers
LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
SOURCES += src/txdb-leveldb.cpp
SOURCES += src/txdb-leveldb.cpp\

!win32 {
# we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
Expand Down Expand Up @@ -235,17 +249,6 @@ HEADERS += src/qt/bitcoingui.h \
src/kernel.h \
src/scrypt.h \
src/pbkdf2.h \
src/zerocoin/Accumulator.h \
src/zerocoin/AccumulatorProofOfKnowledge.h \
src/zerocoin/Coin.h \
src/zerocoin/CoinSpend.h \
src/zerocoin/Commitment.h \
src/zerocoin/ParamGeneration.h \
src/zerocoin/Params.h \
src/zerocoin/SerialNumberSignatureOfKnowledge.h \
src/zerocoin/SpendMetaData.h \
src/zerocoin/ZeroTest.h \
src/zerocoin/Zerocoin.h \
src/serialize.h \
src/core.h \
src/main.h \
Expand Down Expand Up @@ -281,6 +284,7 @@ HEADERS += src/qt/bitcoingui.h \
src/qt/transactionfilterproxy.h \
src/qt/transactionview.h \
src/qt/walletmodel.h \
src/qt/qcustomplot.h \
src/bitcoinrpc.h \
src/qt/overviewpage.h \
src/qt/csvmodelwriter.h \
Expand All @@ -301,7 +305,8 @@ HEADERS += src/qt/bitcoingui.h \
src/clientversion.h \
src/qt/shoppingpage.h \
src/qt/networkpage.h \
src/threadsafety.h
src/threadsafety.h \
src/qt/stakereportdialoge.h

SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/qt/transactiontablemodel.cpp \
Expand All @@ -326,6 +331,7 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/hash.cpp \
src/netbase.cpp \
src/key.cpp \
src/qt/qcustomplot.cpp \
src/script.cpp \
src/core.cpp \
src/main.cpp \
Expand Down Expand Up @@ -376,19 +382,9 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/scrypt-x86_64.S \
src/scrypt.cpp \
src/pbkdf2.cpp \
src/zerocoin/Accumulator.cpp \
src/zerocoin/AccumulatorProofOfKnowledge.cpp \
src/zerocoin/Coin.cpp \
src/zerocoin/CoinSpend.cpp \
src/zerocoin/Commitment.cpp \
src/zerocoin/ParamGeneration.cpp \
src/zerocoin/Params.cpp \
src/zerocoin/SerialNumberSignatureOfKnowledge.cpp \
src/zerocoin/SpendMetaData.cpp \
src/zerocoin/ZeroTest.cpp \
src/qt/networkpage.cpp \
src/qt/shoppingpage.cpp

src/qt/shoppingpage.cpp \
src/qt/stakereportdialoge.cpp
RESOURCES += \
src/qt/bitcoin.qrc

Expand All @@ -409,7 +405,9 @@ FORMS += \
src/qt/forms/charitydialog.ui \
src/qt/forms/intro.ui \
src/qt/forms/calcdialog.ui \
src/qt/forms/networkpage.ui
src/qt/forms/networkpage.ui \
src/qt/forms/stakereportdialog.ui


contains(USE_QRCODE, 1) {
HEADERS += src/qt/qrcodedialog.h
Expand Down Expand Up @@ -499,7 +497,8 @@ LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
windows:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX

windows:QMAKE_CFLAGS_THREAD += -mthread
windows:QMAKE_CXXFLAGS_THREAD += -mthread
contains(RELEASE, 1) {
!windows:!macx {
# Linux: turn dynamic linking back on for c/c++ runtime libraries
Expand Down

0 comments on commit 6d144a0

Please sign in to comment.