DragonX has left the nest
This commit is contained in:
@@ -26,13 +26,9 @@ if ($block <= $blockcount) {
|
|||||||
die "That block has already happened!";
|
die "That block has already happened!";
|
||||||
} else {
|
} else {
|
||||||
my $diff = $block - $blockcount;
|
my $diff = $block - $blockcount;
|
||||||
my $minpb = 1.25; # 75s in minutes for HUSH3
|
# TODO: support custom blocktimes
|
||||||
if ($coin eq 'DRAGONX') {
|
# assumes HACs use default blocktime of 60s
|
||||||
$minpb = 0.6; # minutes per block
|
my $minpb = $coin ? 1 : 1.25; # 75s in minutes for HUSH3
|
||||||
} elsif ($coin) {
|
|
||||||
# TODO: support custom blocktimes
|
|
||||||
$minpb = 1; # assumes default blocktime of 60s
|
|
||||||
}
|
|
||||||
my $minutes = $diff*$minpb;
|
my $minutes = $diff*$minpb;
|
||||||
my $seconds = $minutes*60;
|
my $seconds = $minutes*60;
|
||||||
my $now = time;
|
my $now = time;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
# call this script like this to generate checkpoints for a HAC such as DragonX:
|
# call this script like this to generate checkpoints for another chain:
|
||||||
# CLI=./src/dragonx-cli ./contrib/sdl_checkpoints.pl ...
|
# CLI=./src/hac-cli ./contrib/sdl_checkpoints.pl ...
|
||||||
|
|
||||||
my $hush = $ENV{CLI} || "./src/hush-cli";
|
my $hush = $ENV{CLI} || "./src/hush-cli";
|
||||||
my $gethash = "$hush getblockhash";
|
my $gethash = "$hush getblockhash";
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ For this repo, it's likely this is the command you need:
|
|||||||
gdb src/hushd core
|
gdb src/hushd core
|
||||||
```
|
```
|
||||||
|
|
||||||
NOTE: Even if you are debugging a coredump on a HAC, such as DragonX, the file `src/dragonxd`
|
NOTE: Even if you are debugging a coredump on a HAC, the file `src/blahd`
|
||||||
is just a shell script that calls `src/hushd` and you always want to give an actual executable
|
is just a shell script that calls `src/hushd` and you always want to give an actual executable
|
||||||
file as the first argument to `gdb`, not a bash script.
|
file as the first argument to `gdb`, not a bash script.
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ Install deps on Linux:
|
|||||||
- They only provide limited security, because they talk about the past, not future block heights.
|
- They only provide limited security, because they talk about the past, not future block heights.
|
||||||
- Try to generate checkpoints as close to the release as possible, so you can have a recent block height be protected.
|
- Try to generate checkpoints as close to the release as possible, so you can have a recent block height be protected.
|
||||||
- For instance, don't update checkpoints and then do a release a month later. You can always update checkpoint data again or multiple times
|
- For instance, don't update checkpoints and then do a release a month later. You can always update checkpoint data again or multiple times
|
||||||
- DRAGONX now has checkpoints, you can generate them with: `./util/checkpoints.pl 1000 1 DRAGONX`
|
|
||||||
- Update copyright years if applicable. Example: `./util/update-copyrights.h 2022 2023`
|
- Update copyright years if applicable. Example: `./util/update-copyrights.h 2022 2023`
|
||||||
- Update doc/relnotes/README.md
|
- Update doc/relnotes/README.md
|
||||||
- To get the stats of file changes: `git diff --stat master...dev`
|
- To get the stats of file changes: `git diff --stat master...dev`
|
||||||
|
|||||||
2430
src/chainparams.cpp
2430
src/chainparams.cpp
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright 2016-2024 The Hush Developers
|
|
||||||
# Copyright 2022 The DragonX Developers
|
|
||||||
# Released under the GPLv3
|
|
||||||
|
|
||||||
# set working directory to the location of this script
|
|
||||||
# readlink -f does not always exist
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
|
|
||||||
./hush-cli -ac_name=DRAGONX "$@"
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
@call :GET_CURRENT_DIR
|
|
||||||
@cd %THIS_DIR%
|
|
||||||
hush-cli.exe -ac_name=DRAGONX %*
|
|
||||||
@goto :EOF
|
|
||||||
|
|
||||||
:GET_CURRENT_DIR
|
|
||||||
@pushd %~dp0
|
|
||||||
@set THIS_DIR=%CD%
|
|
||||||
@popd
|
|
||||||
@goto :EOF
|
|
||||||
16
src/dragonxd
16
src/dragonxd
@@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright 2016-2024 The Hush Developers
|
|
||||||
# Copyright 2022 The DragonX Developers
|
|
||||||
# Released under the GPLv3
|
|
||||||
|
|
||||||
# set working directory to the location of this script
|
|
||||||
# readlink -f does not always exist
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
|
|
||||||
SEEDNODE=176.126.87.241
|
|
||||||
|
|
||||||
# Remember Remember the 5th November for freedom of speech is not free!!
|
|
||||||
./hush-arrakis-chain -ac_name=DRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=36 -ac_private=1 -addnode=$SEEDNODE $@
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
@call :GET_CURRENT_DIR
|
|
||||||
@cd %THIS_DIR%
|
|
||||||
hushd.exe -ac_name=DRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=36 -ac_private=1 -addnode=176.126.87.241 %*
|
|
||||||
@goto :EOF
|
|
||||||
|
|
||||||
:GET_CURRENT_DIR
|
|
||||||
@pushd %~dp0
|
|
||||||
@set THIS_DIR=%CD%
|
|
||||||
@popd
|
|
||||||
@goto :EOF
|
|
||||||
@@ -1794,12 +1794,10 @@ void hush_args(char *argv0)
|
|||||||
fprintf(stderr,".oO Starting %s Full Node (Extreme Privacy!) with genproc=%d notary=%d\n",name.c_str(),HUSH_MININGTHREADS, IS_HUSH_NOTARY);
|
fprintf(stderr,".oO Starting %s Full Node (Extreme Privacy!) with genproc=%d notary=%d\n",name.c_str(),HUSH_MININGTHREADS, IS_HUSH_NOTARY);
|
||||||
|
|
||||||
vector<string> HUSH_nodes = {};
|
vector<string> HUSH_nodes = {};
|
||||||
vector<string> DRAGONX_nodes = {};
|
// Only HUSH3 uses these by default, other HACs must opt-in via -connect/-addnode
|
||||||
// Only HUSH3 and DRAGONX connect to these by default, other HACs must opt-in via -connect/-addnode
|
|
||||||
const bool ishush3 = strncmp(name.c_str(), "HUSH3",5) == 0 ? true : false;
|
const bool ishush3 = strncmp(name.c_str(), "HUSH3",5) == 0 ? true : false;
|
||||||
const bool isdragonx = strncmp(name.c_str(), "DRAGONX",7) == 0 ? true : false;
|
|
||||||
|
|
||||||
LogPrint("net", "%s: ishush3=%d isdragonx=%d\n", __func__, ishush3, isdragonx);
|
LogPrint("net", "%s: ishush3=%d\n", __func__, ishush3);
|
||||||
if (ishush3) {
|
if (ishush3) {
|
||||||
HUSH_nodes = {"node1.hush.is","node2.hush.is","node3.hush.is",
|
HUSH_nodes = {"node1.hush.is","node2.hush.is","node3.hush.is",
|
||||||
"node4.hush.is","node5.hush.is","node6.hush.is",
|
"node4.hush.is","node5.hush.is","node6.hush.is",
|
||||||
@@ -1816,27 +1814,16 @@ void hush_args(char *argv0)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isdragonx) {
|
|
||||||
DRAGONX_nodes = {"node1.dragonx.is","node2.dragonx.is","node3.dragonx.is",
|
|
||||||
"node4.dragonx.is","node5.dragonx.is","node6.dragonx.is"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
vector<string> more_nodes = mapMultiArgs["-addnode"];
|
vector<string> more_nodes = mapMultiArgs["-addnode"];
|
||||||
if (more_nodes.size() > 0) {
|
if (more_nodes.size() > 0) {
|
||||||
fprintf(stderr,"%s: Adding %lu more nodes via custom -addnode arguments\n", __func__, more_nodes.size() );
|
fprintf(stderr,"%s: Adding %lu more nodes via custom -addnode arguments\n", __func__, more_nodes.size() );
|
||||||
}
|
}
|
||||||
// Add default HUSH and DRAGONX nodes after custom addnodes, if applicable
|
// Add default HUSH nodes after custom addnodes, if applicable
|
||||||
if(HUSH_nodes.size() > 0) {
|
if(HUSH_nodes.size() > 0) {
|
||||||
LogPrint("net", "%s: adding %d HUSH3 hostname-based nodes\n", __func__, HUSH_nodes.size() );
|
LogPrint("net", "%s: adding %d HUSH3 hostname-based nodes\n", __func__, HUSH_nodes.size() );
|
||||||
more_nodes.insert( more_nodes.end(), HUSH_nodes.begin(), HUSH_nodes.end() );
|
more_nodes.insert( more_nodes.end(), HUSH_nodes.begin(), HUSH_nodes.end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if(DRAGONX_nodes.size() > 0) {
|
|
||||||
LogPrint("net", "%s: adding %d DRAGONX hostname-based nodes\n", __func__, DRAGONX_nodes.size() );
|
|
||||||
more_nodes.insert( more_nodes.end(), DRAGONX_nodes.begin(), DRAGONX_nodes.end() );
|
|
||||||
}
|
|
||||||
|
|
||||||
mapMultiArgs["-addnode"] = more_nodes;
|
mapMultiArgs["-addnode"] = more_nodes;
|
||||||
HUSH_STOPAT = GetArg("-stopat",0);
|
HUSH_STOPAT = GetArg("-stopat",0);
|
||||||
MAX_REORG_LENGTH = GetArg("-maxreorg",MAX_REORG_LENGTH);
|
MAX_REORG_LENGTH = GetArg("-maxreorg",MAX_REORG_LENGTH);
|
||||||
|
|||||||
34
src/init.cpp
34
src/init.cpp
@@ -880,16 +880,6 @@ static void ZC_LoadParams(const CChainParams& chainparams)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found) {
|
|
||||||
// This will only work when SDX is installed into /Applications, which is the only supported method
|
|
||||||
sapling_spend = boost::filesystem::path("/Applications/silentdragonx.app/Contents/MacOS") / "sapling-spend.params";
|
|
||||||
sapling_output = boost::filesystem::path("/Applications/silentdragonx.app/Contents/MacOS") / "sapling-output.params";
|
|
||||||
if (files_exist(sapling_spend, sapling_output)) {
|
|
||||||
LogPrintf("Found sapling params in /Applications/Contents/MacOS\n");
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
// SD DMG Support: Apple just has to do things differently...
|
// SD DMG Support: Apple just has to do things differently...
|
||||||
sapling_spend = boost::filesystem::path("./silentdragon.app/Contents/MacOS") / "sapling-spend.params";
|
sapling_spend = boost::filesystem::path("./silentdragon.app/Contents/MacOS") / "sapling-spend.params";
|
||||||
@@ -900,16 +890,6 @@ static void ZC_LoadParams(const CChainParams& chainparams)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found) {
|
|
||||||
// SDX DMG Support: Apple just has to do things differently...
|
|
||||||
sapling_spend = boost::filesystem::path("./silentdragonx.app/Contents/MacOS") / "sapling-spend.params";
|
|
||||||
sapling_output = boost::filesystem::path("./silentdragonx.app/Contents/MacOS") / "sapling-output.params";
|
|
||||||
if (files_exist(sapling_spend, sapling_output)) {
|
|
||||||
LogPrintf("Found sapling params in /Applications/Contents/MacOS\n");
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
// The traditional place Zcash params are stored, should not hit this case in normal circumstances,
|
// The traditional place Zcash params are stored, should not hit this case in normal circumstances,
|
||||||
// as Hush packages sapling params now
|
// as Hush packages sapling params now
|
||||||
@@ -1191,17 +1171,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
if(fs::exists(asmap_path)) {
|
if(fs::exists(asmap_path)) {
|
||||||
printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
|
printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
|
||||||
} else {
|
} else {
|
||||||
// Mac SDX
|
// Shit is fucked up, die an honorable death
|
||||||
asmap_path = fs::path("/Applications/SilentDragonX.app/Contents/MacOS/") / DEFAULT_ASMAP_FILENAME;
|
InitError(strprintf(_("Could not find any asmap file! Please report this bug to Hush Developers")));
|
||||||
printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() );
|
return false;
|
||||||
if(fs::exists(asmap_path)) {
|
|
||||||
printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Shit is fucked up, die an honorable death
|
|
||||||
InitError(strprintf(_("Could not find any asmap file! Please report this bug to Hush Developers")));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2688,7 +2688,7 @@ namespace Consensus {
|
|||||||
BOOST_FOREACH(const CTxOut& txout, tx.vout) {
|
BOOST_FOREACH(const CTxOut& txout, tx.vout) {
|
||||||
const bool isopret = txout.scriptPubKey.IsOpReturn();
|
const bool isopret = txout.scriptPubKey.IsOpReturn();
|
||||||
|
|
||||||
// HUSH+DRGX do not use -ac_minopreturnfee so this does not (yet)
|
// HUSH does not use -ac_minopreturnfee so this does not (yet)
|
||||||
// affect those chains, they will need a height activated consensus
|
// affect those chains, they will need a height activated consensus
|
||||||
// change
|
// change
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright 2016-2024 The Hush Developers
|
|
||||||
# Copyright 2022 The DragonX Developers
|
|
||||||
# Released under the GPLv3
|
|
||||||
|
|
||||||
# set working directory to the location of this script
|
|
||||||
# readlink -f does not always exist
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
|
|
||||||
./hush-cli -ac_name=TESTDRAGONX $@
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright 2016-2024 The Hush Developers
|
|
||||||
# Copyright 2022 The DragonX Developers
|
|
||||||
# Released under the GPLv3
|
|
||||||
|
|
||||||
# set working directory to the location of this script
|
|
||||||
# readlink -f does not always exist
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
|
|
||||||
BLOCKTIME=18
|
|
||||||
SUPPLY=0
|
|
||||||
|
|
||||||
# Remember Remember the 5th November for freedom of speech is not free!!
|
|
||||||
./hush-arrakis-chain -ac_name=TESTDRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -debug=randomx $@
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright 2016-2024 The Hush Developers
|
|
||||||
# Copyright 2022 The DragonX Developers
|
|
||||||
# Released under the GPLv3
|
|
||||||
|
|
||||||
# set working directory to the location of this script
|
|
||||||
# readlink -f does not always exist
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
|
|
||||||
./hush-cli -ac_name=TESTEQUIHASH $@
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright 2016-2024 The Hush Developers
|
|
||||||
# Copyright 2022 The DragonX Developers
|
|
||||||
# Released under the GPLv3
|
|
||||||
|
|
||||||
# set working directory to the location of this script
|
|
||||||
# readlink -f does not always exist
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )"
|
|
||||||
cd $DIR
|
|
||||||
|
|
||||||
BLOCKTIME=18
|
|
||||||
SUPPLY=0
|
|
||||||
|
|
||||||
# same as TESTDRAGONX except equihash and different ac_name
|
|
||||||
# and debug=pow which is the equivalent of debug=randomx for equihash mining
|
|
||||||
./hush-arrakis-chain -ac_name=TESTEQUIHASH -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -debug=pow $@
|
|
||||||
@@ -5038,7 +5038,7 @@ SpendingKeyAddResult AddSpendingKeyToWallet::operator()(const libzcash::SaplingE
|
|||||||
if (params.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight == Consensus::NetworkUpgrade::ALWAYS_ACTIVE) {
|
if (params.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight == Consensus::NetworkUpgrade::ALWAYS_ACTIVE) {
|
||||||
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = nTime;
|
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = nTime;
|
||||||
} else {
|
} else {
|
||||||
// TODO: set a better time for HUSH+DRAGONX
|
// TODO: set a better time for HUSH+HACs
|
||||||
// 154051200 seconds from epoch is Friday, 26 October 2018 00:00:00 GMT - definitely before Sapling activates
|
// 154051200 seconds from epoch is Friday, 26 October 2018 00:00:00 GMT - definitely before Sapling activates
|
||||||
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = std::max((int64_t) 154051200, nTime);
|
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = std::max((int64_t) 154051200, nTime);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,10 +81,6 @@ strip $DEB_BIN/hush-cli
|
|||||||
cp $SRC_PATH/src/hush-tx $DEB_BIN
|
cp $SRC_PATH/src/hush-tx $DEB_BIN
|
||||||
strip $DEB_BIN/hush-tx
|
strip $DEB_BIN/hush-tx
|
||||||
|
|
||||||
# these are scripts and don't require a strip
|
|
||||||
cp $SRC_PATH/src/dragonx-cli $DEB_BIN
|
|
||||||
cp $SRC_PATH/src/dragonxd $DEB_BIN
|
|
||||||
|
|
||||||
cp $SRC_PATH/src/hush-arrakis-chain $DEB_BIN
|
cp $SRC_PATH/src/hush-arrakis-chain $DEB_BIN
|
||||||
cp $SRC_DEB/changelog $DEB_DOC
|
cp $SRC_DEB/changelog $DEB_DOC
|
||||||
cp $SRC_DEB/copyright $DEB_DOC
|
cp $SRC_DEB/copyright $DEB_DOC
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ if ($acname) {
|
|||||||
$cli .= " -ac_name=$acname";
|
$cli .= " -ac_name=$acname";
|
||||||
# HSC's by default have a blocktime of 60s
|
# HSC's by default have a blocktime of 60s
|
||||||
$perday = 1440;
|
$perday = 1440;
|
||||||
# Dragonx has a blocktime of 36s
|
|
||||||
$perday = 2400 if ($acname eq 'DRAGONX');
|
|
||||||
} else {
|
} else {
|
||||||
$acname = 'HUSH3';
|
$acname = 'HUSH3';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ echo "Created new build dir $BUILD"
|
|||||||
cp contrib/asmap/asmap.dat $BUILD
|
cp contrib/asmap/asmap.dat $BUILD
|
||||||
cp sapling*.params $BUILD
|
cp sapling*.params $BUILD
|
||||||
cd src
|
cd src
|
||||||
cp hushd hush-cli hush-tx hush-arrakis-chain dragonx-cli dragonxd ../$BUILD
|
cp hushd hush-cli hush-tx hush-arrakis-chain ../$BUILD
|
||||||
cd ../$BUILD
|
cd ../$BUILD
|
||||||
strip hushd hush-cli hush-tx
|
strip hushd hush-cli hush-tx
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
Reference in New Issue
Block a user