Skip to content

Commit

Permalink
Merge branch 'SAGA-develop' of https://github.com/decenomy/DSW
Browse files Browse the repository at this point in the history
  • Loading branch information
stepollo committed Jan 21, 2022
2 parents 37fac3d + 2723849 commit 9afcd9a
Show file tree
Hide file tree
Showing 598 changed files with 1,641 additions and 1,004 deletions.
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ src/aezora-cli
src/aezora-tx
src/aezorad

# Azzure
src/bench/bench_azzure
src/qt/test/test_azzure-qt
src/qt/azzure-qt
src/test/test_azzure
src/azzure-cli
src/azzure-tx
src/azzured

# Beacon
src/bench/bench_beacon
src/qt/test/test_beacon-qt
Expand Down Expand Up @@ -143,6 +152,42 @@ src/ultraclear-cli
src/ultraclear-tx
src/ultracleard

# One World Coin
src/bench/bench_oneworld
src/qt/test/test_oneworld-qt
src/qt/oneworld-qt
src/test/test_oneworld
src/oneworld-cli
src/oneworld-tx
src/oneworldd

# Birake
src/bench/bench_birake
src/qt/test/test_birake-qt
src/qt/birake-qt
src/test/test_birake
src/birake-cli
src/birake-tx
src/biraked

# Peps Coin
src/bench/bench_peps
src/qt/test/test_peps-qt
src/qt/peps-qt
src/test/test_peps
src/peps-cli
src/peps-tx
src/pepsd

# Mobility Coin
src/bench/bench_mobic
src/qt/test/test_mobic-qt
src/qt/mobic-qt
src/test/test_mobic
src/mobic-cli
src/mobic-tx
src/mobicd

##########################################
# clear this section when it's fixed
###
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_BUILD, 2)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2020)
define(_COPYRIGHT_YEAR, 2022)
AC_INIT([CryptoSaga Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_REVISION, m4_if(_CLIENT_VERSION_BUILD, [0], [], _CLIENT_VERSION_BUILD))m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/cryptosagacoin/SAGA/issues],[cryptosaga],[http://www.cryptosaga.net/])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/pivx-config.h])
Expand Down
2 changes: 1 addition & 1 deletion contrib/innosetup/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "CryptoSaga Core"
#define MyAppPublisher "2021 DECENOMY Core Developers"
#define MyAppPublisher "2022 DECENOMY Core Developers"
#define MyAppURL "http://cryptosaga.net/"
#define MyAppExeName "cryptosaga-qt.exe"
#define MyAppExtraData "https://explorer.decenomy.net/bootstraps/SAGA/bootstrap.zip"
Expand Down
2 changes: 1 addition & 1 deletion contrib/masternodesetup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You will then receive your private key, save it in a txt to use it later.
w8723KqiiqtiLH6y2ktjfwzuSrNucGAbagpmTmCn1KnNEeQTJKf
* Still at Debug Console type ***getmasternodeoutputs*** and save txhash and outputidx on a txt
```
Exemple:
Example:
"txhash" : "12fce79c1a5623aa5b5830abff1a9feb6a682b75ee9fe22c647725a3gef42saa",
"outputidx" : 0

Expand Down
18 changes: 6 additions & 12 deletions contrib/masternodesetup/masternodesetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ clear
function update_config() {
sed -i 's/daemon=1/daemon=0/' $CONFIGFOLDER/$CONFIG_FILE
cat << EOF >> $CONFIGFOLDER/$CONFIG_FILE
logintimestamps=1
maxconnections=256
#bind=$NODEIP
bind=$NODEIP
masternode=1
externalip=$NODEIP:$COIN_PORT
masternodeprivkey=$COINKEY
Expand Down Expand Up @@ -226,25 +225,20 @@ apt-get update >/dev/null 2>&1
DEBIAN_FRONTEND=noninteractive apt-get update > /dev/null 2>&1
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y -qq upgrade >/dev/null 2>&1
apt install -y software-properties-common >/dev/null 2>&1
echo -e "${PURPLE}Adding bitcoin PPA repository"
apt-add-repository -y ppa:bitcoin/bitcoin >/dev/null 2>&1
echo -e "Installing required packages, it may take some time to finish.${NC}"
apt-get update >/dev/null 2>&1
apt-get install libzmq3-dev -y >/dev/null 2>&1
apt-get install libzmq3-dev net-tools -y >/dev/null 2>&1
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" make software-properties-common \
build-essential libtool autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev \
libboost-system-dev libboost-test-dev libboost-thread-dev sudo automake git wget curl libdb4.8-dev bsdmainutils libdb4.8++-dev \
libminiupnpc-dev libgmp3-dev ufw pkg-config libevent-dev libdb5.3++ unzip libzmq5 >/dev/null 2>&1
build-essential libtool autoconf libssl-dev \
sudo automake git wget curl bsdmainutils net-tools \
libminiupnpc-dev libgmp3-dev ufw pkg-config unzip >/dev/null 2>&1
if [ "$?" -gt "0" ];
then
echo -e "${RED}Not all required packages were installed properly. Try to install them manually by running the following commands:${NC}\n"
echo "apt-get update"
echo "apt -y install software-properties-common"
echo "apt-add-repository -y ppa:bitcoin/bitcoin"
echo "apt-get update"
echo "apt install -y make build-essential libtool software-properties-common autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev \
libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev sudo automake git curl libdb4.8-dev \
bsdmainutils libdb4.8++-dev libminiupnpc-dev libgmp3-dev ufw pkg-config libevent-dev libdb5.3++ unzip libzmq5"
echo "apt install -y make software-properties-common build-essential libtool autoconf libssl-dev sudo automake git wget curl bsdmainutils net-tools libminiupnpc-dev libgmp3-dev ufw pkg-config unzip"
exit 1
fi
clear
Expand Down
4 changes: 4 additions & 0 deletions contrib/pivx-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ HEADERS += src/activemasternode.h \
src/compat/sanity.h \
src/config/pivx-config.h \
src/crypto/common.h \
src/crypto/google_authenticator.h \
src/crypto/hmac_sha1.h \
src/crypto/hmac_sha256.h \
src/crypto/hmac_sha512.h \
src/crypto/rfc6979_hmac_sha256.h \
Expand Down Expand Up @@ -438,6 +440,8 @@ SOURCES += src/activemasternode.cpp \
src/crypto/cubehash.c \
src/crypto/echo.c \
src/crypto/groestl.c \
src/crypto/google_authenticator.cpp \
src/crypto/hmac_sha1.cpp \
src/crypto/hmac_sha256.cpp \
src/crypto/hmac_sha512.cpp \
src/crypto/jh.c \
Expand Down
8 changes: 4 additions & 4 deletions depends/packages/boost.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package=boost
$(package)_version=1_64_0
$(package)_download_path=https://dl.bintray.com/boostorg/release/1.64.0/source/
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
$(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
$(package)_version=1_71_0
$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/
$(package)_file_name=boost_$($(package)_version).tar.bz2
$(package)_sha256_hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee

define $(package)_set_vars
$(package)_config_opts_release=variant=release
Expand Down
14 changes: 7 additions & 7 deletions depends/packages/qt.mk
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
PACKAGE=qt
$(package)_version=5.9.7
$(package)_download_path=https://download.qt.io/official_releases/qt/5.9/$($(package)_version)/submodules
$(package)_version=5.9.9
$(package)_download_path=https://download.qt.io/archive/qt/5.9/$($(package)_version)/submodules
$(package)_suffix=opensource-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=36dd9574f006eaa1e5af780e4b33d11fe39d09fd7c12f3b9d83294174bd28f00
$(package)_sha256_hash=d5a97381b9339c0fbaf13f0c05d599a5c999dcf94145044058198987183fed65
$(package)_dependencies=openssl zlib
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib concurrent
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch fix_s390x_powerpc_mips_mipsel_architectures.patch xkb-default.patch

$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=b36da7d93c3ab6fca56b32053bb73bc619c8b192bb89b74e3bcde2705f1c2a14
$(package)_qttranslations_sha256_hash=f7474f260a1382549720081bf2359a3d425ec3bf7d31976c512834303d30d73b

$(package)_qttools_file_name=qttools-$($(package)_suffix)
$(package)_qttools_sha256_hash=d62e0f70d99645d6704dbb8976fb2222443061743689943d40970c52c49367a1
$(package)_qttools_sha256_hash=fce6e0fd39a40bcef880c669080087dba94af1ec442296222210472e0852bf98

$(package)_qtsvg_file_name=qtsvg-$($(package)_suffix)
$(package)_qtsvg_sha256_hash=628f22b8472e96ed8033d5491286ce2ab5b2c7b9fe0fe468acd78b458dc75564
$(package)_qtsvg_sha256_hash=0d2759178c0c1ec8c7ea0d05b7bf57787c09d8059ca9b9518607a8e97933e888

$(package)_qtcharts_file_name=qtcharts-$($(package)_suffix)
$(package)_qtcharts_sha256_hash=16cd367241b2e0cd3bc8aea6f874598cd18ad83b72eed89f2713b777272572e6
$(package)_qtcharts_sha256_hash=a503e9f1504c41a6a7850ca2e0e4e786fce45345c94eb81a6abd352d15b7d95c

$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
Expand Down
29 changes: 29 additions & 0 deletions doc/DEIPs/DEIP0000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# DEIP-0000 : DEIP Template

* Number: DEIP-0000
* Title: DEIP Template
* Type: Informational
* Status: Accepted
* Authors: Decenomy Development <dev@decenomy.net>
* Created: 2021-09-01

## Abstract

This is a section for an abstract.

## Motivation

This is a section for a motivation.

## Body

This is a section for a body. The title of the section should be changed
and the section can be split into multiple sections and subsections.

## References

This is a section for references such as links to other documents (BIP, DIP or EIP/ERC) or to reference implementations.

## Copyright

Copyright (c) 2021-2022 The DECENOMY Core Developers. [Licensed under MIT License](https://opensource.org/licenses/MIT)
65 changes: 65 additions & 0 deletions doc/DEIPs/DEIP0001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# DEIP-0001 : Deterministic system variables

* Number: DEIP-0001
* Title: Deterministic system variables
* Type: Consensus
* Status: Draft
* Authors: Pedro Simões <pedro@decenomy.net>
* Created: 2021-09-01

## Abstract

This DEIP describes the process of registering system variables on the blockchain in a deterministic way. The introduction of this feature will allow the use of the value of those variables in consensus based calculations and processing.

## Motivation

Currently, the DSW codebased that is based on PIVX 4.3 doesn't have an infrastructural way to change its consensus in a procedural way, having its consensus rules completely hard-coded in its source code.
This limitation makes very hard to change anything that belongs to the global consensus without changing the source code always with the jeopardy of creating forks and issues on the network due to the changes, even on very minimal changes.

## Prior work

Dash team previously, created sporks to solve some blockchain parametrization and the easy on the introduction of new features mitigating the possibility of unintentional forks on the network, or the possibility to switch on and off some newly introduced features in case of some eventuality.

However, sporks are only suitable to use on processes that do not belong to the consensus algorithm, meaning that they are not stored on the blockchain, and therefore, their values cannot be reproduced on a blockchain initial sync not replicating the same blockchain state that was present on the time the blocks were registered on the blockchain, avoiding a correct synchronization in a deterministic way.

Another solution from Dash team, was the introduction of the DIP0002 - Special Transactions, that defines an extra payload to the user's regular transaction leveraging the introduction of DIP0003 - Deterministic Masternode Lists. However, these transaction are fully deterministic they are suitable for transactions made by the users to support extra processes like the management of masternodes.

## Proposed solution

* An OP_RETURN is added to the coinbase/coinstake transaction at the end with zero value and the signed corresponding value message encoded in it;
* the OP_RETURN output must comply to the coinbase/coinstake size limitations;
* The messages encoded on the OP_RETURN must be signed by the well known developer's spork private key;
* The staker and masternode owner are rewarded with some additional percentage on top of their base reward to incentivise the expedite introduction of the value into the blockchain;
* One coinstake/coinbase transaction can have multiple deterministic system variables with OP_RETURN outputs with zero value, if:
* the value is not a duplicate, the time signed must different from the registered one;
* the time signed must be higher than the previous one;
* the time signed should be in time, i.e. it should not be too long in the past and not too long in the future;
* the value must be in the defined range for the specific variable;
* it must execute its validation without errors;
* it must be activated within the beginning of the block's acceptance;
* Each type of variable has a specific record type, meaning that can be used multiple type of variables;
* Each type of variable has its own set of validation rules, and also the way to enforce them;
* A variable must be registered and active right away on the processing of the registering block;
* A validation error in one deterministic variable message registered on the coinbase/coinstake transaction render the block invalid;
* Unrecognized OP_RETURN outputs are ignored by default not affecting the rest of the block validation;
* In case of reorganization the values are restored to the previous ones, meaning that the old values must be maintained until the max reorganization threshold value;
* There will be a mempool for this type of messages;
* On reorg the discarded deterministic system variable messages must be reintroduced into the mempool;

Conclusion and future work

* The use of this DEIP with sporks;
* The use of this DEIP with oracles like the current price of the coin, or volume;
* The use of this DEIP with other type of external conditions;

## References

* [BIP-0074: Allow zero value OP_RETURN in Payment Protocol](https://github.com/bitcoin/bips/blob/master/bip-0074.mediawiki)

* [DIP-0002: Special Transactions](https://github.com/dashpay/dips/blob/master/dip-0002.md)

* [DIP-0003: Deterministic Masternode Lists](https://github.com/dashpay/dips/blob/master/dip-0003.md)

## Copyright

Copyright (c) 2021-2022 The DECENOMY Core Developers. [Licensed under MIT License](https://opensource.org/licenses/MIT)
21 changes: 21 additions & 0 deletions doc/DEIPs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 The DECENOMY Core developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
27 changes: 27 additions & 0 deletions doc/DEIPs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# DECENOMY Improvement Proposals (DEIPs)

DECENOMY projects need a way how to document their technical decisions and features. Therefore:

DEIP stands for DECENOMY Improvement Proposal. Similar to Bitcoin's BIPs, and Dash's DIPs, a DEIP is a design document providing: information to the DECENOMY community, or a description of a new feature for the DECENOMY Standard Wallet (DSW), or a description of its processes or environment. Each DEIP should provide a concise technical specification of the feature and a rationale for the feature.

Because DSW is forked from the PIVX codebase, that is also forked from Dash codebase, that is also forked from Bitcoin codebase, many of the BIPs and DIPs can be applied to DSW as well.

## Contributions

We use the same general guidelines for introducing a new DEIP as specified in [BIP 2](https://github.com/bitcoin/bips/blob/master/bip-0002.mediawiki), with a few differences. Specifically:

* Instead of the BIP editor, initiate contact with the DECENOMY development team and your request should be routed to a DEIP editor(s). The DEIP workflow mimics the DIP/BIP workflow.
* Recommended licenses include the MIT license
* Markdown format is the preferred format for DEIPs
* Following a discussion, the proposal should be submitted to the DEIPs git repository as a pull request. This draft must be written in BIP/DIP/DEIP style as described in [BIP 2](https://github.com/bitcoin/bips/blob/master/bip-0002.mediawiki), and named with an alias such as "dip-johndoe-infinitedecenomy" until the editor has assigned it a DEIP number (authors MUST NOT self-assign DEIP numbers).
* Having a DEIP here does not make it a formally accepted standard until its status becomes Final or Active.

## DECENOMY Improvement Proposal Summary

Number | Layer | Title | Owner | Type | Status
--- | --- | --- | --- | --- | ---
[0](DEIP0000.md) | | DEIP Template | Decenomy Development | Informational | Final

## License

Unless otherwise specified, DECENOMY Improvement Proposals (DEIPs) are released under the terms of the MIT license. See [LICENSE](LICENSE) for more information or see the [MIT License](https://opensource.org/licenses/MIT).
4 changes: 4 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ crypto_libbitcoin_crypto_a_SOURCES = \
crypto/sha512.cpp \
crypto/chacha20.h \
crypto/chacha20.cpp \
crypto/google_authenticator.cpp \
crypto/hmac_sha1.cpp \
crypto/hmac_sha256.cpp \
crypto/rfc6979_hmac_sha256.cpp \
crypto/hmac_sha512.cpp \
Expand All @@ -347,6 +349,8 @@ crypto_libbitcoin_crypto_a_SOURCES = \
crypto/common.h \
crypto/sha256.h \
crypto/sha512.h \
crypto/google_authenticator.h \
crypto/hmac_sha1.h \
crypto/hmac_sha256.h \
crypto/rfc6979_hmac_sha256.h \
crypto/hmac_sha512.h \
Expand Down
2 changes: 1 addition & 1 deletion src/activemasternode.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2015-2020 The PIVX developers
// Copyright (c) 2021 The DECENOMY Core Developers
// Copyright (c) 2021-2022 The DECENOMY Core Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/activemasternode.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2015-2020 The PIVX developers
// Copyright (c) 2021 The DECENOMY Core Developers
// Copyright (c) 2021-2022 The DECENOMY Core Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/addrdb.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2020 The PIVX developers
// Copyright (c) 2021 The DECENOMY Core Developers
// Copyright (c) 2021-2022 The DECENOMY Core Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/addrdb.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2020 The PIVX developers
// Copyright (c) 2021 The DECENOMY Core Developers
// Copyright (c) 2021-2022 The DECENOMY Core Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
Loading

0 comments on commit 9afcd9a

Please sign in to comment.