diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 5866ab2e3..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,58 +0,0 @@ - -# Hush Core (hushd) Software Contribution Guidelines - -Thank you for reaching out and trying to make Hush an even better software application and cryptocoin platform. These contribution guidelines shall help you figuring out where you can be helpful and how to easily get started. - -## Table of Contents - -0. [Types of contributions we're looking for](#types-of-contributions-were-looking-for) -0. [Ground rules & expectations](#ground-rules--expectations) -0. [How to contribute](#how-to-contribute) -0. [Style guide](#style-guide) -0. [Setting up your environment](#setting-up-your-environment) -0. [Contribution review process](#contribution-review-process) -0. [Community](#community) - -## Types of contributions we're looking for -There are many ways you can directly contribute to Hush: - -* Debug and test the Hush Core code -* Find and fix bugs -* Improve suboptimal code -* Extend our software -* Perform a secure code review of Hush Full Node and other Hush-related software - -We have a curated list of projects with details about difficulty level and languages involved: https://git.hush.is/hush/projects - -Interested in making a contribution? Read on! - -## Ground rules & expectations - -Before we get started, here are a few things we expect from you (and that you should expect from others): - -* Be kind and thoughtful in your conversations around this project. We all come from different backgrounds and projects, which means we likely have different perspectives on "how free software and open source is done." Try to listen to others rather than convince them that your way is correct. -* Open Source Guides are released with a [Contributor Code of Conduct](./code_of_conduct.md). By participating in this project, you agree to abide by its terms. -* If you open a pull request, please ensure that your contribution does not increase test failures. If there are additional test failures, you will need to address them before we can merge your contribution. -* When adding content, please consider if it is widely valuable. Please don't add references or links to things you or your employer have created as others will do so if they appreciate it. - -## How to contribute - -If you'd like to contribute, start by searching through the [issues](https://git.hush.is/hush/hush3/issues) and [pull requests](https://git.hush.is/hush/hush3/pulls) to see whether someone else has raised a similar idea or question. - -If you don't see your idea listed, and you think it can contribute to Hush, do one of the following: -* **If your contribution is minor,** such as a fixing a typo, open a pull request. -* **If your contribution is major,** such as a new feature or bugfix, start by opening an issue first. That way, other contributors can weigh in on the discussion before you do any work. - -## Style guide - -Don't write shitty code. Do not emulate "jl777 code style" from Komodo, we consider that a bug, not a feature. - -## Setting up your environment - -The Hush Core (hushd) is mainly written in C++ with specific modules written in C. Follow the [Install](https://git.hush.is/hush/hush3/src/branch/master/INSTALL.md) instructions to build hushd from sources. For more informations about the Hush Platform and a full API documentation please visit the official [Hush Developer documentation](https://faq.hush.is/rpc/) - -Other Hush software is written in Rust or Go. We avoid Javascript at all costs. - -## Contribution review process - -We will tell you if we like your stuff. diff --git a/DEVELOPING.md b/DEVELOPING.md deleted file mode 100644 index 1de87fcc6..000000000 --- a/DEVELOPING.md +++ /dev/null @@ -1,96 +0,0 @@ -# Being a Hush Developer - -## Compiling Hush - -Normal compiling is as simple as: - - ./build.sh - -To make it use as many CPU threads as you have: - - ./build.sh -j$(nproc) # assumes linux - ./build.sh -j8 # use a fixed 8 threads, more portable - -This is dangerous! You need about 2GB of RAM per thread, plus all the -other programs and Operating System overhead. A good rule of thumb is: - -Divide how many GBs of RAM you have by 2, subtract one. Use that many jobs. - - -## Dealing with dependency changes - -Let's say you change a dependency and want the compile to notice. If your -change is outside of the main Hush source code, in ./src, simply running -`make` will not notice, and sometimes not even `build.sh`. You can always -do a fresh clone or `make clean`, but that will take a lot of time. Those -methods are actually best for Continuous Integration systems, but to help -reduce the time a developer has to wait, here are some PROTIPs. - - -If you are changing how a dependency is built, you should remove the entire directory like this: - - rm -rf depends/work/build/x86_64-unknown-linux-gnu/wolfssl/ - -The above will delete the entire source code of wolfssl dependency on `x86_64` -but it will keep the tar.gz and you will not need to download it again. If -you are testing a change in URL or SHA256, you will want to force it to download -again: - - rm -rf depends/sources/wolfssl*.tar.gz - -Now when you run `build.sh` again, you will be able to test your changes. - - -## Good Hygiene - -To avoid weird build system issues, it's often good to run: - - make clean - -*before* you switch Git branches. Otherwise, the new branches Makefiles -often are incompatible and `make clean` will be impossible, which can -sometimes introduce weird bugs or make compiling really annoying. -If `make clean` produces a compilation error, you just experienced it. - -## Switching branches - -Switching branches and doing partial compiles in Hush source code -can introduce weird bugs, which are fixed by running `build.sh` again. -Additionally, it's a good idea to run `make clean` before you switch -between branches. - -## Partial compiles - -At any point, you can modify hush source code and then use `make` or `build.sh` -to do a partial compile. The first is faster but the latter is more likely to -work correctly in all circustances. Sometimes partial compiles break weird -build system dependencies, and you must do a `make clean` first, or even -`git clean -fdx` (look up what it means first!) to clean things. The nuclear -option is to re-clone the repo, which sometimes is the least work to fix -the problem. - -Running `make` doesn't understand about dependency changes, such as Rust crates. -A simple C/C++ change can be tested with just `make` but if you change the version -of a dependency or something inside of Rust, you will need `build.sh` . - -## Generating new unix man pages - -Make sure that you have updated all version numbers in hushd and compiled, then -to generate new unix man pages for that version : - - ./util/gen-manpages.sh - -## Generating new debian packages - -After successfully compiling Hush, you can generate a debian package of these binaries with: - - ./util/build-debian-package.sh - -This command will not work on Mac OS X. Currently you cannot generate a Debian package -from operating systems other than Linux. Oh well. - -## Updates to this document - -If you think something else should be in this guide, please send your suggestions! - -Gitea: https://git.hush.is/hush/hush3 diff --git a/INSTALL-BIN.md b/INSTALL-BIN.md deleted file mode 100644 index 38c8e5a7d..000000000 --- a/INSTALL-BIN.md +++ /dev/null @@ -1,11 +0,0 @@ -# Installing Hush binaries - -1. First [download the release](https://git.hush.is/hush/hush3/releases) you want to install. It will have a .deb file extension. - -1. Next install the Debian package (change the version to what you downloaded above): - - `dpkg -i hush-3.8.0-amd64.deb` - -1. If you want to remove it, then run this to uninstall: - - `apt-get remove hush` diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index 1557ed4e4..000000000 --- a/INSTALL.md +++ /dev/null @@ -1,122 +0,0 @@ -# Installing Hush - -Instructions to compile Hush yourself. - -## Swap Space (Optional) -You will need at least 4GB of RAM to build hush from git source, OR you can -enable a swap file. To enable a 4GB swap file on modern Linux distributions: - -```sh -sudo fallocate -l 4G /swapfile -sudo chmod 600 /swapfile -sudo mkswap /swapfile -sudo swapon /swapfile -``` - -## Build on Debian/Ubuntu: - -```sh -# install build dependencies -sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \ - autoconf libtool ncurses-dev unzip git zlib1g-dev wget \ - bsdmainutils automake curl unzip nano libsodium-dev cmake -# clone git repo -git clone https://git.hush.is/hush/hush3 -cd hush3 -# Build -# This uses 3 build processes, you need 2GB of RAM for each. -./build.sh -j3 -``` - -## Build on Arch: - -```sh -# install build dependencies -sudo pacman -S gcc libsodium lib32-zlib unzip wget git python rust curl autoconf cmake -# clone git repo -git clone https://git.hush.is/hush/hush3 -cd hush3 -# Build -# This uses 3 build processes, you need 2GB of RAM for each. -./build.sh -j3 -``` - -## Build on Fedora: - -```sh -# install build dependencies -sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libtool ncurses-devel patch -y -# clone git repo -git clone https://git.hush.is/hush/hush3 -cd hush3 -# Build -# This uses 3 build processes, you need 2GB of RAM for each. -./build.sh -j3 -``` - -### Building On Ubuntu 16.04 and older systems - -Some older compilers may not be able to compile modern code, such as gcc 5.4 which comes with Ubuntu 16.04 by default. Here is how to install gcc 7 on Ubuntu 16.04. Run these commands as root: - -``` -add-apt-repository ppa:ubuntu-toolchain-r/test && \ -apt update && \ -apt-get install -y gcc-7 g++-7 && \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 -``` - -### Build on Mac - -These instructions are a work in progress. Please report issues to https://hush.is/tg_support - -``` -sudo port update -sudo port upgrade outdated -sudo port install qt5 - -# clone git repo -git clone https://git.hush.is/hush/hush3 -cd hush3 -# Build -# This uses 3 build processes, you need 2GB of RAM for each. -./build.sh -j3 -``` - -## Run a HUSH Node - -After you have compiled Hush, then you can run it with the following command: - -```sh -./src/hushd -``` - -## Windows (cross-compiled on Linux) -Get dependencies: -```ssh -sudo apt-get install \ - build-essential pkg-config libc6-dev m4 g++-multilib libdb++-dev \ - autoconf libtool ncurses-dev unzip git zip \ - zlib1g-dev wget bsdmainutils automake mingw-w64 cmake libsodium-dev -``` - -Downloading Git source repo, building and running Hush: - -```sh -# pull -git clone https://git.hush.is/hush/hush3 -cd hush3 -# Build -./util/build-win.sh -j$(nproc) -# Run a HUSH node -./src/hushd -``` - -## ARM Architecture - -Currently, any ARMv7 machine will not be able to build this repo, because the -underlying tech (zcash and the zksnark library) do not support that instruction -set. - -This also means that old RaspberryPi devices will not work, unless they have a -newer ARMv8-based Raspberry Pi. Raspberry Pi 4 and newer are known to work. diff --git a/OLD_WALLETS.md b/OLD_WALLETS.md deleted file mode 100644 index 99f96f46f..000000000 --- a/OLD_WALLETS.md +++ /dev/null @@ -1,71 +0,0 @@ -## Claiming Funds From Old Hush Wallets - -Hush migrated to a new mainnet after Block 500,000 on the old Hush blockchain. -Funds in addresses as of Block 500,000 were transported to our new chain. About -31,000 addresses with at least 0.00000001 HUSH were transported to the new Hush -mainnet. - -To claim funds on the new chain, there are few options. - -### Funds on exchanges - -Firstly, no bueno! Not your keys, not your coins. It's best not to store coins -on exchanges. But in this case, you lucked out! There is nothing to do to claim -new coins if you have coins on an exchange that supports the new Hush chain. -The exchange will follow the instructions from the next section and you will -magically have funds on the new chain. Note that old Hush addresses started -with `t1` and now they begin with `R`. - -To see what an old HUSH v2 address looks like on the new chain, this online tool -can be used: https://dexstats.info/addressconverter.php - -or this command line tool: https://git.hush.is/hush/hush3/src/master/contrib/convert_address.py - - -### Using an old wallet.dat - -Backup your old HUSH wallet.dat, and backup any current wallet.dat that is in - - ~/.komodo/HUSH3/ - -OR - ~/.hush/HUSH3/ - -There is no way to lose funds, as long as you have backups!!! Make sure -to make backups. Do not skip this step. - -Make sure any/all GUI wallets are stopped! Also make sure your old Hush node -and new Hush3 node are stopped: - - cd hush3 - ./src/hush-cli stop - -Do not copy wallets or move wallets while your full node is running! This could -corrupt your wallet! - -Now copy your old Hush wallet.dat to - - ~/.hush/HUSH3/ - -with a command like - - # DO NOT RUN THIS WITHOUT MAKING BACKUPS! - cp ~/.hush/wallet.dat ~/.hush/HUSH3/ - -The reason this works is that both old HUSH and new HUSH are still Bitcoin Protocol -coins, which both use secp256k1 public keys. Now start your HUSH3 node again, -with this special CLI argument that will clear out transactions from your wallet: - - cd hush3 - ./src/hushd -zapwallettxes - -This will cause a full history rescan, which will take some time. Once it's complete, -you can see your funds with this command: - - ./src/hush-cli getwalletinfo - -NOTE: Do not use this wallet except to send funds to a new wallet! - -### Private Keys - -You can also transport funds one address at a time via private keys. diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 97a9a68ce..000000000 --- a/SECURITY.md +++ /dev/null @@ -1,90 +0,0 @@ -## Reporting a Vulnerability - -You can use [Keybase](https://keybase.io/dukeleto) to find secure contact information. - -You can also contact Duke directly via SilentDragon wallet, via "Contact Duke". Encrypted sensitive data -in memo fields in highly encouraged. - -We kindly ask you to not publish or exploit any found vulnerabilities without at least contacting us first. - -Fingerprint: F16219F4C23F91112E9C734A8DFCBF8E5A4D8019 - -``` ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: Keybase OpenPGP v2.0.8 -Comment: https://keybase.io/crypto - -xsFNBFU/8aYBEADf7eIcersi4Fbxdc2O6fuy3F9eoW6ap+bBz53fvZFMgBrKcUoV -2q6HkTQr/CWgPjx1LDwwBo7CBxOeg5FI8W5NVmVA+1XQ0TSa1fx8COpkPOAyCeDa -6aNQI1ciZS9xJeWy65gF2Mn+iJpgdkQj7xFxxaQpg8Uadq+jKzKp8BIMFyK10eSa -Pdn1xRDN3Bp5Ze2KUkv59nUc+C1Qx8mE5taXspSdHhrIL/78saGUZ4Q1bnlNex5u -aiAGRr5L/Qr0e5oEmfId56aQiCBqfvZmgUoun4djLdkAdhMW9bR8msbL/AycFvBn -C7fNTvic/vOw3yShd5jlr92OfNfHSgzJ5oa+BvMxPDbY4be8GPiTEvaGlPeEAec+ -HyQQHD2yzkhDCLPKbf6WDyRfnUTe3YoAEEmZWkgyP36ggB9gpoW5QuGC0P0Oz8Gz -jeqBdtnSwR30cwkH535ChjDP/W+KR1yoKZgenV5KuyA6WOZTkdFnDr1R33CkWA+q -NlZixmSYXZKPeL/z95ZD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ouRuLELqOLWmVAyE2V -WRq3VaGm23N/7w2FlsfPzfElHhmA3znx+2NllNB4nRHforu3/bmUJljozwBwDAN1 -+CfAct5LTQbn+w/8DtEiEZ3BMFU0WWo6W/NqvF5R4x/Hyns50L1GIA6UZqfs9Pdj -94EgoCVBGzgwUAl241HT7R4Kys58KlFNhlq3fFxlAADAY/ToCyNCK84PR10EDN6I -Q0jWZaMzMSSm6fJT75br93Sp4TNpTuVhGijR4ZehdDmclbShS28jrJo3u0vfOBoT -Sy7IchvuudIonnL5UKlA4a1KZOjuEfQfUId/iiIzRhTF+cPsvjqRv6lxLNjdbrDr -BMCsvwqZl4Qst2Z2kAZYND6gSSQAlef4j3EGtoVrS46maPTimv1KoLsgCQ4ycFmP -4uU+2KebEY1IdJW50gAEipajiqwH0Biy+H1muanSluZLeC/LYRdH+ebXuguhYZbI -m4qCbO5rupke0gBFZ7rmqmnDhDg7riVUWvIrtL2YtWX8y8u50TCaQaRjyf0Fqyv8 -G76/DUCUCYcwNkm2qJdHpjVqOU+7E+iWfooA4obfGyPLtuLw2fpVDEDgn+csd+M4 -KlRY6butx+NDUqHtx1Axf6aC9Dl6LAE33UY8nlQWWFvJbQBAY54IzU0WehSgrJSB -tnKq9uroBB7qDoJExmOnlUaAsmJWjkfxsQS9lFam6lf1UD01AFiIql0rQTcacxrF -NvQ1HJmZvDZF/K37DrE72NmkYz1aJhTokGFHOGoCqLt146bA2IRkpQRXCv4= -=YSWs ------END PGP PUBLIC KEY BLOCK----- - -``` diff --git a/share/genbuild.sh b/share/genbuild.sh deleted file mode 100755 index 08fb91dc5..000000000 --- a/share/genbuild.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# Copyright (c) 2018-2024 The Hush developers -# Distributed under the GPLv3 software license, see the accompanying -# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html -if [ $# -gt 1 ]; then - cd "$2" -fi -if [ $# -gt 0 ]; then - FILE="$1" - shift - if [ -f "$FILE" ]; then - INFO="$(head -n 1 "$FILE")" - fi -else - echo "Usage: $0 " - exit 1 -fi - -DESC="" -SUFFIX="" -if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then - # clean 'dirty' status of touched files that haven't been modified - git diff >/dev/null 2>/dev/null - - # if latest commit is tagged and not dirty, then override using the tag name - RAWDESC=$(git describe --abbrev=0 2>/dev/null) - if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC 2>/dev/null)" ]; then - git diff-index --quiet HEAD -- && DESC=$RAWDESC - fi - - # otherwise generate suffix from git, i.e. string like "59887e8-dirty" - SUFFIX=$(git rev-parse --short HEAD) - git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" - -fi - -if [ -n "$DESC" ]; then - NEWINFO="#define BUILD_DESC \"$DESC\"" -elif [ -n "$SUFFIX" ]; then - NEWINFO="#define BUILD_SUFFIX $SUFFIX" -else - NEWINFO="// No build information available" -fi - -# only update build.h if necessary -if [ "$INFO" != "$NEWINFO" ]; then - echo "$NEWINFO" >"$FILE" -fi diff --git a/test_randomx b/test_randomx deleted file mode 100755 index bc41bb85c..000000000 --- a/test_randomx +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -# any CLI args given to this script will be passed along -# example: ./test_randomx -debug=randomx - ./src/hushd -ac_randomx_interval=10 -ac_randomx_lag=3 -ac_halving=20 -ac_algo=randomx -ac_name=RANDOMX10 -ac_private=1 -ac_blocktime=20 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1 $@ - -# to run via the debugger -# type "run" when gdb prompt appears -#gdb --args ./src/hushd -- -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=30 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1