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

3.7.0 #83

Open
wants to merge 13 commits into
base: 3.0.5
Choose a base branch
from
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright (c) 2009-2015 Bitcoin Developers
Copyright (c) 2014-2015 Dash Developers
Copyright (c) 2015-2017 The PIVX Developers
Copyright (c) 2017 The Transcendence Developers
Copyright (c) 2017-2023 The Transcendence Developers


Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
1 change: 1 addition & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Pascal Papara was here in 2023
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 5)
define(_CLIENT_VERSION_MINOR, 7)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2021)
define(_COPYRIGHT_YEAR, 2023)
AC_INIT([Transcendence Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[www.teloscoin.org],[transcendence])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/transcendence-config.h])
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/libunbound.mk
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package=libunbound
$(package)_version=1.10.0
$(package)_download_path=https://github.com/NLnetLabs/unbound/archive/
$(package)_download_path=https://github.com/NLnetLabs/unbound/archive/refs/tags/
$(package)_file_name=release-$($(package)_version).tar.gz
$(package)_sha256_hash=F6107A5019EC920F827603AD51550D7024FD03B8274582945ADDAB4A95A90579
$(package)_dependencies=expat zlib openssl
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/qt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(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)_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 no-xlib.patch

$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=b36da7d93c3ab6fca56b32053bb73bc619c8b192bb89b74e3bcde2705f1c2a14
Expand Down
70 changes: 70 additions & 0 deletions depends/patches/qt/no-xlib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001
From: Carl Dong <[email protected]>
Date: Thu, 18 Jul 2019 17:22:05 -0400
Subject: [PATCH] Wrap xlib related code blocks in #if's

They are not necessary to compile QT.
---
qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
index 7c62c2e2b3..c05c6c0a07 100644
--- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -49,7 +49,9 @@
#include <QtGui/QWindow>
#include <QtGui/QBitmap>
#include <QtGui/private/qguiapplication_p.h>
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
#include <X11/cursorfont.h>
+#endif
#include <xcb/xfixes.h>
#include <xcb/xcb_image.h>

@@ -391,6 +393,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window)
xcb_flush(xcb_connection());
}

+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
static int cursorIdForShape(int cshape)
{
int cursorId = 0;
@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape)
}
return cursorId;
}
+#endif

xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
{
@@ -556,7 +560,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
{
xcb_connection_t *conn = xcb_connection();
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
int cursorId = cursorIdForShape(cshape);
+#endif
xcb_cursor_t cursor = XCB_NONE;

// Try Xcursor first
@@ -585,7 +591,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)

// Non-standard X11 cursors are created from bitmaps
cursor = createNonStandardCursor(cshape);
-
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
// Create a glpyh cursor if everything else failed
if (!cursor && cursorId) {
cursor = xcb_generate_id(conn);
@@ -593,6 +599,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
cursorId, cursorId + 1,
0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);
}
+#endif

if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
const char *name = cursorNames[cshape].front();
--
2.22.0

12 changes: 10 additions & 2 deletions doc/build-unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,16 @@ Dependency Build Instructions: Ubuntu & Debian
----------------------------------------------
Build requirements:

sudo apt install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
sudo apt install build-essential libtool autotools-dev autoconf pkg-config libssl1.0-dev libcurl4-gnutls-dev

If you have problems with libssl1.0-dev:

sudo apt-get install software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
sudo apt install libssl1.0-dev

For Ubuntu 12.04 and later or Debian 7 and later libboost-all-dev has to be installed:

sudo apt install libboost-all-dev
Expand Down Expand Up @@ -91,7 +99,7 @@ To build without GUI pass `--without-gui`.

For Qt 5 you need the following:

sudo apt install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
sudo apt install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqt5svg5-dev

libqrencode (optional) can be installed with:

Expand Down
1 change: 1 addition & 0 deletions src/chain.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2018-2023 The Transcendence developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
6 changes: 3 additions & 3 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2019 The Transcendence developers
// Copyright (c) 2018-2023 The Transcendence developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -263,9 +263,9 @@ class CTestNetParams : public CMainParams
vSeeds.clear();


vSeeds.push_back(CDNSSeedData("teloscoin.org", "dnsseed1.teloscoin.org"));
//vSeeds.push_back(CDNSSeedData("teloscoin.org", "dnsseed1.teloscoin.org"));
vSeeds.push_back(CDNSSeedData("88.198.37.154", "88.198.37.154"));
vSeeds.push_back(CDNSSeedData("teloscoin.org", "dnsseed2.teloscoin.org"));
//vSeeds.push_back(CDNSSeedData("teloscoin.org", "dnsseed2.teloscoin.org"));
vSeeds.push_back(CDNSSeedData("85.214.205.217", "85.214.205.217"));
vSeeds.push_back(CDNSSeedData("159.69.33.146", "159.69.33.146"));
vSeeds.push_back(CDNSSeedData("159.69.33.156", "159.69.33.156"));
Expand Down
1 change: 1 addition & 0 deletions src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX Core developers
// Copyright (c) 2018-2023 The Transcendence Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ std::string HelpMessage(HelpMessageMode mode)
#endif
strUsage += HelpMessageOpt("-reindex", _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup"));
strUsage += HelpMessageOpt("-reindexaccumulators", _("Reindex the accumulator database") + " " + _("on startup"));
strUsage += HelpMessageOpt("-reindexmoneysupply", _("Reindex the TRANSCENDENCE and zTELOS money supply statistics") + " " + _("on startup"));
strUsage += HelpMessageOpt("-reindexmoneysupply", _("Reindex the TRANSCENDENCE and ztelos money supply statistics") + " " + _("on startup"));
strUsage += HelpMessageOpt("-resync", _("Delete blockchain folders and resync from scratch") + " " + _("on startup"));
#if !defined(WIN32)
strUsage += HelpMessageOpt("-sysperms", _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)"));
Expand Down Expand Up @@ -578,7 +578,7 @@ std::string HelpMessage(HelpMessageMode mode)
// strUsage += HelpMessageOpt("-enablezeromint=<n>", strprintf(_("Enable automatic Zerocoin minting (0-1, default: %u)"), 1));
// strUsage += HelpMessageOpt("-zeromintpercentage=<n>", strprintf(_("Percentage of automatically minted Zerocoin (10-100, default: %u)"), 10));
// strUsage += HelpMessageOpt("-preferredDenom=<n>", strprintf(_("Preferred Denomination for automatically minted Zerocoin (1/5/10/50/100/500/1000/5000), 0 for no preference. default: %u)"), 0));
strUsage += HelpMessageOpt("-backupztranscendence=<n>", strprintf(_("Enable automatic wallet backups triggered after each zTELOS minting (0-1, default: %u)"), 1));
strUsage += HelpMessageOpt("-backupztranscendence=<n>", strprintf(_("Enable automatic wallet backups triggered after each ztelos minting (0-1, default: %u)"), 1));

// strUsage += " -anonymizetranscendenceamount=<n> " + strprintf(_("Keep N TRANSCENDENCE anonymized (default: %u)"), 0) + "\n";
// strUsage += " -liquidityprovider=<n> " + strprintf(_("Provide liquidity to Obfuscation by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)"), 0) + "\n";
Expand Down
2 changes: 1 addition & 1 deletion src/libzerocoin/Denominations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ CoinDenomination AmountToZerocoinDenomination(CAmount amount)
}

// return the highest denomination that is less than or equal to the amount given
// use case: converting Transcendence to zTELOS without user worrying about denomination math themselves
// use case: converting Transcendence to ztelos without user worrying about denomination math themselves
CoinDenomination AmountToClosestDenomination(CAmount nAmount, CAmount& nRemaining)
{
if (nAmount < 1 * COIN)
Expand Down
44 changes: 31 additions & 13 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2018 The Transcendence developers
// Copyright (c) 2018-2023 The Transcendence developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -1627,7 +1627,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState& state, const CTransa
//Check that txid is not already in the chain
int nHeightTx = 0;
if (IsTransactionInChain(tx.GetHash(), nHeightTx))
return state.Invalid(error("AcceptToMemoryPool : zTELOS spend tx %s already in block %d", tx.GetHash().GetHex(), nHeightTx),
return state.Invalid(error("AcceptToMemoryPool : ztelos spend tx %s already in block %d", tx.GetHash().GetHex(), nHeightTx),
REJECT_DUPLICATE, "bad-txns-inputs-spent");

//Check for double spending of serial #'s
Expand All @@ -1637,12 +1637,12 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState& state, const CTransa
CoinSpend spend = TxInToZerocoinSpend(txIn);
int nHeightTx = 0;
if (IsSerialInBlockchain(spend.getCoinSerialNumber(), nHeightTx))
return state.Invalid(error("%s : zTELOS spend with serial %s is already in block %d\n",
return state.Invalid(error("%s : ztelos spend with serial %s is already in block %d\n",
__func__, spend.getCoinSerialNumber().GetHex(), nHeightTx));

//Is serial in the acceptable range
if (!spend.HasValidSerial(Params().Zerocoin_Params()))
return state.Invalid(error("%s : zTELOS spend with serial %s from tx %s is not in valid range\n",
return state.Invalid(error("%s : ztelos spend with serial %s from tx %s is not in valid range\n",
__func__, spend.getCoinSerialNumber().GetHex(), tx.GetHash().GetHex()));
}
} else {
Expand Down Expand Up @@ -2171,6 +2171,8 @@ int64_t GetBlockValue(int nHeight)
nSubsidy = 50 * COIN;
} else if (nHeight >= SPORK_20_REWARD_HALVING_START_DEFAULT) {
nSubsidy = GetHalvingReward(nHeight) * COIN;
} else if (nHeight >= SPORK_21_REWARD_INCREASE_START) {
nSubsidy = GetHalvingReward2(nHeight) * COIN;
} else {
nSubsidy = 0.1 * COIN;
}
Expand All @@ -2190,6 +2192,22 @@ double GetHalvingReward(int nHeight)
return reward;
}

// Testing Reward Increase
}

double GetHalvingReward2(int nHeight)
{
double reward = 250;

const int period = (nHeight - SPORK_21_REWARD_INCREASE_START) / SPORK_21_REWARD_INCREASE_START;
if (period > 0) {
reward /= period + 1;
}

return reward;
}
//

int64_t GetMasternodePayment(int nHeight, int64_t blockValue, int nMasternodeCount)
{
int64_t ret = 0;
Expand Down Expand Up @@ -2682,7 +2700,7 @@ void RecalculateZTRANSCENDENCESpent()
if (pindex->nHeight % 1000 == 0)
LogPrintf("%s : block %d...\n", __func__, pindex->nHeight);

//Rewrite zTELOS supply
//Rewrite ztelos supply
CBlock block;
assert(ReadBlockFromDisk(block, pindex));

Expand All @@ -2691,13 +2709,13 @@ void RecalculateZTRANSCENDENCESpent()
//Reset the supply to previous block
pindex->mapZerocoinSupply = pindex->pprev->mapZerocoinSupply;

//Add mints to zTELOS supply
//Add mints to ztelos supply
for (auto denom : libzerocoin::zerocoinDenomList) {
long nDenomAdded = count(pindex->vMintDenominationsInBlock.begin(), pindex->vMintDenominationsInBlock.end(), denom);
pindex->mapZerocoinSupply.at(denom) += nDenomAdded;
}

//Remove spends from zTELOS supply
//Remove spends from ztelos supply
for (auto denom : listDenomsSpent)
pindex->mapZerocoinSupply.at(denom)--;

Expand Down Expand Up @@ -2899,7 +2917,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
if (zerocoinDB->ReadCoinSpend(spend.getCoinSerialNumber(), hashTxFromDB)) {
if(IsSerialInBlockchain(spend.getCoinSerialNumber(), nHeightTxSpend)) {
if(!fVerifyingBlocks || (fVerifyingBlocks && pindex->nHeight > nHeightTxSpend))
return state.DoS(100, error("%s : zTELOS with serial %s is already in the block %d\n",
return state.DoS(100, error("%s : ztelos with serial %s is already in the block %d\n",
__func__, spend.getCoinSerialNumber().GetHex(), nHeightTxSpend));
}
}
Expand Down Expand Up @@ -2990,7 +3008,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
pindex->nMoneySupply = nMoneySupplyPrev + nValueOut - nValueIn;
pindex->nMint = pindex->nMoneySupply - nMoneySupplyPrev + nFees;

// LogPrintf("XX69----------> ConnectBlock(): nValueOut: %s, nValueIn: %s, nFees: %s, nMint: %s zTELOSSpent: %s\n",
// LogPrintf("XX69----------> ConnectBlock(): nValueOut: %s, nValueIn: %s, nFees: %s, nMint: %s ztelosSpent: %s\n",
// FormatMoney(nValueOut), FormatMoney(nValueIn),
// FormatMoney(nFees), FormatMoney(pindex->nMint), FormatMoney(nAmountZerocoinSpent));

Expand Down Expand Up @@ -3173,7 +3191,7 @@ void static UpdateTip(CBlockIndex* pindexNew)
{
chainActive.SetTip(pindexNew);

// If turned on AutoZeromint will automatically convert TRANSCENDENCE to zTELOS
// If turned on AutoZeromint will automatically convert TRANSCENDENCE to ztelos
if (pwalletMain->isZeromintEnabled ())
pwalletMain->AutoZeromint ();

Expand Down Expand Up @@ -4040,13 +4058,13 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
if (!CheckTransaction(tx, fZerocoinActive, chainActive.Height() + 1 >= Params().Zerocoin_StartHeight(), state))
return error("CheckBlock() : CheckTransaction failed");

// double check that there are no double spent zTELOS spends in this block
// double check that there are no double spent ztelos spends in this block
if (tx.IsZerocoinSpend()) {
for (const CTxIn txIn : tx.vin) {
if (txIn.scriptSig.IsZerocoinSpend()) {
libzerocoin::CoinSpend spend = TxInToZerocoinSpend(txIn);
if (count(vBlockSerials.begin(), vBlockSerials.end(), spend.getCoinSerialNumber()))
return state.DoS(100, error("%s : Double spending of zTELOS serial %s in block\n Block: %s",
return state.DoS(100, error("%s : Double spending of ztelos serial %s in block\n Block: %s",
__func__, spend.getCoinSerialNumber().GetHex(), block.ToString()));
vBlockSerials.emplace_back(spend.getCoinSerialNumber());
}
Expand Down Expand Up @@ -4418,7 +4436,7 @@ bool ProcessNewBlock(CValidationState& state, CNode* pfrom, CBlock* pblock, CDis
}
}
if (nMints || nSpends)
LogPrintf("%s : block contains %d zTELOS mints and %d zTELOS spends\n", __func__, nMints, nSpends);
LogPrintf("%s : block contains %d ztelos mints and %d ztelos spends\n", __func__, nMints, nSpends);

// ppcoin: check proof-of-stake
// Limited duplicity on stake: prevents block flood attack
Expand Down
4 changes: 2 additions & 2 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn, CWallet* pwallet,
if (!view.HaveInputs(tx))
continue;

// double check that there are no double spent zTELOS spends in this block or tx
// double check that there are no double spent ztelos spends in this block or tx
if (tx.IsZerocoinSpend()) {
int nHeightTx = 0;
if (IsTransactionInChain(tx.GetHash(), nHeightTx))
Expand All @@ -334,7 +334,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn, CWallet* pwallet,
vTxSerials.emplace_back(spend.getCoinSerialNumber());
}
}
//This zTELOS serial has already been included in the block, do not add this tx.
//This ztelos serial has already been included in the block, do not add this tx.
if (fDoubleSerial)
continue;
}
Expand Down
Loading