Reorganize repo: move scripts to contrib/scripts/, clean up .gitignore, untrack backup files

This commit is contained in:
dan_s
2026-02-26 19:42:28 -06:00
parent 10a1b27de1
commit 896fa9c107
35 changed files with 363 additions and 19505 deletions

272
.gitignore vendored
View File

@@ -1,13 +1,43 @@
# ==========================
# Editor & IDE files
# ==========================
.*.sw?
*.*~*
*~
*.bak
*.rej
*.orig
.idea
.vscode
# ==========================
# Compiled objects & libraries
# ==========================
*.o
*.o-*
*.a
*.lo
*.la
*.so
*.dll
*.pyc
*.pb.cc
*.pb.h
*.json.h
*.raw.h
*.dSYM
# ==========================
# Archives & packages
# ==========================
*.tar.gz
*.deb
src/bitcoin
src/test/test_bitcoin
src/core
*.zip
*.dmg
*zcashTest.pk
*zcashTest.vk
# autoreconf
# ==========================
# Autotools / configure
# ==========================
#Makefile.in
aclocal.m4
autom4te.cache/
@@ -28,58 +58,74 @@ config.log
config.status
configure
libtool
Makefile
Makefile.in
src/Makefile.in
doc/man/Makefile.in
src/config/bitcoin-config.h
src/config/bitcoin-config.h.in
src/config/stamp-h1
libzcashconsensus.pc
cache/
venv-mnf/
src/univalue/gen
# ==========================
# Build outputs & artifacts
# ==========================
src/.build_target
.deps
.dirstamp
.idea
.libs
.*.sw?
*.*~*
*.bak
*.rej
*.orig
*.pyc
*.o
*.o-*
.zcash
*.a
*.pb.cc
*.pb.h
.vscode
# Hush binaries
src/hush-cli
src/hushd
src/hush-tx
src/hush-test
src/hush-cli.exe
src/hushd.exe
src/hush-tx.exe
src/wallet-utility
src/wallet-utility.exe
# Legacy bitcoin binaries
src/bitcoin
src/test/test_bitcoin
src/core
# Shared libraries
src/libcc.so
src/libcc.dll
src/cc/customcc.so
src/cc/customcc.dll
src/cc/librogue.so
# RandomX build dirs
src/RandomX/build-linux/
src/RandomX/build-win64/
# Release directories
release/
release-win64/
release-linux/
# ==========================
# Depends build system
# ==========================
depends/built/
depends/work/
depends/x86_64-*/
# ==========================
# Zcash / Sapling test keys
# ==========================
*zcashTest.pk
*zcashTest.vk
.zcash
# ==========================
# Test & coverage
# ==========================
*.log
*.trs
*.dmg
*.json.h
*.raw.h
#libtool object files
*.lo
*.la
# Compilation
Makefile
# Unit-tests
Makefile.test
src/test/buildenv.py
# Resources cpp
qrc_*.cpp
# Mac specific
.DS_Store
build
#lcov
*.gcno
*.gcda
/*.info
@@ -87,8 +133,8 @@ test_bitcoin.coverage/
zcash-gtest.coverage/
total.coverage/
coverage_percent.txt
#build tests
Makefile.test
src/test/buildenv.py
linux-coverage-build
linux-build
win32-build
@@ -97,85 +143,61 @@ qa/pull-tester/tests-config.sh
qa/pull-tester/cache/*
qa/pull-tester/test.*/*
!src/leveldb*/Makefile
# ==========================
# Generated / misc source
# ==========================
qrc_*.cpp
src/univalue/gen
src/cryptoconditions/compile
src/fiat/-usd
/doc/doxygen/
libzcashconsensus.pc
# ==========================
# CC / games (legacy)
# ==========================
src/cc/rogue/rogue
src/cc/rogue/rogue.so
src/cc/rogue/test.zip
src/cc/rogue/config.h
src/cc/rogue/confdefs.h
src/cc/rogue/x64
src/cc/dapps/a.out
src/cc/games/prices
src/cc/games/tetris
src/ROGUE.conf
src/rogue.scr
src/rogue.*.*
src/fiat/-usd
# ==========================
# Misc runtime / temp files
# ==========================
src/checkfile
src/foo.zip
src/log
src/HUSH3_7776
REGTEST_7776
src/rpcmisc~.cpp
cache/
venv-mnf/
# ==========================
# Debian packaging
# ==========================
contrib/debian/files
contrib/debian/substvars
src/rpcmisc~.cpp
src/wallet-utility
# ==========================
# Platform specific
# ==========================
.DS_Store
build
src/hush-cli
src/hushd
src/hush-tx
src/hush-test
src/hush-cli.exe
src/hushd.exe
src/hush-tx.exe
# ==========================
# Bundled repos (use separately)
# ==========================
repos/
#output during builds, symbol tables?
*.dSYM
src/cryptoconditions/compile
src/cc/rogue/rogue
src/cc/rogue/rogue.so
src/cc/rogue/test.zip
src/cc/dapps/a.out
src/checkfile
src/foo.zip
src/log
src/rogue.530623577502174316.0
src/rogue.530623577502174316.pack
src/rogue.530623577502174316.player
src/cc/rogue/config.h
src/ROGUE.conf
src/rogue.scr
src/cc/rogue/confdefs.h
src/cc/rogue/x64
src/cc/dapps/a.out
src/Makefile.in
doc/man/Makefile.in
Makefile.in
src/libcc.so
src/libcc.dll
src/cc/customcc.so
src/cc/customcc.dll
src/HUSH3_7776
REGTEST_7776
src/cc/librogue.so
src/cc/games/prices
src/cc/games/tetris
# Build artifacts
*~
*.zip
release-win64/
release-linux/
src/RandomX/build-linux/
src/RandomX/build-win64/
src/wallet-utility.exe
src/.build_target
release/
# other
repos/
# ==========================
# Leveldb Makefile exception
# ==========================
!src/leveldb*/Makefile

View File

@@ -31,24 +31,23 @@ cd /hush3
echo "Creating Linux release package..."
VERSION=$(grep -oP 'define\(_CLIENT_VERSION.*?,\s*\K[0-9]+' configure.ac | head -3 | tr '\n' '.' | sed 's/\.$//')
VERSION=${VERSION:-3.10.5}
UBUNTU_VERSION=$(grep -oP 'VERSION_ID="\K[^"]+' /etc/os-release 2>/dev/null || echo "unknown")
RELEASE_DIR="release/linux-${UBUNTU_VERSION}"
RELEASE_DIR="release/${VERSION}-linux-amd64"
mkdir -p "$RELEASE_DIR"
strip -s src/hushd src/hush-cli src/hush-tx
cp src/hushd src/hush-cli src/hush-tx "$RELEASE_DIR/"
cp asmap.dat sapling-spend.params sapling-output.params "$RELEASE_DIR/" 2>/dev/null || true
cp src/hush-arrakis-chain src/dragonxd src/dragonx-cli "$RELEASE_DIR/"
cp contrib/scripts/hush-arrakis-chain contrib/scripts/dragonxd contrib/scripts/dragonx-cli "$RELEASE_DIR/"
cp contrib/bootstrap/bootstrap-dragonx.sh "$RELEASE_DIR/"
# Create ZIP inside release dir (matches --win-release layout)
rm -f "$RELEASE_DIR/hush-${VERSION}-linux64.zip"
rm -f "$RELEASE_DIR/${VERSION}-linux-amd64.zip"
cd "$RELEASE_DIR"
zip -9 "hush-${VERSION}-linux64.zip" *
cd ..
zip -9 "${VERSION}-linux-amd64.zip" *
cd ../..
echo "Release package created: $RELEASE_DIR/hush-${VERSION}-linux64.zip"
ls -lh "$RELEASE_DIR/hush-${VERSION}-linux64.zip"
echo "Release package created: $RELEASE_DIR/${VERSION}-linux-amd64.zip"
ls -lh "$RELEASE_DIR/${VERSION}-linux-amd64.zip"
# Fix ownership of all files created by root so host user can access them
if [ -n "${HOST_UID:-}" ] && [ -n "${HOST_GID:-}" ]; then

View File

@@ -32,7 +32,19 @@ check_and_clean_target() {
TRIPLET=$(./depends/config.guess 2>/dev/null || true)
if [[ -n "$TRIPLET" && -d "depends/$TRIPLET" ]]; then
echo "Cleaning depends/$TRIPLET to avoid path contamination..."
rm -rf "depends/$TRIPLET" "depends/built/$TRIPLET"
# Use sudo if files are root-owned (from Docker builds)
if [[ "$(stat -c '%u' "depends/$TRIPLET" 2>/dev/null)" == "0" ]]; then
sudo rm -rf "depends/$TRIPLET" "depends/built/$TRIPLET"
else
rm -rf "depends/$TRIPLET" "depends/built/$TRIPLET"
fi
elif [[ -n "$TRIPLET" && -d "depends/built/$TRIPLET" ]]; then
echo "Cleaning depends/built/$TRIPLET to avoid path contamination..."
if [[ "$(stat -c '%u' "depends/built/$TRIPLET" 2>/dev/null)" == "0" ]]; then
sudo rm -rf "depends/built/$TRIPLET"
else
rm -rf "depends/built/$TRIPLET"
fi
fi
echo "Clean complete."
fi
@@ -56,7 +68,9 @@ if [[ "${1:-}" == "--linux-release" ]]; then
echo "Building Linux release inside Ubuntu 20.04 Docker container..."
sudo docker build -t hush-builder -f Dockerfile.build .
sudo docker run --rm -e HOST_UID=$(id -u) -e HOST_GID=$(id -g) -v "$SCRIPT_DIR:/hush3" hush-builder "$@"
echo "Docker build complete. Release is in release/linux-<ubuntu_version>/"
VERSION=$(grep -oP 'define\(_CLIENT_VERSION.*?,\s*\K[0-9]+' configure.ac | head -3 | tr '\n' '.' | sed 's/\.$//')
VERSION=${VERSION:-3.10.5}
echo "Docker build complete. Release is in release/${VERSION}-linux-amd64/"
exit $?
fi

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2024 The Hush developers
set -eo pipefail
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
hush_cli='./hush-cli'
"$SCRIPTDIR/listassetchains" | while read chain; do
$hush_cli --ac_name=$chain stop
done

15
contrib/scripts/dragonx-cli Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Copyright 2016-2024 The Hush Developers
# Copyright 2022 The DragonX Developers
# Released under the GPLv3
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
./hush-cli -ac_name=DRAGONX "$@"

View File

@@ -3,12 +3,14 @@
# 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
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
SEEDNODE=176.126.87.241

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2024 The Hush developers
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
DEFAULTS=""
# People can just use hushd going forward, but this script makes it
# more clear what is going on
HUSH="./hushd"
$HUSH $DEFAULTS "$@"

View File

@@ -5,8 +5,12 @@ import json
def format_param(param, value):
return '-' + param + '=' + value
script_dir = os.path.dirname(__file__)
with open(script_dir + '/assetchains.json') as file:
script_dir = os.path.dirname(os.path.abspath(__file__))
# Look for assetchains.json in same dir first, then in src/
json_path = os.path.join(script_dir, 'assetchains.json')
if not os.path.exists(json_path):
json_path = os.path.join(script_dir, '..', '..', 'src', 'assetchains.json')
with open(json_path) as file:
assetchains = json.load(file)
for chain in assetchains:

14
contrib/scripts/listassetchains Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python2
import os
import json
script_dir = os.path.dirname(os.path.abspath(__file__))
# Look for assetchains.json in same dir first, then in src/
json_path = os.path.join(script_dir, 'assetchains.json')
if not os.path.exists(json_path):
json_path = os.path.join(script_dir, '..', '..', 'src', 'assetchains.json')
with open(json_path) as file:
assetchains = json.load(file)
for chain in assetchains:
print(chain['ac_name'])

View File

@@ -2,15 +2,24 @@
# Copyright (c) 2018-2024 The Hush developers
set -eo pipefail
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
# You can now add delay line to pubkey.txt file
source pubkey.txt
overide_args="$@"
override_args="$@"
seed_ip=$(SEEDNODE)
hsc='./hush-arrakis-chain'
if [ -z "$delay" ]; then delay=20; fi
./listassetchainparams | while read args; do
"$SCRIPTDIR/listassetchainparams" | while read args; do
gen=""
if [ $[RANDOM % 10] == 1 ]; then
gen=" -gen -genproclimit=1"

15
contrib/scripts/testdragonx-cli Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Copyright 2016-2024 The Hush Developers
# Copyright 2022 The DragonX Developers
# Released under the GPLv3
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
./hush-cli -ac_name=TESTDRAGONX $@

View File

@@ -3,12 +3,14 @@
# 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
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
BLOCKTIME=18
SUPPLY=0

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Copyright 2016-2024 The Hush Developers
# Copyright 2022 The DragonX Developers
# Released under the GPLv3
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
./hush-cli -ac_name=TESTEQUIHASH $@

View File

@@ -3,12 +3,14 @@
# 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
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
BLOCKTIME=18
SUPPLY=0

View File

@@ -1,12 +1,14 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2024 The Hush developers
# 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
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
NAME=TUSH

View File

@@ -3,12 +3,14 @@
# Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
# 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
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
# ./hushd -ac_name=TUSH -ac_private=1 -gen=1 -testnode=1
./hushd -ac_name=TUSH -ac_private=1 -ac_supply=55555

18
contrib/scripts/zush Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2024 The Hush developers
# Resolve binary directory
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
BINDIR="$SCRIPTDIR"
else
BINDIR="$SCRIPTDIR/../../src"
fi
cd "$BINDIR"
NAME=ZUSH
CLI=${HUSHCLI:-./hush-cli}
if [ -f $CLI ]; then
$CLI -ac_name=$NAME "$@"
fi

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, such as DragonX, the file `contrib/scripts/dragonxd`
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

@@ -13,11 +13,11 @@ The following command can be used to launch an HSC on a single computer. Each op
HSC CLI arguments that start with `-ac_` means they *Affect Consensus*.
```
./src/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1
./contrib/scripts/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1
```
* `hush-arrakis-chain` is the script used to launch or connect to HSCs
* It lives in the `./src` directory, next to `hushd` and `hush-cli`
* It lives in the `./contrib/scripts` directory
* It is called `hush-arrakis-chain.bat` on Windows
* `-ac_halving=100` means "the block reward halves every 100 blocks"
* `-ac_algo=randomx` means "use RandomX for Proof-Of-Work
@@ -41,12 +41,12 @@ HSC CLI arguments that start with `-ac_` means they *Affect Consensus*.
* One node would use
```
# first node
./src/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555
./contrib/scripts/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555
```
* And the second node would use:
```
# mining node. NOTE: This node will mine the genesis block and pre-mine, if any
./src/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1
./contrib/scripts/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1
```
# Advanced Options

View File

@@ -1,9 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2024 The Hush developers
set -eo pipefail
hush_cli='./hush-cli'
./listassetchains | while read chain; do
$hush_cli --ac_name=$chain stop
done

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,15 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2024 The Hush developers
# 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
DEFAULTS=""
# People can just use hushd going forward, but this script makes it
# more clear what is going on
HUSH="./hushd"
$HUSH $DEFAULTS "$@"

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env python2
import os
import json
script_dir = os.path.dirname(__file__)
with open(script_dir + '/assetchains.json') as file:
assetchains = json.load(file)
for chain in assetchains:
print(chain['ac_name'])

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2024 The Hush developers
# 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
NAME=ZUSH
CLI=${HUSHCLI:-./hush-cli}
if [ -f $CLI ]; then
$CLI -ac_name=$NAME "$@"
fi

View File

@@ -82,10 +82,10 @@ 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/contrib/scripts/dragonx-cli $DEB_BIN
cp $SRC_PATH/contrib/scripts/dragonxd $DEB_BIN
cp $SRC_PATH/src/hush-arrakis-chain $DEB_BIN
cp $SRC_PATH/contrib/scripts/hush-arrakis-chain $DEB_BIN
cp $SRC_DEB/changelog $DEB_DOC
cp $SRC_DEB/copyright $DEB_DOC
cp -r $SRC_DEB/examples $DEB_DOC

View File

@@ -102,7 +102,7 @@ make "$@" V=1 NO_GTEST=1 STATIC=1
echo "Creating macOS release package..."
VERSION=$(grep -oP 'define\(_CLIENT_VERSION.*?,\s*\K[0-9]+' configure.ac | head -3 | tr '\n' '.' | sed 's/\.$//')
VERSION=${VERSION:-3.10.5}
RELEASE_DIR="release/mac"
RELEASE_DIR="release/${VERSION}-mac"
mkdir -p "$RELEASE_DIR"
# Strip binaries
@@ -112,7 +112,7 @@ strip src/hushd src/hush-cli src/hush-tx 2>/dev/null || true
cp src/hushd src/hush-cli src/hush-tx "$RELEASE_DIR/"
# Copy wrapper scripts
cp src/hush-arrakis-chain src/dragonxd src/dragonx-cli "$RELEASE_DIR/" 2>/dev/null || true
cp contrib/scripts/hush-arrakis-chain contrib/scripts/dragonxd contrib/scripts/dragonx-cli "$RELEASE_DIR/" 2>/dev/null || true
# Copy required data files
cp asmap.dat sapling-spend.params sapling-output.params "$RELEASE_DIR/" 2>/dev/null || true
@@ -121,10 +121,10 @@ cp asmap.dat sapling-spend.params sapling-output.params "$RELEASE_DIR/" 2>/dev/n
cp contrib/bootstrap/bootstrap-dragonx.sh "$RELEASE_DIR/" 2>/dev/null || true
# Create ZIP
rm -f "$RELEASE_DIR/hush-${VERSION}-mac.zip"
rm -f "$RELEASE_DIR/${VERSION}-mac.zip"
cd "$RELEASE_DIR"
zip -9 "hush-${VERSION}-mac.zip" *
cd ..
zip -9 "${VERSION}-mac.zip" *
cd ../..
echo "Release package created: $RELEASE_DIR/hush-${VERSION}-mac.zip"
ls -lh "$RELEASE_DIR/hush-${VERSION}-mac.zip"
echo "Release package created: $RELEASE_DIR/${VERSION}-mac.zip"
ls -lh "$RELEASE_DIR/${VERSION}-mac.zip"

View File

@@ -56,7 +56,7 @@ cd $WD
echo "Creating Windows release package..."
VERSION=$(grep -oP 'define\(_CLIENT_VERSION.*?,\s*\K[0-9]+' configure.ac | head -3 | tr '\n' '.' | sed 's/\.$//')
VERSION=${VERSION:-3.10.5}
RELEASE_DIR="release/windows"
RELEASE_DIR="release/${VERSION}-win"
mkdir -p "$RELEASE_DIR"
# Strip binaries
@@ -98,10 +98,10 @@ EOF
cp contrib/bootstrap/bootstrap-dragonx.bat "$RELEASE_DIR/"
# Create ZIP
rm -f "$RELEASE_DIR/hush-${VERSION}-win64.zip"
rm -f "$RELEASE_DIR/${VERSION}-win.zip"
cd "$RELEASE_DIR"
zip -9 "hush-${VERSION}-win64.zip" *.exe *.bat *.dat *.params
cd ..
zip -9 "${VERSION}-win.zip" *.exe *.bat *.dat *.params
cd ../..
echo "Release package created: $RELEASE_DIR/hush-${VERSION}-win64.zip"
ls -lh "$RELEASE_DIR/hush-${VERSION}-win64.zip"
echo "Release package created: $RELEASE_DIR/${VERSION}-win.zip"
ls -lh "$RELEASE_DIR/${VERSION}-win.zip"

View File

@@ -8,7 +8,7 @@ set -x
#hardcode and uncomment if hushd is not running on this machine
#VERSION=3.6.3
VERSION=$(./src/hushd --version|grep version|cut -d' ' -f4|cut -d- -f1|sed 's/v//g')
DIR="hush-$VERSION-linux-amd64"
DIR="$VERSION-linux-amd64"
FILE="$DIR.tar"
TIME=$(perl -e 'print time')
@@ -28,7 +28,7 @@ cp hushd hush-cli hush-tx hush-arrakis-chain dragonx-cli dragonxd ../$BUILD
cd ../$BUILD
strip hushd hush-cli hush-tx
cd ..
tar -f $FILE -c hush-$VERSION-linux-amd64/*
tar -f $FILE -c $VERSION-linux-amd64/*
gzip -9 $FILE
sha256sum *.gz
du -sh *.gz