Skip to content

Commit

Permalink
Merge pull request #185 from vertcoin-project/0.18.x
Browse files Browse the repository at this point in the history
0.18.x
  • Loading branch information
vertiond authored Apr 3, 2022
2 parents 7940de8 + 2f4719b commit ff670be
Show file tree
Hide file tree
Showing 157 changed files with 26,698 additions and 4,696 deletions.
6 changes: 4 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ task:

task:
name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, sanitizers: fuzzer,address,undefined]'
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BASE_BRANCH == $CIRRUS_DEFAULT_BRANCH
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
Expand All @@ -131,8 +132,9 @@ task:

task:
name: 'macOS 10.14 native [GOAL: install] [GUI] [no depends]'
macos_brew_addon_script:
- brew install boost libevent berkeley-db4 qt miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt
brew_install_script:
- brew update
- brew install boost libevent berkeley-db4 qt@5 miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt
<< : *GLOBAL_TASK_TEMPLATE
osx_instance:
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ What is Vertcoin?
Vertcoin is a fork of Bitcoin that is designed to resist the monopolisation of
mining power.
- 2.5 minute block targets
- subsidy halves in 840k blocks (~4 years)
- ~84 million total coins
- Subsidy halves in 840k blocks (~4 years)
- 84 million total coins
- 25 coins per block
- Difficulty retargeting every block to recover from large hashrate swings
- Verthash proof of work algorithm for ASIC resistance
Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export RUN_FUNCTIONAL_TESTS=false
export GOAL="install"
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
# This could be removed once the ABI change warning does not show up by default
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi --enable-werror --with-boost-process"
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi --with-boost-process"
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export XCODE_BUILD_ID=11C505
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export GOAL="deploy"
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --enable-werror --with-boost-process"
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --with-boost-process"
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_mac_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
export HOST=x86_64-apple-darwin16
export PIP_PACKAGES="zmq"
export GOAL="install"
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --enable-werror --with-boost-process"
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --with-boost-process"
export CI_OS_NAME="macos"
export NO_DEPENDS=1
export OSX_SDK=""
Expand Down
4 changes: 4 additions & 0 deletions ci/test/00_setup_env_win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ export RUN_FUNCTIONAL_TESTS=false
export RUN_SECURITY_TESTS="true"
export GOAL="deploy"
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --without-boost-process"

# Compiler for MinGW-w64 causes false -Wreturn-type warning.
# See https://sourceforge.net/p/mingw-w64/bugs/306/
export NO_WERROR=1
5 changes: 4 additions & 1 deletion ci/test/06_script_a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

export LC_ALL=C.UTF-8

BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
if [ -z "$NO_WERROR" ]; then
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
fi
DOCKER_EXEC "ccache --zero-stats --max-size=$CCACHE_SIZE"

BEGIN_FOLD autogen
Expand Down
14 changes: 7 additions & 7 deletions contrib/devtools/gen-manpages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ BUILDDIR=${BUILDDIR:-$TOPDIR}
BINDIR=${BINDIR:-$BUILDDIR/src}
MANDIR=${MANDIR:-$TOPDIR/doc/man}

BITCOIND=${BITCOIND:-$BINDIR/bitcoind}
BITCOINCLI=${BITCOINCLI:-$BINDIR/bitcoin-cli}
BITCOINTX=${BITCOINTX:-$BINDIR/bitcoin-tx}
WALLET_TOOL=${WALLET_TOOL:-$BINDIR/bitcoin-wallet}
BITCOINQT=${BITCOINQT:-$BINDIR/qt/bitcoin-qt}
BITCOIND=${VERTCOIND:-$BINDIR/vertcoind}
BITCOINCLI=${VERTCOINCLI:-$BINDIR/vertcoin-cli}
BITCOINTX=${VERTCOINTX:-$BINDIR/vertcoin-tx}
WALLET_TOOL=${WALLET_TOOL:-$BINDIR/vertcoin-wallet}
BITCOINQT=${VERTCOINQT:-$BINDIR/qt/vertcoin-qt}

[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1

# The autodetected version git tag can screw up manpage output a little bit
read -r -a BTCVER <<< "$($BITCOINCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }')"

# Create a footer file with copyright content.
# This gets autodetected fine for bitcoind if --version-string is not set,
# but has different outcomes for bitcoin-qt and bitcoin-cli.
# This gets autodetected fine for vertcoind if --version-string is not set,
# but has different outcomes for vertcoin-qt and vertcoin-cli.
echo "[COPYRIGHT]" > footer.h2m
$BITCOIND --version | sed -n '1!p' >> footer.h2m

Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/assign_DISTNAME
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ if RECENT_TAG="$(git describe --exact-match HEAD)"; then
else
VERSION="$(git rev-parse --short=12 HEAD)"
fi
DISTNAME="bitcoin-${VERSION}"
DISTNAME="vertcoin-${VERSION}"
18 changes: 15 additions & 3 deletions contrib/gitian-descriptors/gitian-osx-signer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ architectures:
- "amd64"
packages:
- "faketime"
- "python3-pip"
remotes:
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
"dir": "signature"
- "url": "https://github.com/achow101/signapple.git"
"dir": "signapple"
"commit": "b084cbbf44d5330448ffce0c7d118f75781b64bd"
files:
- "bitcoin-osx-unsigned.tar.gz"
script: |
Expand All @@ -30,11 +34,19 @@ script: |
chmod +x ${WRAP_DIR}/${prog}
done
UNSIGNED=bitcoin-osx-unsigned.tar.gz
# Install signapple
cd signapple
python3 -m pip install -U pip setuptools
python3 -m pip install .
export PATH="$HOME/.local/bin":$PATH
cd ..
UNSIGNED_TARBALL=bitcoin-osx-unsigned.tar.gz
UNSIGNED_APP=dist/Bitcoin-Qt.app
SIGNED=bitcoin-osx-signed.dmg
tar -xf ${UNSIGNED}
tar -xf ${UNSIGNED_TARBALL}
OSX_VOLNAME="$(cat osx_volname)"
./detached-sig-apply.sh ${UNSIGNED} signature/osx
./detached-sig-apply.sh ${UNSIGNED_APP} signature/osx/dist
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "${OSX_VOLNAME}" -no-pad -r -dir-mode 0755 -apple -o uncompressed.dmg signed-app
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
2 changes: 0 additions & 2 deletions contrib/gitian-descriptors/gitian-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ script: |
cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i}
cp ${BASEPREFIX}/${i}/native/bin/dmg ${BASEPREFIX}/${i}/native/bin/genisoimage unsigned-app-${i}
cp ${BASEPREFIX}/${i}/native/bin/${i}-codesign_allocate unsigned-app-${i}/codesign_allocate
cp ${BASEPREFIX}/${i}/native/bin/${i}-pagestuff unsigned-app-${i}/pagestuff
mv dist unsigned-app-${i}
pushd unsigned-app-${i}
find . | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz
Expand Down
12 changes: 6 additions & 6 deletions contrib/guix/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bootstrappable Bitcoin Core Builds
# Bootstrappable Vertcoin Core Builds

This directory contains the files necessary to perform bootstrappable Bitcoin
This directory contains the files necessary to perform bootstrappable Vertcoin
Core builds.

[Bootstrappability][b17e] furthers our binary security guarantees by allowing us
Expand All @@ -14,7 +14,7 @@ We achieve bootstrappability by using Guix as a functional package manager.
Conservatively, a x86_64 machine with:

- 4GB of free disk space on the partition that /gnu/store will reside in
- 24GB of free disk space on the partition that the Bitcoin Core git repository
- 24GB of free disk space on the partition that the Vertcoin Core git repository
resides in

> Note: these requirements are slightly less onerous than those of Gitian builds
Expand Down Expand Up @@ -84,7 +84,7 @@ export PATH="${HOME}/.config/guix/current/bin${PATH:+:}$PATH"

### As a Development Environment

For a Bitcoin Core depends development environment, simply invoke
For a Vertcoin Core depends development environment, simply invoke

```sh
guix environment --manifest=contrib/guix/manifest.scm
Expand All @@ -95,7 +95,7 @@ a `depends` build injected into your environment.

### As a Tool for Deterministic Builds

From the top of a clean Bitcoin Core repository:
From the top of a clean Vertcoin Core repository:

```sh
./contrib/guix/guix-build.sh
Expand Down Expand Up @@ -192,7 +192,7 @@ This can be overridden for all `guix` invocations by passing the
overridden on a call-by-call basis by passing the same `--substitute-urls`
option to client tools such at `guix environment`.

To use dongcarl's substitute server for Bitcoin Core builds after having
To use dongcarl's substitute server for Vertcoin Core builds after having
[authorized his signing key](#authorize-the-signing-keys):

```
Expand Down
6 changes: 3 additions & 3 deletions contrib/guix/guix-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ and untracked files and directories will be wiped, allowing you to start anew.
EOF
}

# Deterministically build Bitcoin Core for HOSTs (overridable by environment)
# Deterministically build Vertcoin Core for HOSTs (overridable by environment)
# shellcheck disable=SC2153
for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu x86_64-w64-mingw32}; do

Expand Down Expand Up @@ -104,7 +104,7 @@ for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv
--container \
--pure \
--no-cwd \
--share="$PWD"=/bitcoin \
--share="$PWD"=/vertcoin \
--expose="$(git rev-parse --git-common-dir)" \
${SOURCES_PATH:+--share="$SOURCES_PATH"} \
${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
Expand All @@ -113,7 +113,7 @@ for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
${V:+V=1} \
${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \
bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh"
bash -c "cd /vertcoin && bash contrib/guix/libexec/build.sh"
)

done
23 changes: 12 additions & 11 deletions contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ BASEPREFIX="${PWD}/depends"
OUTDIR="${OUTDIR:-${PWD}/output}"
[ -e "$OUTDIR" ] || mkdir -p "$OUTDIR"

# Setup the directory where our Bitcoin Core build for HOST will occur
# Setup the directory where our Vertcoin Core build for HOST will occur
DISTSRC="${DISTSRC:-${PWD}/distsrc-${HOST}}"
if [ -e "$DISTSRC" ]; then
echo "DISTSRC directory '${DISTSRC}' exists, probably because of previous builds... Aborting..."
Expand Down Expand Up @@ -166,15 +166,16 @@ fi
###########################

# CONFIGFLAGS
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-tests"
case "$HOST" in
*linux*) CONFIGFLAGS+=" --enable-glibc-back-compat" ;;
*mingw*) CONFIGFLAGS+=" --disable-shared" ;;
esac

# CFLAGS
HOST_CFLAGS="-O2 -g"
case "$HOST" in
*linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;;
*linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=. -fPIC" ;;
*mingw*) HOST_CFLAGS+=" -fno-ident" ;;
esac

Expand Down Expand Up @@ -211,7 +212,7 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"

sed -i.old 's/-lstdc++ //g' config.status libtool src/univalue/config.status src/univalue/libtool

# Build Bitcoin Core
# Build Vertcoin Core
make --jobs="$MAX_JOBS" ${V:+V=1}

# Perform basic ELF security checks on a series of executables.
Expand All @@ -232,22 +233,22 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
;;
esac

# Setup the directory where our Bitcoin Core build for HOST will be
# Setup the directory where our Vertcoin Core build for HOST will be
# installed. This directory will also later serve as the input for our
# binary tarballs.
INSTALLPATH="${PWD}/installed/${DISTNAME}"
mkdir -p "${INSTALLPATH}"
# Install built Bitcoin Core to $INSTALLPATH
# Install built Vertcoin Core to $INSTALLPATH
make install DESTDIR="${INSTALLPATH}" ${V:+V=1}

(
cd installed

case "$HOST" in
*mingw*)
mv --target-directory="$DISTNAME"/lib/ "$DISTNAME"/bin/*.dll
;;
esac
# case "$HOST" in
# *mingw*)
# mv --target-directory="$DISTNAME"/lib/ "$DISTNAME"/bin/*.dll
# ;;
# esac

# Prune libtool and object archives
find . -name "lib*.la" -delete
Expand Down
Loading

0 comments on commit ff670be

Please sign in to comment.