DragonX has left the nest

This commit is contained in:
Duke
2026-02-28 12:12:45 -05:00
parent 8e6cf9759d
commit f8136f5839
20 changed files with 15 additions and 2607 deletions

View File

@@ -26,13 +26,9 @@ if ($block <= $blockcount) {
die "That block has already happened!";
} else {
my $diff = $block - $blockcount;
my $minpb = 1.25; # 75s in minutes for HUSH3
if ($coin eq 'DRAGONX') {
$minpb = 0.6; # minutes per block
} elsif ($coin) {
# TODO: support custom blocktimes
$minpb = 1; # assumes default blocktime of 60s
}
# TODO: support custom blocktimes
# assumes HACs use default blocktime of 60s
my $minpb = $coin ? 1 : 1.25; # 75s in minutes for HUSH3
my $minutes = $diff*$minpb;
my $seconds = $minutes*60;
my $now = time;

View File

@@ -9,8 +9,8 @@
use warnings;
use strict;
# call this script like this to generate checkpoints for a HAC such as DragonX:
# CLI=./src/dragonx-cli ./contrib/sdl_checkpoints.pl ...
# call this script like this to generate checkpoints for another chain:
# CLI=./src/hac-cli ./contrib/sdl_checkpoints.pl ...
my $hush = $ENV{CLI} || "./src/hush-cli";
my $gethash = "$hush getblockhash";

View File

@@ -96,7 +96,7 @@ For this repo, it's likely this is the command you need:
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
file as the first argument to `gdb`, not a bash script.

View File

@@ -97,7 +97,6 @@ Install deps on Linux:
- 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.
- 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 doc/relnotes/README.md
- To get the stats of file changes: `git diff --stat master...dev`

File diff suppressed because it is too large Load Diff

View File

@@ -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 "$@"

View File

@@ -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

View File

@@ -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 $@

View File

@@ -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

View File

@@ -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);
vector<string> HUSH_nodes = {};
vector<string> DRAGONX_nodes = {};
// Only HUSH3 and DRAGONX connect to these by default, other HACs must opt-in via -connect/-addnode
// Only HUSH3 uses 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 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) {
HUSH_nodes = {"node1.hush.is","node2.hush.is","node3.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"];
if (more_nodes.size() > 0) {
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) {
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() );
}
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;
HUSH_STOPAT = GetArg("-stopat",0);
MAX_REORG_LENGTH = GetArg("-maxreorg",MAX_REORG_LENGTH);

View File

@@ -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) {
// SD DMG Support: Apple just has to do things differently...
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) {
// The traditional place Zcash params are stored, should not hit this case in normal circumstances,
// as Hush packages sapling params now
@@ -1191,17 +1171,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if(fs::exists(asmap_path)) {
printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
} else {
// Mac SDX
asmap_path = fs::path("/Applications/SilentDragonX.app/Contents/MacOS/") / DEFAULT_ASMAP_FILENAME;
printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() );
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;
}
// 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;
}
}
}

View File

@@ -2688,7 +2688,7 @@ namespace Consensus {
BOOST_FOREACH(const CTxOut& txout, tx.vout) {
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
// change

View File

@@ -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 $@

View File

@@ -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 $@

View File

@@ -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 $@

View File

@@ -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 $@

View File

@@ -5038,7 +5038,7 @@ SpendingKeyAddResult AddSpendingKeyToWallet::operator()(const libzcash::SaplingE
if (params.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight == Consensus::NetworkUpgrade::ALWAYS_ACTIVE) {
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = nTime;
} 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
m_wallet->mapSaplingZKeyMetadata[ivk].nCreateTime = std::max((int64_t) 154051200, nTime);
}

View File

@@ -81,10 +81,6 @@ strip $DEB_BIN/hush-cli
cp $SRC_PATH/src/hush-tx $DEB_BIN
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_DEB/changelog $DEB_DOC
cp $SRC_DEB/copyright $DEB_DOC

View File

@@ -33,8 +33,6 @@ if ($acname) {
$cli .= " -ac_name=$acname";
# HSC's by default have a blocktime of 60s
$perday = 1440;
# Dragonx has a blocktime of 36s
$perday = 2400 if ($acname eq 'DRAGONX');
} else {
$acname = 'HUSH3';
}

View File

@@ -24,7 +24,7 @@ echo "Created new build dir $BUILD"
cp contrib/asmap/asmap.dat $BUILD
cp sapling*.params $BUILD
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
strip hushd hush-cli hush-tx
cd ..